Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (647.38 KB, 30 trang )
<span class='text_page_counter'>(1)</span><div class='page_container' data-page=1>
web1 web2 web3
Web1 1 2 3
Web2 2 2 1
Web3 2 1 1
(0, 0) (5, 0)
(3, 5)
(2, 3) <sub>(4, 3)</sub> <sub>0 5 2 4 3</sub>
• Matrices
• Special matrices
• Operations on matrices:
• Addition
• Difference
• Transposition
• Scalar multiplication
• Matrix multiplication
• Inverse of a square matrix
• <sub>An mxn matrix is rectangular array of numbers</sub>
• <sub> (m x n): size of the matrix </sub>
• <sub>An 2x3 matrix // 2 rows, 3 columns</sub>
• <sub>Read: </sub><b><sub>two by three </sub></b><sub>matrix</sub>
7 -3 1/2
3 -5 0
(1,3)-entry
a[1,3] = 1/2
a<sub>13</sub> = 1/2
3 x 3matrix,
• <b>Zero</b> matrix 0mxn
02x3 =
• <b><sub>Main diagonal </sub></b><sub>of a matrix</sub>
,
<b>Identity</b> matrix: square matrix [a<sub>ij</sub>] where a<sub>ij</sub>
= 1 if i = j and a<sub>ij</sub> = 0 if i j
• <sub>Upper triangular matrix:</sub>
• <sub>Lower triangular matrix:</sub>
mother Bob Alice Minh Nam
Eva 0 1 0 0
Susan 1 0 0 0
Lan 0 0 1 1
son/daughter Eva Susan Lan
Bob 0 1 0
Alice 1 0 0
Minh 0 0 1
• The <b>transpose </b>of an mxn matrix [a<sub>ij</sub>] is an
nxm matrix [a<sub>ji</sub>]
• <sub>Notation: A</sub>T // the transpose of A
• <sub>Example</sub>
Then,
• Square matrix [a<sub>ij</sub>] where a<sub>ij</sub> = a<sub>ji</sub>
• Addition A + B = [a<sub>ij</sub> + b<sub>ij</sub>]
• Difference A – B = [a<sub>ij</sub> – b<sub>ij</sub>]
• <sub>Scalar multiplication</sub>
• <sub>Matrix multiplication</sub>
day 1
day 2
day 1 + day 2?
day 1 – day 2?
2(day 1)?
addition
difference
Suppose A, B, C are mxn matrices, k is a
number:
1. A + B = B + A // commutative law
2. A + (B + C) = (A + B) + C // associative law
3. k(A + B) = kA + kB // distributive law
peanuts soda hot dogs
group A 8 5 12
group B 15 7 13
selling price store 1 store 2 store 3 store 4
peanuts 2 2.5 2 2.5
soda 2.5 2 2.75 2
hot dogs 3 3 2.5 3
store 1 store 2 store 3 store 4
group A 64.5 66 59.75 66
group B 86.5 87.5 81.75 90.5
• A<sub>m</sub> <sub></sub> <b><sub>n</sub></b> . B<b><sub>n</sub></b> <sub></sub><sub> p</sub> = C<sub>m</sub> <sub></sub><sub> p</sub> //suitable size
• The entry c<sub>ij</sub> = (row i of A).(column j of B)
2
1.1+2.13 4 1 2
-1 -2 -1 0
-2 0 2 -4
-1 -2 -1 0
-2 0 2
1. A(B + C) = AB + AC //distributive law
2. A(BC) = (AB)C //associative law
3. (<b>A</b>B)T = BT<b>A</b>T
<b>Note:</b>
• <sub>In general, AB </sub>
(0, 0) (5, 0)
(3, 5)
(2, 3) <sub>(4, 3)</sub> <sub>0 5 2 4 3</sub>
0 0 3 3 5
D=
Let A =
0 10 4 8 6
0 0 6 6 10
• <sub>In numbers: 3.(1/3) = 1 and 1/3 or 3</sub>-1 is
called (multiplicative) inverse of 3.
• <sub>In matrices: </sub>
An nxn matrix B is called the <b>inverse</b> of an
nxn matrix A if
<b>AB = BA = In</b>
• <sub>The inverse of A is denoted by </sub><b><sub>A</sub>-1</b>.
AA-1 = A-1A = I<sub>n</sub>
• <sub>Example. is the inverse of </sub>
• <sub>A = </sub>
• <sub>A</sub>-1 =
2 -3
1 -4
-4
2
3
-1
1
-5
-4.2 – 3.(-1) = -5
The Inversion algorithm:
[<b>A</b> | In] … [In |<b>A-1</b>]
For example,
• <sub> </sub>
-r<sub>2</sub>
-2r<sub>2 </sub>+ r<sub>3</sub> -2r3 + r1
3r<sub>3</sub>+ r<sub>2</sub>
<b>A</b>
<b> A X = B</b>
-2x + y = -1
3x -2y = 5
AX = B
ÛX = A-1B
Û X = <sub></sub> x = -3, y = -7
• <sub>Example of a transformation</sub>
T(x, y) = (x, -y)
T
• <sub> </sub>
(x, y)
input
(x, -y)
output
input
Matrix of
The transformation
output
• <sub>Example of a transformation</sub>
S(x, y) = ?
Find the matrix of S? <sub></sub><sub> (x, y)</sub>
(-x, -y)
input
output
• <sub>Suppose T is a linear transformation given </sub>
by the matrix
Find T(1, 2, -3).
T(1, 2, -3) = T
Given T(x, y) = (x, y-x)
T
And S(x, y) = (x-y, y)
S
Find the composite transformation
(T<sub></sub>S)(x, y) defined by
(T<sub></sub>S)(x, y) = T(S(x, y))
• <sub> </sub>
Matrix of T <sub></sub> S:
=
Message encode Encoded <sub>mess</sub>
Encoded
mess
Message decode
transformation
If the matrix of T is A, then the matrix of T-1 is A
-1
Example. Given T(x, y) = (x – y, -x + 2y),
find T-1, the inverse of T.
Solution.
T has the matrix
T-1 has the matrix
T-1
Note that (T<sub></sub>T-1)=
Example in cryptography
Encrypt the message STOP
by the transformation T(x, y) = (x - 3y, -x + 4y)
S T O P
19 20 15 16
T(x, y) = (x - 3y, -x + 4y)
<sub>Matrix of T, M = </sub>
<b>Encryption:</b>
MD =
<sub>message: -26 -28 41 44</sub>
<b>Decryption: </b>from D’ find D and the inverse of M
Note that MD = D’ <sub></sub> D = M-1<sub>D’ </sub>