Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
MATRICES Definition A matrix is an array of numbers or symbols in rows or columns. A matrix is written between brackets, e.g. 2 3 1 0 4 7 is a 2 x 3 matrix since it has 2 rows and 3 columns. In general m x n matrix has m rows and n columns. A 1 x n matrix is called a row vector (a b c) a b c A m x 1 matrix is called a column vector If m = n the matrix is square If m n the matrix is rectangular We represent the general matrix in the following form: a11 a12 a13 a21 a22 a23 a31 a32 a33 The first subscript determines the row and the second the column in which the element is placed. A matrix in which all the elements are zero is called a NULL matrix. For example: 0 0 0 0 0 0 is a 3 x 2 null matrix. 1 Equality of matrices Two matrices are equal if and only if they are the same order and corresponding elements are equal. For example if a b c = 3 0 -1 d e f 2 7 5 2x3 2x3 a = 3, b = 0, c = -1, d = 2, e = 7, f = 5 Addition of matrices If A and B are m x n matrices the result of adding (or subtracting) A + B is an m x n matrix in which the elements are the sum (or difference) of the corresponding elements of A + B. For example 3 5 - 6 2 = -3 3 1 4 1 8 0 -4 Two matrices A and B are said to be conformable for addition and subtraction only if they are of the same order. Matrix Multiplication Two matrices A and B are said to be conformable for multiplication in the form AB only if the number of columns of A is equal to the number of rows of B. Also AB = C If A is an m x n matrix and B is n x r then C = m x r matrix. The multiplication procedure is : a11 a12 a13 b11 b12 a21 a22 a23 x b21 b22 2x3 b31 b32 3x2 [a11b11 + a12b21 + a13b31] [a21b11 + a22b21 + a23b31] + a12b22 + a13b32] [a21b12 + a22b22 + a23b32] [a11b12 2x2 2 If A = 2 0 1 4 and B = 3 4 -2 1 find AB and BA AB 2 0 3 4 1 4 -2 1 = (2 x 3 + 0 x-2) (2 x 4 + 0 x 1) (1 x 3 + 4 x –2) (1 x 4 + 4 x 1) = 6 8 -5 8 Find BA 3 4 2 0 = -2 1 1 4 Note AB BA Exercise 1. If A = 1 3 2 0 0 4 &B = 1 2 1 0 0 1 4 1 -1 2 1 3 3 2. If A = 1 2 1 3 4 6 &B =0 1 1 1 1 1 Find AB 3. If A = 4. 1 1 2 0 1 1 1 0 3 and B = a b c Find the simultaneous linear equations which are given in a matrix form by 1 1 2 x = 3 0 1 1 y 5 1 0 3 z -2 4 Answers to Exercises 1 to 4 1. 2. 3. 4. 3 4 10 14 5 2 7 3x -2y + 2z = 3 2x + y - z 5 x – 5y – 3z -2 6 9 12 16 23 30 26 37 48 5 Special Matrices Diagonal Matrices A diagonal matrix is a square matrix in which all the elements are zero except those in the principal diagonal. For example: 1 0 0 0 0 0 3 0 0 –7 0 0 0 is a 4 x 4 diagonal matrix. 0 0 4 Unit matrix denoted by I, is a diagonal matrix in which all the elements of the principal diagonal are all unity. For example I= 1 0 0 is a 3 x 3 matrix 0 1 0 0 0 1 If A is any square matrix and I is the unit matrix of the same order . AI = IA = A For example 3 -1 1 0 = (3 x 1 + -1 x 0) (3 x 0 + -1 x 1) 2 4 0 1 (2 x 1 + 4 x 0) ( 2 x 0 + 4 x 1) = 3 -1 2 4 1 0 3 -1 = 3 -1 0 1 2 4 2 4 Exercise Find A if A = (B + C)D and B= 2 -1 3 -1 2 -3 C= -1 3 -1 D = 0 -2 4 -2 1 0 1 3 -4 -1 1 2 6 Transpose of a matrix The transpose of a matrix is the matrix obtained by interchanging rows and columns in order. The transpose of A is denoted by A For example A= 3 1 0 4 5 -7 and A = 3 0 5 1 4 -7 Determinants A determinant is an array of numbers or symbols in rows and columns and is written between vertical lines. a c 1. 2. 3. 4. 5. 6. 7. b d or 1 3 5 or a11 a12 a13 2 1 4 a21 a22 a23 0 3 7 a31 a32 a33 The numbers or symbols are called elements Any horizontal set of elements is called a row Any vertical set of elements is called a column A determinant is always square i.e. no of rows = number of columns For subscripted elements aij i denotes the row and j the column The elements shown arrowed form the principle diagonal The first element in the first row (and column) is called the leasing element. The order of Determinants The order of a determinant is equal to the number of rows or column in the determininant. The above deternmininats are 2nd , 3rd and 3rd order respectively. Minors and Co-factors Minors Every element in a determninant has a minor. The monor of an element is the determinant obtained by striking out the row and column containing that element. For example consider: a b d e g h c f i The minor of d is The minor of I is b h a d c i b e 7 The minor of h is a d c f Co-Factors The co-factor of an element is called the minor with the correct sign attached to it. The sign depends upon the position of the element. The sign convention is: + - + - + + - + For example consider a b c d e f g h i The co-factor of d is – b c h i d is negative according to the sign position The co-factor of g is + b c e f g is positive according to the sign position The co-factor of f is – a b g h f is negative according to the sign position Expansion and Evaluation of a determinant A determinant can be expanded about any row or column.For example row 1 a1 b1 c1 = a1 b2 c2 - b1 a2 c2 +c1 a1 b2 a2 b2 c2 b3 c3 a3 c3 b3 c3 a3 b3 c3 column 2 expanded gives: - b1 a2 c2 + b2 a1 c1 - b3 a1 c1 a3 c3 a3 c3 a2 c2 Also b2 c2 = b2 x c3 – c2 x b3 b3 c3 8 Examples 1 Evaluate 2 Evaluate 3. = 3 1 2 = 3 x 4 – 2 x 1= 10 4 4 1 = 4 x 1 – 1 x –2 = 6 -2 1 1 0 2 3 4 -1 0 3 5 Evaluate About row 1 = 1 4 -1 - 0 3 -1 + 2 3 3 5 0 5 0 4 3 = 1(4 x 5 –(-1 x 3) – 0 + 2(3 x 3 – 4 x 0 ) = 23 + 18 = 41 Exercises 1. Evaluate 3 7 2 = 1 2 Evaluate -3 -2 = -1 4 3. = 1 2 1 0 -3 4 3 5 1 Evaluate Answers 1. 2. 3. -11 –14 10 9 Determinant of a square Matrix The determinant of a square matrix is the determinant with the same elements as the matrix. The determinant of A is denoted by det A or A. 3 2 4 -1 If A = det A = 3 2 = (3 x –1) – (2 x 4) = -11 4 -1 2 1 show that A -I = 0 1 1 If A = becomes 2 - 3 + 1 = 0 show that A satisfies the matrix equation A2 – 3A + I = 0 Also if B is a matrix such that BA = I use this equation to find B A -I = 2 1 - 1 0 Note remember I is the unit matrix 1 1 0 1 = 2 1 - 0 1 1 0 = 2 - 1- 0 1 - 0 1 - = 2- 1 1 1 - So A -I = 2 - 1 1 1- = ((2 - ) x (1 - ) – 1 x 1) = 2 - 2 - + 2 – 1 10 = 1 - 3 + 2 So if A Then 1 -I = 0 - 3 + 2 = 0 A2 = 2 1 2 1 = 5 (2 x 2 + 1 x 1) 1 1 1 1 (1x 2 + 1 x 1) (1 x 1 + 1 x 1) = 5 3 3 2 3A = 3 2 1 = 6 3 1 1 3 3 So A2 – 3A + 1 = 5 3 - 6 3 + 1 0 3 2 3 3 0 1 = 0 0 0 0 Now A2 – 3A + I = 0 And BA = I which is the unit matrix. Multiplying the above equation through by B gives: BA2 – 3BA + IB = 0 now BI = B remember multiplying by the unit matrix leaves the matrix unchanged. i.e. BAA – 3BA + B = 0 since BA = I the equation becomes IA – 3I + B = 0 So A – 3I + B = 0 B = 3I – A =3 1 0 - 2 1 = 3 0 - 2 1 = 1 -1 0 1 1 1 0 3 1 1 -1 2 11 Adjoint Matrix The adjoint matrix of a square matrix A is the matrix whose elements are the cofactors of the corresponding elements of det A Let A = a1 b1 c1 a2 b2 c2 a3 b3 c3 Now A = a1 a2 a3 b1 b2 b 3 c1 c2 c3 Adj A = + b2 b3 c2 c3 - b1 b3 + b1 b2 c1 c3 c1 c2 - a2 a3 + a1 a3 - a1 a2 c2 c3 c1 c3 c1 c2 + a2 a3 - a1 a3 + a1 a2 b2 b3 b1 b3 b1 b2 Examples If A = 3 2 find adj A evaluate det A and A adj A 1 4 1. A = 3 1 adj A = 4 -2 2 4 -1 3 det A 3 -2 = 12 – 2 = 10 1 4 A adjA = 3 2 4 -2 = (3 x 4 + 1 x-2) (3 x –2 + 2 x 3) 1 4 -1 3 (1 x 4 + 4 x-1) (1 x –2 + 4 x 3) 12 A adjA = 10 0 = 101 0 0 10 0 1 AadjA = detA I 2. Let A = 1 2 0 3 -1 4 2 0 6 Now A = 1 3 2 2 -1 0 0 4 6 Adj A = + -1 0 4 6 - 2 0 0 + 2 -1 6 0 4 - 3 2 +1 4 6 0 2 - 1 6 0 + 3 2 - 1 -1 0 2 2 + 1 3 0 2 -1 So adj A = -6 -12 8 -10 6 -4 2 4 -7 det A = 1 2 3 -1 2 0 det A = 1 3 4 0 4 6 -1 4 - 2 3 4 + 0 0 6 2 6 = 1(((-1 x 6) – 0 ) –2((3 x 6) – (4 x 2))) = -26 13 AadjA = 1 2 0 3 -1 4 2 0 6 -6 -12 8 -10 6 -4 2 4 -7 = (-6 –20 + 0) (-12 –12 + 0) (8 –8 + 0 ) (-18 +10 + 8) (-36 -6 + 16) (24 + 4 - 28) (-12 +0 - 12) (-24 +0 + 24) (16 + 0 - 42) = -26 0 0 0 -26 0 0 0 -26 = -26 1 0 0 1 0 0 0 0 1 = detAI Exercises 1. If A = 2. A= 2 3 -1 1 2 -1 4 -4 0 2 find AdjA detA and evaluate AadjA 3 6 3 Find adjA Answers 1. 5 0 0 5 2. adjA = -24 9 6 -12 6 0 8 -4 -4 14 Inverse of a Square matrix If A and B are square matrices such that AB = I = BA Then B is called the inverse of A and is written A-1. Now we have seen that AadjA = det AI So 1 = A adjA = I detA Hence A-1 = 1 x adjA detA Example 3 1 1. If A = A = 5 3 3 5 1 3 3 -5 -1 3 adj A = 3 5 = 3 x 3 – (-5 x -1) = 4 detA = 1 3 A-1 = 1 x adjA = det A = 2. find A-1 If A = 1 3 2 1 3 -5 4 -1 3 3/4 -5/4 -1/4 3/4 2 0 -1 4 0 6 15 6 -10 2 Adj A = detA = -12 8 6 -4 4 -7 -26 A-1 = -1 6 -12 8 26 -10 6 -4 2 4 -7 Exercise If A = 1 2 3 2 3 3 Ans A-1 = 1 3 2 4 6 1 7 –2 -5 -3 3 find A-1 -5 4 1 16 Example Find the current in each branch of the network shown. 2 I1 4 I2 4V 7 4V 10V Using Maxwell’s cyclic currents -4 - 2I1 – 4(I1- I2) + 10 = 0 -4 - 6 I1 + 4I1 + 10 = 0 6 - 6 I1 + 4I1 = 0 6 = 6 I1 - 4I1----------------------------------------------------------(1) -4 - 7I2 – 4(I2- I1)-10= 0 -4 + 4I1 - 11I2 - 10 = 0 -14 = -4I1 + 11I2-----------------------------------------------------(2) In Matrix form R IC = V 6 -4 I1 = 6 -4 11 I2 -14 R IC V RIc = V R-1RIc = R-1V Ic = R-1V 17