Académique Documents
Professionnel Documents
Culture Documents
MDM WAN SULIZA WAN HUSAIN ROOM M008 ( NEAR CIMB ATM ) HP NUMBER :019-2197808 :019-
Matrix Algebra
What is matrix?
In this lecture, we will learn about the tools for solving linear systems of equations There are several methods we have learned before such as solving by graphical method,by using substitution and elimination method and etc.
Content
Matrix Determinant
Diagonal Method Cofactors Method
What is Matrix
A rectangular array of real (or complex) numbers arranged in m rows and n columns
Column
. . .
a 1n a 2n / a mn
Row
Identity matrix, I n
1 0 I2 ! 0 1
Matrix Addition
A is a m x n matrix and B is a m x n matrix C=A+B where cij ! aij bij for all i=1,2,,m ; j=1,2,,n
a11 a12 A ! a21 a22 a 31 a32 c11 c12 C ! c21 c22 c 31 c32 a13 a23 a33 b11 b12 B ! b21 b22 b 31 b32 a12 b12 a22 b22 a32 b32 b13 b23 b33 a13 b13 a23 b23 a33 b33
9
Example
2 6 1 3 1 1 A! 0 2 4 B ! 10 3 6
3 2 1 6 1 1 5 7 0 A B ! 0 10 2 3 4 6 ! 10 5 10
Matrix Subtraction
A is a m x n matrix and B is a m x n matrix C=A-B where cij ! aij bij for all i=1,2,,m ; j=1,2,,n
a11 A ! a21 a 31 c11 C ! c21 c 31 c12 c22 c32 a12 a22 a32 a13 a23 a33 b11 b12 B ! b21 b22 b 31 b32 a12 b12 a22 b22 a32 b32 b13 b23 b33 a13 b13 a23 b23 a33 b33
11
Example
2 6 1 3 1 1 A! 0 2 4 B ! 10 3 6
1 6 1 1 1 5 2 3 2 A B ! 0 10 2 ( 3 ) 4 6 ! 10 1 2
Scalar Multiplication
A is a m x n matrix and E is a scalar (real number) C=EA where for all i=1,2,,m ; j=1,2,,n
cij ! E v aij
Matrix Multiplication
A is a m x n matrix and B is a n x p matrix C = A X B ,where C is a m x p matrix
n
Where
for all i=1,2,,m ; j=1,2,,p To find the element cij (i-th row and j-th column of C = AB), we have to multiply each element in the i-th row of A by the corresponding element in the j-th column of B and add them together.
14
Matrix Multiplication
C11 from 1st row of A and 1st column of B [a11 a12 a13a1m] 1st row of A [b11 b21 b31bm1] 1st column of B C11= a11 b11 + a12 b21 + a13 b31 ++ a1m bm1
15
Example
A is a 2 x 3 matrix and B is a 3 x 3 matrix C = A X B, expect C is a 2 x 3 matrix Find determine C, elements by elements
1 2 3 A! 3 2 1
c13 c23
C11= a11 b11 + a12 b21 + a13 b31 = 1x1 + 2x0 + 3x(-1) = -2
16
Example
1 2 3 A! 3 2 1
1 0 2 c11 c12 B ! 0 2 1 C ! AB ! c 21 c22 1 3 2
c13 c23
C21= a21 b11 + a22 b21 + a23 b31 = 3x1 + 2x0 + 1x(-1) =2
1 2 3 A! 3 2 1
c13 c23
C12= a11 b12 + a12 b22 + a13 b32 = 1x0 + 2x2 + 3x3 = 13
17
Example
1 2 3 A! 3 2 1
1 0 2 c11 c12 B ! 0 2 1 C ! AB ! c 21 c22 1 3 2
c13 c23
C22= a21 b12 + a22 b22 + a23 b32 = 3x0 + 2x2 + 1x3 =7
1 2 3 A! 3 2 1
c13 c23
C13= a11 b13 + a12 b23 + a13 b33 = 1x(-2) + 2x1 + 3x2 =6
18
Example
1 0 2 c11 c12 1 2 3 B ! 0 2 1 C ! AB ! A! c 3 2 1 21 c22 1 3 2 C23= a21 b13 + a22 b23 + a23 b33 = 3x(-2) + 2x1 + 1x2 = -2
Plug in the computed elements back to C, we have 2 13 6 C ! AB ! 2 7 2
19
c13 c23
Example
0 0 A! 0 1
What is AxB?
0 0 B! 1 0
0 v 0 0 v1 0 v 0 0 v 0 0 0 AB ! 0 v 0 1v 1 0 v 0 1v 0 ! 1 0
What is BxA?
0 v 0 0 v 0 0 v 0 0 v1 0 0 BA ! 1v 0 0 v 0 1v 0 0 v 1 ! 0 0
Av B { B v A
20
Transpose
The transpose of a m x n matrix A, denoted T by A = B, is the n x m matrix where
bij ! a ji
E.g.
1 4 1 2 3 T A! 4 5 6 A ! 2 5 3 6 1 T B ! 2 3 B ! 2 1 3
21
Determinants
If A is square matrix then the determinant function is denoted by det and det(A) is defined to be the sum of all the signed elementary matrices of A.
a 11 det A ! A ! a 12 . a1n a 2n / a nn
The result of a determinant is a single number.
a 21 a 22 / / . a n1 a n2 .
Finding Determinants
Diagonal Method Determinant function for a 22 matrix.
Example 1
Compute the det(A) for the following matrix.
3 5 A! 4 2 3 5 det A ! ! 6 20 ! 26 4 2
Finding Determinants
Diagonal Method Determinant function for a 33 matrix.
a 11 a 12 B ! a 21 a 22 a 31 a 32
a 13 a 23 a 33
! a11a 22a 33 a12a 23a 31 a13a 21a 32 a 31a 22a 13 a 32a 23a11 a 33a 21a 12
Example 2
Compute the det(A) for the following matrix.
2 2 0 A ! 0 2 4 1 1 1
Example 2solution
B ! 2 -2 0 0 -2 -4 1 1 -1
! 4
8
0
0
- 8
0
B ! 20
a i j,
Ci j ! 1
M i j
i j
Example 3
For the following matrix compute the minor, M23 and the cofactor, C23
3 1 6 A ! 9 5 2 0 4 7
Example 3solution
Minor
M 23
Cofactor
3 1 6 3 1 ! 12 ! 9 5 2 ! 0 4 0 4 7
1
2 3
C 2 3 ! 1
M 2 3 ! 12
12
Finding Determinants
Method of Cofactors
If A is an nn matrix.
a 11
a 12 .
a 1n a 2n / a nn
a 21 a 22 A ! / / . a n1 a n2 .
Choose any row, then:
A ! a i1Ci1 a i 2 Ci 2 ..... a i n Ci n
Choose any column, then: cofactor
A ! a 1 jC1 j a 2 jC 2 j ..... a n jC n j
Example 4
Compute the det(A) for the following matrix.
2 2 0 A ! 0 2 4 1 1 1
Example 4solution
Choose first row, then:
2 2 0 A ! 0 2 4 1 1 1
M1
C12 - 0 2
13 A ! 22 11 1 2 2
M1
C 0
M13
C
!2
2 4 1
0 4 2 1 1 1
0
A ! 26 24 0 20
Example 5
Use elementary row operation to transform
1 3 1 0 2 4 into 0 1
Example 5solution
1 3 2 4
R2 : 2 3 1
2R 1 : 2 R 2 ! R 2 2 R1 0 10 0 1 3 R2 0 : 10 10 R 2 ! R 2 z 10
0 1 0 R1 : 1 R 1 ! R 1 3R 2 1 0
3R2 : 0 0 1 1 4 6 10 10 10 1 3 3 0
Inverse Matrix
If A is square matrix and we can find another matrix of the same size B, such that
A B ! B A ! In
Then we call A invertible and we say that B is an inverse of the matrix A
Remarks on
Inverse Matrix
Inverse matrix is only for square matrix The inverse for a matrix is unique The inverse of a matrix A is denoted as A-1 If A is invertible, then A is a non-singular matrix If A is not invertible, then A is a singular matrix
I2
1
Find row operations that will convert the first 2 columns into I2. The third and fourth columns should then contain A-1.
Example 6
Determine the inverse of matrix A.
1 3 A! 2 4
Example 6solution
Form a new matrix
1 3 1 0 2 4 0 1 1 3 1 0 R : 2 4 0 1
2R : 2 6 2 0 R 2 ! R 2 2 R1 0 10 2 1 0 10 - 2 1 1 3 1 0 : R R 2 ! 10 0 1 1 0 1 1 5 10
Matrix A
2 1 R2 10 0 -10 10 10 2 10 1 5 1 10
2
1 10
Example 6solution
R 1 ! R 1 3R 2
1 0
0 1
2 5 1 5
3 10 1 10
R 3R
:1 3 1 :0 3 1 0
3 5 2 5
0
3 10 3 10
1 A !
2 5 1 5
3 10 1 10
I3
1
Find row operations that will convert the first 3 columns into I3. The last three columns should then contain A-1.
d b c a
Example 7
Determine the inverse for the following matrix.
3 5 A! 4 2
1 2 5 ! v A ! 26 4 3 A
1
1 13 2 13
5 26 3 26