MATRICES A matrix is defined as a rectangular array of numbers. Examples are: 1 2 4 a b 1 4 5 A : B : C 0 1 3 c b 1 6 2 2 5 8 The numbers or letters in any given matrix are called its entries or elements ORDER OF A MATRIX A matrix is defined by its order. A matrix defined as m n matrix, read m by n matrix implies that there are m rows and n columns of numbers or entries in the matrix. In the examples above : 1. A has 2 rows and 2 columns A is a 2 2 matrix. 2. B has 2 rows and 3 columns B is a 2 3 matrix. 3. C has 3 rows and 3 columns C is a 3 3 matrix. A n n matrix is called a square matrix of order n. SQUARE MATRIX This is a matrix with the same number of rows as the columns. ( ) 1 3 5 1 0 Eg. X ; Y 6 2 7 4 2 2 4 1 ZERO(NULL)MATRIX A matrix of any order which has all its entries to be zero. ( ) 0 0 Eg. ; ( 0 0 0 ) etc 0 0 UNIT OR IDENTITY MATRIX This is a square matrix which has all entries in its leading diagonals to be ones and all other entries to be zeroes. ( ) 1 0 0 1 0 Eg. ; 0 1 0 0 1 0 0 1 COLUMN MATRIX This is a matrix with only one column. ( ) a Eg. M M is a 2 1 column matrix. b a N b N is a 3 1 column matrix. c 1
ROW MATRIX This is a matrix with only one row. Eg. D ( 2 6 4 9 ) D is a 1 4 row matrix. EQUAL MATRIX Two matrices X and Y are said to be equal if and only if they have the same number of rows and the same number of columns(ie. if they are of the same order) and the corresponding entries or elements in the two matrices are the same. x y z a b c Eg. Given that; A and B u v w d e f Eg. If A if AB, then, xa ; ud yb ; ve zc ; wf x 1 3 2 z 1 4 2 y u 5 find the values for u, x, y and z ( ) ( ) x 1 3 2 z 1 4 2 y u 5 x 1 2 x 3 z 1 3 z 4 2 y 5 y 3 u -4 ADDITION AND SUBTRACTION OF MATRICES If A and B are matrices with the same order,then the sum or difference of A and B is the matrix of the same order as A and B and whose entries are the sum or difference of the corresponding entries of A and B. u v a b Eg. If X and Y, then s t c d ( ) u v a b u a v b XY s t c d s c t d ( ) u v a b u a v b X-Y - s t c d s c t d Eg.1 Given that M find (i). MN ( ) 1 2 3, N 4 0 5 ( 2 1 ) 4 3 2 3 2
(ii) M-N ( ) 1 2 3 (i). MN 4 0 5 ( ) 1 2 3 (ii) M-N - 4 0 5 ( ) 2 1 4 3 2 3 ( ) 2 1 4 3 2 3 ( 1 3 ) 1 1 2 8 ( 3 1 ) 7 7 2 2 TRANSPOSE OF A MATRIX If the rows and columns of a matrix are interchanged ie; the first row becomes the first column. the second row becomes the second column. third row becomes the third column. etc Then the new matrix formed is called the transpose of the original matrix. If A is the original matrix, its transpose is denoted by A T. Eg. 4 6 i. If A 7 9, then A T 2 5 ( 4 7 ) 2 6 9 5 2 4 ii. If M 6 5, then M T 2 7 ( 2 6 ) 2 4 5 7 1 iii. If N 2, then N T ( 1 2 0 ) 0 1 7 6 1 5 0 iv. If X 5 2 4, then X T 7 2 1 0 1 3 6 4 3 SCALAR MULTIPLICATION If k is any real number and A is any matrix, then the product, ka is a matrix whose entries are the products ( of the ) entries of A and the factor k. a b Eg. If A c d ( ) a b then ka k c d 3
( ) ka kb kc kd EXAMPLES: ( ) 3 5 If A and B 2 4 Find i. 4A-3B ii. 5A2B ( ) 2 3 4 2 SOLUTION: ( ) 3 5 2 3 12 20 6 9 18 11 i. 4A-3B 4-3 - 2 4 4 2 8 16 12 6 4 22 ( ) 3 5 2 3 15 25 4 6 11 31 ii. 5A2B 5 2 2 4 4 2 10 20 8 4 18 16 MULTIPICATION OF MATRICES If the order of matrix A is a m n and the order of matrix B is n r, then A and B are said to be conformable matrices for multiplication. Thus the number of columns for the first matrix the number of rows of the second matrix. AB (m n) (n r) multiplication is possible m r (order of resulting matrix). For BA (n r) (m n), multiplication is not possible since since the number of columns of matrix B number of rows of matrix A. Thus, AB BA. Multiplication of matrices is not commutative. a b e f Example: A and B c d g h ( ) a b e f ae bg af bh AB c d g h ce dg cf dh 1 3 1 4 2 3 1 Exercise 1: Given that A, B and C 2 5 find; 3 2 0 1 2 4 0 (i) AB (ii) AC (iii) BC (iv) BA ( ) 1 4 2 3 1 1(2) 4(0) 1(3) 4(1) 1(1) 4(2) (i) 3 2 0 1 2 3(2) 2(0) 3(3) 2(1) 3(1) 2(2) ( ) 2 0 3 4 1 8 6 0 9 2 3 4 ( ) 2 7 7 6 11 1 4
( ) 3 1 4 (ii) AC 1 2 5 3 2 4 0 AC is not possible or A and C are not conformable matrices because the number of columns of A number of rows of B. ( ) 3 2 3 1 (iii) BC 1 2 5 0 1 2 ( 4 0 ) 2(1) 3(2) (1)(4) 2(3) 3(5)(1)(0) ( 0(1) 1(2) 2(4) ) 0(3) 1(5) 2(0) 2 6 4 6 15 0 ( 0 2 ) 8 0 5 0 4 9 10 5 2 3 1 1 4 (iv) BA 0 1 2 3 2 Multiplication is not possible. The matrices are non conformable since number of columns of B number of rows of A. DETERMINANT OF A 2x2 MATRIX ( ) a b If A, then the determinant of A which is written as det A or A is given by c d det A A ad - bc. Determinants can only be found when the matrices are square matrices. 2 4 4 3 7 2 1 3 Example: A ; B ; C ; D 3 1 8 6 9 5 5 7 det A A 2 4 3 1 (2)(1) (3)(4) 2 12-14 det B B 4 3 8 6 (4)(6) (8)(3) -24 24 0 det C C 7 2 9 5 (7)(5) (9)(2) 35-18 17 det D D 1 3 5 7 (1)(7) (5)(3) 7-15 -8 DETERMINANT OF A 3X3 MATRIX a b c Given that A d e f. We note that the entries of a 3x3 matrix are g h i associated with the rule of alternating signs. 5
det A A a e h OR det A A a e h f i - b d g f i - d b h f i c d e g h c i g b c e f 5 2 1 Eg.1 If A 0 6 3, find det A. 8 4 7 5 2 1 det A A 0 6 3 8 4 7 Using the value of alternating signs det A A 5 6 3 4 7-2 0 3 8 7 1 0 6 8 4 5(42-12) - 2(0-24) 1(0-48) 5(30) - 2(-24) 1(-48) 150 48-48 150 5 0 8 Eg.2 Find 2 6 4 1 3 7 5 0 8 2 6 4 1 3 7 5 6 4 3 7-0 2 4 1 7 8 2 6 1 3 5(42-12) - 0(14-4) 8(6-6) 5(30) - 0 8(0) 150 Eg.3 Find the determinant of A if 3 2 5 A 4 7 9 1 8 6 Using the rule of alternating signs 6
3 2 5 det A A 4 7 9 1 8 6 3 7 9 8 6-2 4 9 1 6 5 4 7 1 8 3(42-72) - 2(24-9) 5(32-7) 3(-30) - 2(15) 5(25) -90-30 125 5 NOTE: A matrix whose determinant is zero is called a Singular matrix. COFACTORS OF A MATRIX a 11 a 12 a 13 If A a 21 a 22 a 23 a 31 a 32 a 33 we can form a determinant of its elements.each gives rise to a cofactor,which is simply the minor of the element in the determinant together with its place sign in the rule of the alternating signs. 2 3 5 2 3 5 Let us consider eg. A 4 1 6, det A A 4 1 6 1 4 0 1 4 0 The minor of 2 1 6 4 0 (1(0) - 4(6)) 0-24 -24 The minor of the element 3-4 6 1 0 - (4(0) - 1(6)) 0 6 6 The minor of the element 6-2 3 1 4 - (2(4) - 1(3)) -(8-3) -5 THE ADJOINT OF A MATRIX The adjoint of a matrix is the transpose of the cofactors of the matrix. The adjoint of A adj.a 2 3 5 Given A 4 1 6 1 4 0 2 3 5 det A A 4 1 6 1 4 0 a 11 a 12 a 13 Let C a 21 a 22 a 23, a 31 a 32 a 33 7
a 11, Cofactor of 2 1 6 4 0 (0-24) -24 a 12, Cofactor of 3-4 6 1 0 - (0-6) 6 a 13, Cofactor of 5 4 1 1 4 (16-1) 15 a 21, Cofactor of 4-3 5 4 0 - (0-20) 20 a 22, Cofactor of 1 2 5 1 0 (0-5) -5 a 23, Cofactor of 6-2 3 1 4 -(8-3) -5 a 31, Cofactor of 1 3 5 1 6 (18-5) 13 a 32, Cofactor of 4-2 5 4 6 (12-20) 8 a 33, Cofactor of 0 2 3 4 1 (2-12) -10 24 6 15 Cofactor of matrix A 20 5 5 13 8 10 The adjoint of the matrix A which is the transpose of the cofactor of matrix A written as A T is given by : 24 20 13 adj. A A T 6 5 8 15 5 10 Eg. 2 5 2 1 Given A 3 1 4, find the adjoint of A. 4 6 3 5 2 1 A 3 1 4, 4 6 3 Cofactors of A 8
1 4 6 3 3 4 4 3 3 1 4 6 2 1 6 3 5 1 4 3 5 2 4 6 2 1 1 4 5 1 3 4 5 2 3 1 (1(3) 6(4)) (3(3) 4(4)) (3(6) 4(1)) (2(3) 6(1)) (5(3) 4(1)) (5(6) 4(2)) (2(4) 1(1)) (5(4) 3(1)) (5(1) 3(2)) (3 24) (9 16) (18 4) (6 6) (15 4) (30 8) (8 1) (20 3) (5 6) 21 7 14 0 11 22 7 17 1 Transposing the cofactors of A we get the adjoint of A. 21 0 7 adjoint of A adj. A 7 11 17 14 22 1 Thus, to find the adjoint of a square matrix A; i. we form the matrix of cofactors. ii. we transpose the matrix of cofactors to get the adjoint of A. Exercise: Find the adjoint of the following matrices: 2 3 5 1 2 3 1. A 4 1 6 ; B 4 1 5 1 4 0 6 0 2 2 7 4 1 2 1 2. C 3 1 6 ; D 3 4 2 5 0 8 5 3 5 2 4 7 2 1 3 3. E 22 16 7 ; F 1 3 1 6 12 7 2 2 5 THE INVERSE OF A 2X2 MATRIX If A and B are nxn matrices such that ABBAI, where I is the identity matrix, then A and B are multiplicative inverses of each other. B is called the multiplicative inverse of A and is denoted by A 1. ( ) a b If A, then A c d 1 1 deta ( d b c a ). 9
NOTE: If a matrix A is such that A 1 A, then A is called a Self-Inverse matrix. Whenever the determinant of a given matrix is 0(zero), the matrix has no inverse. A matrix whose determinant is zero (Singular matrix). ( ) 2 3 Eg 1: If A, 1 2 then A 1 1 deta ( 2 ) 3 1 2 det A A ( 2(2) - (1)(3)) 4 (3) 4 3 1 A 1 1 2 3 2 3 1 1 2 1 2 4 3 2 7 Eg 2. If S and T 2 5 5 6 find i. S ii. T iii. S 1 iv. T 1 i. S 4 3 2 5 (4 5) (2 (3)) 20 6 26 ii. T 2 7 5 6 (-2 (6)) (5 7) 12 35 23 iii. S 1 1 ( ) 5 3 1 ( ) 5 3 S 2 4 26 2 4 iv. T 1 1 ( ) 6 7 1 ( ) 6 7 T 5 2 23 5 2 SOLVING TWO SYSTEMS OF LINEAR EQUATIONS USING MATRIX METHOD Eg.1 2x 3y 4 x 2y 3 10
Expressing ( ) the ( eqns ) as ( a) single matrix we have 2 3 x 4 1 2 y 3 The matrix is in the form Ax B, where A Premultiplying both sides by A 1, A 1 Ax A 1 B x A 1 B since A 1 A I ( ) 2 3 A 1 2 det A 2(2) 1(3) -4 3-1 A 1 1 ( ) 2 3 1 ( ) 2 3 - deta 1 2 1 1 2 x A 1 B ( ) 2(4) (3)(3) 1(4) (2)(3) x ( ) x y 2 3 4 1 2 3 ( ) 1 2 Thus x 1 and y 2 ( ) 8 9 4 6 ( ) 1 2 ( ) 2 3 ; x 1 2 ( ) 2 3 1 2 Eg. 2 Solve 5x 3y 19 and 3x 4y 6 by matrix methods. Expressing ( ) ( the ) equations ( ) in matrix forms yields; 5 3 x 19 3 4 y 6 Let A ( ) 5 3 ; x 3 4 ( ) x ; B y Ax B Pre-multiplying both sides by A 1, A 1 Ax A 1 B x A 1 B since A 1 A I A 1 1 deta ( 4 ) 3 3 5 det A [5(4) 3(3)] 20 9 29 A 1 1 ( ) 4 3 29 3 5 ( ) 19 6 ( ) x ; B y ( ) 2 3 1 2 ( ) 4 3 11
Thus x ( ) x A y 1 1 29 4 3 19 3 5 6 ( 4(19) 3(6) ) 1 29 (3)(19) 5(6) 1 ( ) 76 18 29 57 30 1 58 2 29 87 3 x 2 and y 3 Exercise Solve the following systems of linear equations using matrix methods. 1. 3x 2y 12, 5x - 3y 1 2. 2x - 3y 7, 4x 5y 3 3. 2x - 5y 8, 3x - 7y 11 4. 2x - 3y 7, 4x 5y 3 5. 9x - 4y 7, 3x - 8y -1 THE INVERSE OF A 3 3 MATRIX To form the inverse of a 3 3 matrix, a. Evaluate the determinant of the matrix,say A, det A A. b. Form a matrix of the cofactors of the entries of A. c. Write the transpose of the cofactors of the entries of A to obtain the adjoint of A. d. Divide (c) by det A or A. e. The resulting matrix is the inverse, A 1 of the original matrix A. Inverse of A, A 1 1 deta (adjoint of A) 1 2 3 Eg. 1 If A 4 1 5, find A 1 6 0 2 A 1 1 5 0 2-2 4 5 6 2 3 4 1 6 0 (1(2) 0(5)) 2(4(2) 6(5)) 3(4(0) 6(1)) 2 2(8 30) 3(6) 2 44 18 12
A 28 1 5 0 2 4 5 6 2 4 1 6 0 Cofactors of A 2 3 0 2 1 3 6 2 1 2 6 0 2 3 1 5 1 3 4 5 1 2 4 1 (1(2) 0(5)) (4(2) 6(5)) (4(0) 6(1)) (2(2) 0(3)) (1(2) 6(3)) (1(0) 6(2)) (2(5) 1(3)) (1(5) 4(3)) (1(1) 4(2)) (2 0) (8 30) (0 6) (4 0) (2 18) (0 12) (10 3) (5 12) (1 8) 2 22 6 4 16 12 7 7 7 Let the cofactors of A be denoted by C 2 22 6 C 4 16 12 7 7 7 2 4 7 Thus C T adjoint of A 22 16 7 6 12 7 A 1 1 (adjoint of A) deta 1 28 2 4 7 22 16 7 6 12 7 Eg 2. Find the inverse A 1 of A if 2 7 4 A 3 1 6 5 0 8 A 2 1 6 0 8-7 3 6 5 8 4 3 1 5 0 2(1(8) 0(6)) 7(3(8) 5(6)) 4(3(0) 5(1)) 13
2(8) 7(24 30) 4(5) 16 7(6) 20 16 42 20 38 A 38 1 6 0 8 3 6 5 8 3 1 5 0 Cofactors of A 7 4 0 8 2 4 5 8 2 7 5 0 7 4 1 6 2 4 3 6 2 7 3 1 (1(8) 0(6)) (3(8) 5(6)) (3(0) 5(1)) (7(8) 0(4)) (2(8) 5(4)) (2(0) 5(7)) (7(6) 1(4)) (2(6) 3(4)) (2(1) 3(7)) (8 0) (24 30) (0 5) (56 0) (16 20) (0 35) (42 4) (12 12) (2 21) 8 6 5 56 4 35 38 0 19 Adjoint of A Transpose of the cofactors of A 8 56 38 6 4 0 5 35 19 A 1 1 (adjoint of A) deta 1 8 56 38 6 4 0 38 5 35 19 Note: AA 1 A 1 A I SOLUTION OF A SET OF THREE LINEAR EQUATION Eg.1 X A 1 B x 2y z 4 3x 4y 2z 2 5x 3y 5z 1 Writing in matrix form, we have; 14
1 2 1 x 4 3 4 2 y 2 5 3 5 z 1 1 2 1 x 4 Let A 3 4 2 ; X y ; B 2 5 3 5 z 1 AX B Pre-multiplying by A 1 A 1 AX A 1 B X A 1 B 1 2 1 A 3 4 2 5 3 5 1 4 2 3 5-2 3 2 5 5 1 3 4 5 3 (20 6) 2(15 10) (9 20) 14 50 29 35 4 2 3 5 3 2 5 5 3 4 5 3 Cofactors of A 2 1 3 5 1 1 5 5 1 2 5 3 2 1 4 2 1 1 3 2 1 2 3 4 (20 6) (15 10) (9 20) (10 3) (5 5) (3 10) (4 4) (2 3) (4 6) 14 25 29 7 0 7 0 5 10 Adjoint of A Transpose of the cofactors of A 14 7 0 25 0 5 29 7 10 A 1 1 (adjoint of A) deta 1 14 7 0 25 0 5 35 29 7 10 1 35 14 7 0 25 0 5 29 7 10 x X y 1 14 7 0 4 25 0 5 2 35 z 29 7 10 1 15
x X y 1 14(4) 7(2) 0(1) 25(4) 0(2) (5)(1) 35 z (29)(4) (7)(2) 10(1) 1 56 14 0 100 0 5 1 70 105 35 35 116 14 10 140 x 2; y 3; z -4 Eg.2 2x 1 x 2 3x 3 2 x 1 3x 2 x 3 11 2x 1 2x 2 5x 3 3 Writing in matrix form, we have; 2 1 3 x 1 2 1 3 1 x 2 11 2 2 5 x 3 3 2 1 3 x 1 2 Let A 1 3 1 ; X x 2 ; B 11 2 2 5 x 3 3 AX B Pre-multiplying by A 1 A 1 AX A 1 B X A 1 B 2 1 3 A 1 3 1 2 2 5 2 3 1 2 5 - (-1) 1 1 2 5 3 1 2 2 2 2(15 2) (5 (2)) 3(2 4) 26 7 24 9 3 1 2 5 1 1 2 5 1 3 2 2 Cofactors of A 1 3 2 5 2 3 2 5 2 1 2 2 1 3 3 1 2 3 1 1 2 1 1 3 (15 2) (5 2) (2 6) (5 6) (10 6) (4 2) (1 9) (2 3) (6 1) 16
13 7 8 1 4 2 8 5 7 Adjoint of A Transpose of the cofactors of A 13 1 8 7 4 5 8 2 7 A 1 1 (adjoint of A) deta 1 9 13 1 8 7 4 5 8 2 7 x 1 X x 2 1 9 x 3 x 1 X x 2 1 9 x 3 13 1 8 2 7 4 5 11 8 2 7 3 13(2) (1)(11) (8)(3) (7)(2) 4(11) 5(3) (8)(2) 2(11) 7(3) 1 26 11 24 14 44 15 1 9 1 45 5 9 9 16 22 21 27 3 x 1; x 2 5; x 3 3 Exercises: Solve the following systems of linear equations using matrix methods: 1. 2x 1 4x 2 5x 3 7 x 1 3x 2 x 3 10 3x 1 5x 2 3x 3 2 2. x 1 3x 2 2x 3 3 2x 1 x 2 3x 3 8 5x 1 2x 2 x 3 29 3. x 1 2x 2 3x 3 5 3x 1 x 2 2x 3 8 4x 1 6x 2 4x 3 2 17