Download section 1.3

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
1.3 Matrices and Matrix Operations.
A matrix is a rectangular array of numbers. The numbers in the arry are called the
Entries in the matrix.
The size of a matrix is described in terms of number of rows and columns in contains.
A matrix with only one column is called a column matrix (or a column vector).
A matrix with only one row is called a row matrix (or a row vector).
Example:
1 1 2 9 
 2 4 3 1 


 3 6 5 0 
3
e 
2
 9 
 
 4 5 


 0 11 
 6
Matrices
The entry that occurs in row i and column j of a matrix of A will be denoted by aij.
A general 3X4 matrix might be written as
A general mXn matrix as
 a11 a12
A   a21 a22
 a31 a32
 a11 a12

A
a a
 m1 m 2
It can be written as aij  mn or aij 
a1n 


amn 
a13
a23
a33
a14 
a24 
a34 
The entry in row I and column j of a matrix A is also commonly denoted by the
Symbol ( A)ij
Example: A   4 5 


 0 11 
( A)21  0
A general 1Xn row matrix a and a general mX1 column matrix b would be written as
a  [a1 a2 ... an ]
 b1 
b 
b 2
 
 
bm 
A matrix A with n rows and n columns is called a square matrix of order n, and the
Shaded entries a11 a22 ... ann of A are said to be on the main diagonal of A
 a11

A
a
 n1
a1n 


ann 
Operations on Matrices
Two matrices are defined to be equal if they have the same size and their
Corresponding entries are equal.
In matrix notation, if A  [aij ] and B  [bij ] have the same size, then
A=B if and only if aij  bij for all i and j.
If A and B are matrices of the same size, then the sum A+B is the matrix obtained by
Adding the entries of B to the corresponding entries of A, and the difference A-B is
The matrix obtained by subtracting the entries of B from the corresponding entries of
A. Matrices of different sizes cannot be added or subtracted.
In matrix notation, if A  [aij ] and B  [bij ]
, then
( A  B)ij  ( A)ij  ( B)ij  aij  bij and ( A  B)ij  ( A)ij  ( B)ij  aij  bij
If A is any matrix and c is any scalar (real number), then the product cA is the matrix
Obtained by multiplying each entry of the matrix A by c. The matrix cA is caid to be
A scalar multiple of A.
In matrix notation, if A= [aij ], then (cA)ij  c( A)ij  caij
If A1 , A2 ,..., An are matrices of the same size and c1 , c2 ,..., cn are scalars, then
c1 A1  c2 A2  ...  cn An
Is called a linear combination of A1 , A2 ,..., An with coefficients
c1 , c2 ,..., cn
If A is an m×r matrix and B is an r×n matrix, then the product AB is
the m×n matrix whose entries are determined as follows.
To find the entry in row i and column j of AB, single out row i from the matrix
A and column j from the matrix B. Multiply the corresponding entries from
the row and column together and then add up the resulting products
The definition of matrix multiplication requires that the number of columns of the
First factor A be the same as the number of rows of the second factor B in order
To form the product AB. If this condition is not satisfied, the product is undefined.
In general, if A  [aij ] is an mXr matrix and B  [bij ] is an rXn matrix, then
 a11 a12
a
 21 a22

AB  
 ai1 ai 2


 am1 am 2
a1r 
a2 r   b11 b12
 b21 b22

air  
  br1 br 2

air 
b1 j
b2 j
brj
The entry ( AB )ij in row i and column j of AB is given by
( AB)ij  ai1b1 j  ai 2b2 j  ai 3b3 j 
 air brj
b1n 
b2 n 


brn 
 1 3
B

2
5


 1 2
C

 4 0
Partitioned Matrices
A matrix can be subdivided or partitioned into smaller matrices by inserting
horizontal and vertical rules between selected rows and columns
Example
 a11 a12
A   a21 a22
 a31 a32
a13
a23
a33
a14 
 A11

a24   
A21

a34 
 a11 a12
A   a21 a22
 a31 a32
a13
a23
a33
a14   r1 
a24    r2 
a34   r3 
 a11 a12
A   a21 a22
 a31 a32
a13
a23
a33
a14 
a24   c1 c2
a34 
A12 

A22 
c3 c4 
Matrix Multiplication by Columns and by Rows
jth column matrix of AB = A [ jth column matrix of B ]
ith row matrix of AB = [ ith row matrix of A ] B
If a1, a2, … , am denote the row matrices of A and b1, b2, . . ., bn denote the
column matrices of B, then it follows that
AB  A b1 b2
 a1 
 a1 B 
a 
a B 
AB   2  B   2 
a 3 
a3 B 
 


a
a
B
 4
 4 
bn    Ab1
Ab2
Abn 
Example:
 1 3
A

 2 5
 1 2 
B

4
0


1 3  1 11
 2 5  4   18

   
 1 3  2   2 
 2 5  0    4 

   
 1 2
1
3
   4 0  11 2


 1 2
 2 5  4 0  18 4


11 2 
AB  

18
4


Matrix Products as Linear Combinations
Row and column matrices provide an alternative way of thinking about matrix
multiplication.
 a11
a
A   21
 ...

 am1
a12
a22
...
... a1n
... a2 n
... ...
am 2 ... amn
 a11 x1  a12 x2 
 a x a x 
AX   21 1 22 2


 am1 x1  am 2 x2 






 x1 
x 
x   2
 
 
 xn 
 a1n xn 
 a11 
 a21 
a 
a 
 a2 n xn 
 x1  21   x2  22  

 
 

 
 
 amn xn 
a
 m1 
 am 2 
 a1n 
a 
 xn  2 n 
 
 
 amn 
In words, the product Ax of a matrix A with a column matrix x is a linear combination
Of the column matrices of A with the coefficients coming from the matrix x
Example:
 2 5 11   3 
 2   5   11 

 
 4  1 10  1  8 

4
10
8

1

3

 
     
 3 9 7   1 
 3   9   7 

 
Similarly, you can show that
The product yA of a 1Xm matrix y with an mXn matrix A is a linear combination of the
Row matrices of A with scalar coefficients coming from y.
Example
 2 5 11   3 
3 1 1  4 10 8  1  32 5 11 1 4 10 8  13 9 7 
 3 9 7   1 

 
It follows that the jth column matrix of a product AB is a linear combination of the
Column matrices of A with the coefficients coming from the jth column of B.
Example:
 4 1 4 3
1 2 4  
 12 27 30 13
 2 6 0  0 1 3 1    8 4 26 12

 2 7 5 2 



12
1 
 2
 4
 8   4  2  0 6  2 0
 
 
 
 
 27  1   2
 4
 4  1  2  1  6   7  0 
     
 
30 
1   2
 4

4

3

5
 26
 2 6
0
 
   
 
13
1   2
 4
12  3  2  1  6   2  0 
 
   
 
Matrix Form of a Linear System
a11 x1  a12 x2  ...  a1n xn  b1
a21 x1  a22 x2  ...  a2 n xn  b2
...
am1 x1  am 2 x2  ...  amn xn  bm
 a11 x1  a12 x2 
a x a x 
 21 1 22 2


 am1 x1  am 2 x2 
 a11
a
 21
 ...

 am1
 a1n xn   b1 
 a2 n xn   b2 

  
  
 amn xn  bm 
a12
a22
...
... a1n
... a2 n
... ...
am 2
... amn
  x1   b1 
  x  b 
 2   2
   
   
  xn  bn 
Let
 a11
a
A   21
 ...

 am1
a12
a22
...
... a1n
... a2 n
... ...
am 2 ... amn






 b1 
 x1 
b 
x 
2
2
x    b   
 
 
 
bm 
 xn 
then the original system of linear equations can be replaced by the matrix equation
Ax=b
Here A is called the coefficient matrix.
Transpose of a Matrix
If A is any m×n matrix, then the transpose of A, denoted by AT , is defined to
be the n×m matrix that results from interchanging the rows and columns of A;
That is, the first column of AT is the first row of A, the second column of AT
is the second row of A, and so forth.
Example:
 2 7 4 
A

9 5 3
1 
2
B 
3
 
4
 1 7 0 
C   5 3 2 
 0 6 12 
2 9
AT   7 5 
 4 3
BT  1 2 3 4
 1 5 0 
C T   7 3 6 
 0 2 12 
Trace of a Matrix
If A is a square matrix, then the trace of A , denoted by tr(A), is defined to be the
sum of the entries on the main diagonal of A. The trace of A is undefined if A is
not a square matrix.
Example:
 1 7 0 
A   5 3 2 
 0 6 12 
tr ( A)  1  3  12  16
Related documents