* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Example
Survey
Document related concepts
Transcript
2. Matrix Algebra 2.1. Introduction A matrix of order m x n or an m x n matrix is a rectangular array of numbers having m rows and n columns. It can be written a11 a 21 A . . a m1 a12 a 22 am2 ... a1n ... a 2 n . aij . ... a mn The mn numbers a11 , ..., amn are called the elements of the matrix. The notation a ij denotes that this element of A is in the ith row and jth column. A matrix with only one row is called a row matrix or row vector while a matrix with only one T column is a column matrix or column vector. These will be written x and x respectively. A matrix with n rows and n columns is a square matrix of order n. The elements a11 , a12 ,..., ann are the diagonal elements. Two matrices A and B are equal iff they have the same number of rows and columns and aij bij for all i and j . Addition: The sum of two m x n matrices A [a ij ] and B [bij ] is the m x n matrix C [cij ] where cij aij bij for i = 1, 2, …., m; j = 1, 2, …, n. We write C = A + B. The zero matrix 0 has all elements zero. Scalar multiplication: The product of an m x n matrix A [a ij ] with a scalar (number) q is 1 qA Aq [qaij ] i.e. every element of A is multiplied by q. The matrix A [ aij ] is the negative of A. We note that with these definitions, the following properties hold: 1. A B B A 2. A ( B C ) ( A B ) C 3. A 0 A 4. A ( A) 0 5. q( A B ) qA qB 6. ( p q) A pA qA 7. ( pq) A p( qA) 8. 1A A Thus the set of all m x n matrices forms a vector space. The dimension is mn and the set of matrices Ers , r 1,2,...., m ; s 1,2,...., n where ers 1 and all other elements are zero is the natural basis. The transpose A T of an m x n matrix A is the n x m matrix obtained by interchanging the rows and columns of A. Let A be a real square matrix it is said to be symmetric if AT A and skew-symmetric if AT A . A diagonal matrix has all elements not on the diagonal zero i.e. aij 0 if i j . The n n unit matrix I or I n [ ij ] is a diagonal matrix with all its diagonal elements unity. The product of an m x n matrix A with an n p matrix B is the m p matrix C = AB with elements n cij aik bkj i 1,2,..., m ; j 1,2,....., p k 1 Note that the matrix multiplication is only possible if the number of columns of A is the same as the number of rows of B. i.e. the matrices are conformable. The element c ij is the dot product of the ith row of A and the jth column of B considering them as vectors in the vector space R n . Matrix multiplication has the following properties: 2 1. 2. ( qA) B q( AB) A( qB ), normally w irtten as qAB A( BC ) ( AB)C , normally w ritten as ABC 3. 4. A( B C ) AB AC ( A B )C AC BC Note however that 1. 2. AB BA in general AB 0 A 0 or B 0 Example – Linear Transformations Suppose a point ( x1 , x2 ) in the plane transforms to the point ( y1 , y2 ) with a different coordinate system according to the rule y1 a11 x1 a12 x 2 y 2 a 21 x1 a 22 x 2 This is known as a linear transformation and may be represented by the matrix equation a12 x1 y a y Ax or 1 11 y 2 a21 a22 x2 For example, if we rotate the plane rectangular Cartesian coordinates ( x1 , x2 ) through an angle to give ( y1 , y2 ) , we find x2 y2 P(x1, x2) (y1, y2) y1 θ x1 y1 x1 cos x 2 sin y 2 x1 sin x 2 cos cos A sin sin cos If 30 , the point (2,3) in the ( x1 , x2 ) coordinate system has ( y1 , y2 ) coordinates, 3 y1 3 / 2 y 2 1/ 2 1 / 2 2 3 3 / 2 3 / 2 3 1 3 3 / 2 If the point ( x1 , x2 ) has coordinates (w1 , w2 ) in another coordinate system and they are related by x1 b11w1 b12 w2 x 2 b11w1 b12 w2 or x Bw then the ( y1 , y2 ) coordinates may be related directly to the (w1 , w2 ) coordinates by y1 a11 (b11 w1 b12 w2 ) a12 (b21 w1 b22 w2 ) y 2 a 21 (b11 w1 b12 w2 ) a 22 (b21w1 b22 w2 ) or y1 (a11b11 a12b21 ) w1 (a11b12 a12b22 ) w2 y 2 (a 21b11 a 22b21 ) w1 (a 21b12 a 22b22 ) w2 In terms of our definition of matrix multiplication this is consistent with y Ax and Example x B w giving y AB w Two-port networks Consider the following 2-port (4-terminal) networks with an impedance Z in series and parallel respectively: i1 i2 i1 i2 Z v1 v2 v1 Z i1 i2 v1 v2 v1 v2 i2 Z v2 (i1 i2 ) Z v2 v=potential i=current Z=impedance (Ohm' s Law) or in matrix terms v1 1 z v2 i 0 1 i 2 1 or in matrix terms v1 1 0 v2 i 1 / Z 1 i 2 1 In each ease the 2 2 matrix is known as the transmission matrix for the network. 4 If two two-point networks are connected in cascade with transmission matrices T1 and T2 respectively: i1 v1 i2 T1 i3 i2 v2 T2 v3 then the combined transmission matrix will be T1T2 since v1 v 2 i T1 i 1 2 and v 3 v 2 i T2 i 2 3 hence v 3 v1 i T1T2 i 1 3 You may check that this is true in the particular case of (a) – take Z Z1 and (b) – take Z Z 2 connected in cascade. Similarly any number of networks connected in cascade may be analyzed in this way. 2.2 Determinants Every square matrix A has a number associated with it called the determinant of A, written as det(A) or A . For a 2 2 matrix a12 a11 a12 a A 11 , A a11a22 a12a21 a21 a22 a21 a22 For a 3 3 matrix 5 a11 a12 a13 A a 21 a 22 a 23 , a31 a32 a33 a11 a12 a13 A a 21 a 22 a31 a32 a 23 a11 a33 a 22 a 23 a32 a33 a12 a 21 a 23 a31 a33 a13 a 21 a 22 a31 a32 a11 A11 a12 A12 a13 A13 where Aij is the cofactor of element aij , and Aij ( 1) i j M ij where M ij is the minor of the element a ij and is the determinant of that submatrix of A obtained by deleting the ith row and jth column of A. A above was expanded by the first row although we could have similarly expanded by any row or column to give the same result. For an n n matrix, we have A ai1 Ai1 ai 2 Ai 2 ... ain Ain by row : by column : A a1 j A1 j a 2 j A2 j ... a nj Anj i 1,2,..... or n j 1,2,..... or n which defines A in terms of (n 1) (n 1) determinants, each of which is then defined in terms of (n 2) (n 2) determinants etc. Properties (i) A = AT i.e. rows and columns may be interchanged. (ii) If all the elements in a row (or column) are zero, then A = 0. (iii) Interchanging any two rows (or columns) reverses the sign of A . (iv) If corresponding elements in any two rows (or columns) are proportional then A = 0. (v) The value of a determinant is unchanged if a multiple of one row (or column) is added to another row (or column). (vi) AB A B , both A and B must be square matrices. 6 (vii) If the elements in any row (or column) are multiplied by a number, then A is multiplied by that number. Note that kA k n A (viii) ( k A ) . A = 0 if the rows (or columns) are linearly dependent. Determinants are not of great practical use as they are expensive to compute, but are of theoretical value. 2.3 Systems of Linear Equations A set of equations of the form a11 x1 a12 x2 ... a1n xn b1 a 21 x1 a 22 x2 ... a 2 n xn b2 a m1 x1 a m 2 x2 ... a mn xn bm is called a system of m linear equations in n unknowns, x1 , x2 ,..., x n . The numbers a ij are the coefficients of the system and are given. The “right-hand side” numbers b1 , b2 ,..., bm are also given. If all the bi are zero the system is homogeneous otherwise it is inhomogeneous. A solution is a set of numbers x1 , x2 ,..., x n satisfying all m equations. The system may be written in matrix form Ax b where a11 a 21 A . . a m1 a12 a 22 am2 ... a1n ... a 2 n . , . ... a mn coefficient matrix x1 x 2 x . , . xn b1 b 2 b . . bm solution vector right-hand side vector The m ( n 1) matrix 7 a11 a B ( A, b) 21 . a m1 b1 b2 is known as the augmented matrix of the system. The solution a m 2 ... a mn bm of a system of linear equations is not changed by (a) (b) (c) a12 a 22 ... a1n ... a 2 n interchanging any two equations, multiplying any equation by a non-zero constant, adding a constant multiple of one equation to another equation. If instead of equations we consider the augmented matrix of the system, we may define the following elementary row operations (a) (b) (c) interchanging any two rows (type 1), multiplying any row by a non-zero constant (type 2), adding a constant multiple of one row to another row (type 3). An elementary matrix is a square matrix obtained by applying an elementary row operation on the identity matrix I. Accordingly, there are three types of elementary matrices. 1 1 0 0 1 1 0 (type 1) 0 1 1 0 0 1 1 1 1 (type 2) c , c 0 1 1 8 1 1 c (type 3) or c 1 1 The matrix obtained by applying an elementary row operation on a matrix A is exactly equal to EA, where E is the elementary matrix corresponding to the on elementary row operation. Two matrices are row equivalent if one may be obtained from the other in a finite number of elementary row operations. Clearly two augmented matrices which are row equivalent may represent systems of linear equations with the same solution. Gaussian Elimination This method (and variations of it) is the most popular method of solving system of linear equations on a computer. Example x1 4 x 2 2 x3 3 1 4 2 : 3 r1 2 2 1 : 1 r 2 3 1 2 : 11 r3 2 x1 2 x 2 x3 1 3x1 x 2 2 x3 11 Elimination Stage: r2 2r1 r3 3r1 1 4 2 : 3 r1 0 10 5 : 5 r 2a 0 11 8 : 2 r3a r3a (11 / 10)r2 a 1 4 2 : 3 r1 0 10 5 : 5 r 2a 0 0 2.5 : 7.5 r3b x1 4 x 2 2 x3 3 10 x 2 5 x3 5 2.5 x3 7.5 The system is now in upper triangular form and we proceed with the back substitution finding x1 , x 2 , x3 in reverse order: x3 3, x2 2, x1 1 9 For n 3 the method proceeds in the same way, reducing those elements below the diagonal in a column to zero by subtracting multiples of a row. At an intermediate stage of the elimination we have, col. r a11 0 0 row r . . . 0 a12 ... ( 2) 22 ( 2) 2r a 0 ... a1n . ( 2) 2n . . . a .. a rr( r ) ... a 0 . a r( r)1r ... 0 a nr( r ) 0 ... a1r ... a rn( r ) . . (r ) ... a nn . . . b1 b2( 2 ) br( r ) . . bn( r ) a rr(r ) is known as the pivot. a r( r)1r is reduced to zero by subtracting (a r( r)1r / a rr( r ) ) times row r from row r+1, and similarly for the other elements a r( r)2 r ,..., a nr( r ) in the rth column. If a rr(r ) = 0, then row r cannot be used as the pivot and rth is interchanged with some row below it. In practice, in order to minimize the growth of rounding errors in a computer algorithm for this method, row r is interchanged with that row below it for which air( r ) (i r , r 1,..., n) is largest. This ensures that the multipliers (air( r ) / a rr( r ) ) are all 1 in modulus and is known as partial pivoting. In the above we have assumed n equations in the n unknowns and that there is a unique solution. There are other possibilities. If a system of equations has at least one solution, we say the equations are consistent, otherwise they are inconsistent. Example Take m n 2 10 x+y=1 y x+y=0 y x+y=1 x-y=0 x y x+y=1 2 x + 2y = 2 x no solution (inconsistent) one solution (consistent) x infinitely many solutions (consistent) Let us view these sets of equations in 2 different ways which will give us some insight into the more general results given later. A. In each case the equations are equivalent to: 1 1 1 (a) x y , 1 1 0 1 1 1 (b) x y , 1 1 0 1 1 1 (c) x y 2 2 2 For a solution to exist the right-hand side vector b must be a linear combination of the vectors formed by the columns of A. If the columns of A are themselves linearly dependent then that solution will not be unique. B. Performing elementary row operations: 1 (a) 1 1 0 1 1 1 0 1 1 0 1 1 1 1 (b) 1 - 1 0 1 1 1 0 - 2 1 1 (c) 2 1 0 1 1 2 2 1 1 0 0 In case (a) the last equation gives 0 = -1 which shows that there is no solution. In case (b) there is a unique solution y = 0.5, x = 0.5. In case (c) a row of zeros has been produced which means that y may be assigned arbitrarily, say y = k and then x = 1-k for any value of k. A matrix is said to be in row echelon form if (i) the first k rows of it are nonzero and the rest are zero; (ii) the first nonzero entry a ini of the i th (i=1,…,k) row is 1 ; these entries are called pivots (the first nonzero entry a ini of the i th (i=1,…,k) row sometimes need not be 1) ; (iii) the pivot of each row is to the right of the pivots of the preceding rows. In addition, a matrix is said to be in reduced row echelon form if (iv) it is in row echelon form and 11 the pivots are the only nonzero entries in their columns. Example The matrices, 2 3 1 4 0 10 5 5 , 1 1 1 0 0 1 2.5 7.5 0 0 , 1 1 1 0 2 1 , 1 2 0 3 1 1 1 0 0 0 , 0 0 1 2 0 0 0 0 1 2 0 3 1 1 1 are all in row echelon form and , 0 0 1 2 are in reduced row echelon form. 0 0 0 0 0 0 0 Recall that a set of vectors is linearly independent if none of the vectors can be written as a linear combination of the other vectors in the set. Example [1, 4, -2, 3] , [2, -2, 1, 1] , [3, 1, 2, 11] are linearly independent since a [1, 4, -2, 3] + b[2, -2, 1, 1] + c[3, 1, 2, 11] = [0,0,0,0,] gives a + 2b + 3c = 0 Using Gaussian elimination the only 4a – 2b + c = 0 solution is -2a + b + 2c = 0 3a + b + 11c = 0 a = b = c = 0. Example [1, 4, -2, 3] , [0, -10, 5, -5] , [0, 0, 2.5, 7.5] are linearly independent, since a[1, 4, -2, 3] + b[0, -10, 5, -5] + c[0, 0, 2.5, 7.5] = [0,0,0,0] gives a =0 4a – 10b =0 -2a + 5b + 2.5c = 0 3a – 5b + 7.5c = 0 Directly we see that the only solution is a = b = c = 0. Note that these vectors are the rows of the echelon form of the matrix whose rows are the vectors of the previous example. It is clear that if a matrix is in echelon form, the non-zero rows are all linearly independent. The rank of a matrix A, denoted by rank A, is the maximum number of linearly independent row vectors. 12 Example 1 4 2 3 A 0 10 5 5 , rank A = 3 0 0 2.5 7.5 1 1 1 A , rank A = 1 2 2 2 Theorem Row equivalent matrices have the same rank. Proof: Not required. Theorem Matrices A and AT have the same rank. Proof: Not required. As a result of the theorem, the maximum number of linearly independent row vectors of A is the same as the maximum number of linearly independent columns vectors of A. The rank of a matrix A may also be defined as the maximum number of linearly independent column vectors of A. Example 1 4 2 3 2 2 1 1 2 11 3 1 2 3 1 4 0 10 5 5 2.5 7.5 0 0 Both have rank 3. This result gives us a practical method of finding the rank of a matrix – we reduce it to echelon form. The idea of rank enables us to determine the existence and uniqueness or otherwise of solutions of systems of linear equations. Theorem Suppose we have a system of m equations in n unknowns represented by Ax = b with augmented matrix (A, b) = B. 13 The equations have: (a) a unique solution iff rank A = rank B = n; (b) an infinite number of solutions iff rank A = rank B < n; (c) no solution iff rank A < rank B. Proof: We perform elementary row operations to reduce B to echelon form (Gaussian elimination). The results will be illustrated in the case of 5 (=m) equations in 4 (=n) unknowns. (a) x x x x . x 0 x x x . x 0 0 x x . x x – denotes a non-zero element 0 0 0 x . x 0 0 0 0 . 0 Then rank A = rank B = n (= 4 in this case) and the system has a unique solution. (b) x x x x . x 0 x x x . x 0 0 x x . x 0 0 0 0 . 0 0 0 0 0 . 0 Here rank A = rank B < n (rank A = rank B = 3) x 4 may be assigned arbitrarily and x1 , x2 and x3 determined in terms of x 4 . Hence the solution is not unique. More generally if rank A = rank B = r < n then n – r unknowns may be assigned arbitrarily. (c) x x x x . x 0 x x x . x 0 0 0 0 . x 0 0 0 0 . 0 0 0 0 0 . 0 Here rank A < rank B (2 < 3) and the system is inconsistent. Homogeneous Equations (i) a homogeneous system (b = 0) always has rank A = rank B and the trivial solution x = 0. If rank A < n this solution is not unique. (ii) If there are fewer equations than unknowns (m < n) a homogeneous system always has non-trivial solutions, since rank A = rank B m n . 14 Ax=b, A is m by n No inhomogeneous Is rank A = No Is b =0? Yes homogeneous No solution rank B? Yes Infinite number of solutions Is m n ? No Is rank A = n? ? No Yes Is rank A No =n? Yes Unique solution Example Consider the system x1 2 x2 3x3 1 3x1 x2 2 x3 7 5 x1 3x2 ax3 b for various values of a and b. 15 1 2 3 . 1 r1 3 1 2 . 7 r 2 5 3 a . b r3 3 . 1 1 2 0 7 11 . 10 r3a r2 a 0 0 a 4 . b 5 3 . 1 1 2 r2 3r1 0 7 11 . 10 r3 5r1 0 7 a 15 . b 5 r1 r2 a r2b r1 r2 a r3b If a 4 , then rank A = rank B = 3 and there is a unique solution. (i) i.e. a 0, b 9 gives x3 1, x2 1 / 7, x1 12 / 7 If a 4 and b 5 , then rank A = rank B = 2 and there are infinitely many solutions. (ii) x3 k (say), x2 (11k 10), x1 (13 k ) / 7 . If a 4 and b 5 , then rank A = 2 < 3 = rank B and there is no solution. (iii) Efficiency Cramer’s rule may be used for solving Ax b when n is small, say n = 2 or n = 3, but is not efficient for large n. If we count the number of multiplications and division required for a method, we have for large n: Gaussian elimination – about n 3 / 3 Cramer’s rule - about (n+1)! Example For a 25 25 system of equations (small for engineering and science problems) we have: Method Gaussian Elimination Cramer’s Rule Operations Time on a CRAY 2 3 10 6 5208 4 10 26 8 10 9 secs years!!!! Determinants The fastest way to evaluate a determinant is to reduce the matrix to upper triangular form, U, using Gaussian elimination. Then det A (1) r product of diagonal elements of U where r = number of row interchanges. 16 Even using this method of evaluation, Cramer’s rule requires (n+1) determinants ie (n+1) reductions to upper triangular form, whereas Gaussian elimination requires only one reduction followed by a relatively cheap back substitution. 2.4 Inverse Matrix The inverse of a square n n matrix A is denoted by A 1 and is an n n matrix such that AA1 A1 A I , where I is the n n unit matrix. If A has an inverse, then A is called a non-singular matrix, otherwise A is a singular matrix. Properties (i) (ii) (iii) If A has an inverse it is unique ( AB) 1 B 1 A 1 ( AT ) 1 ( A 1 ) T (iv) (v) The inverse of a symmetric matrix is symmetric det( A 1 ) (det( A)) 1 (vi) (vii) (viii) A 1 exists iff rank A = n A 1 exists iff det( A) 0 ( A 1 ) 1 A ( A 1 Although A 1 often appears during the manipulation of matrix expressions, it is not usually the case that A 1 is needed explicitly. For example, in the solution of the linear equations Ax = b The solution x may be expressed as x A 1 b However x is actually computed using Gaussian elimination and we never need to know A 1 . If A 1 is needed, it may be found by performing elementary row operations simultaneously on A and I. We are seeking the matrix X ( A 1 ) such that AX I , X A1 I A1 Thus the columns of X are the solutions of A x i j , where i j is the jth column of the unit matrix I. Hence we simultaneously solve n sets of linear equations, each with the same matrix A but with a different column of I as the right-hand-side vector. Example 1 3 1 Find the inverse of A 15 6 5 5 2 2 17 A I 1 3 1 15 6 5 5 2 2 -1 1 3 r2 5r1 0 1 0 r3 5r1 / 3 0 - 1/3 1/3 . 1 0 0 r1 . 0 1 0 r2 . 0 0 1 r3 . 1 0 0 r1 . 5 1 0 r2 a . - 5/3 0 1 r3a 1 . 1 0 0 3 - 1 0 1 0 . 5 1 0 r3a r2 a / 3 0 0 1/3 . 0 1/3 1 r1 r2 a r3b We may now carry out 3 separate back substitutions to find the three columns of A 1 . Alternatively, but equivalently, we may continue to use row operations to further reduce A to the unit matrix I as follows: r1 3r3b 3 1 0 . 1 1 3 0 1 0 . 5 1 0 0 0 1 / 3 . 0 1 / 3 1 I A 1 r1a r2 a r3a r1a r2 a , r1b / 3 1 0 0 . 2 0 1 0 1 0 . 5 1 0 3r3b 0 0 1 . 0 1 3 Check AA1 A1 A I Note if A a11 a12 a 21 a 22 , A-1 1 a 22 detA a 21 a11 a 22 a12 and if A a11 with a11 , a 22 , , a nn 0 then 1/a11 1 / a 22 1 A . . 1 / a nn 18 . . , a diagonal matrix a nn Example 1 3 1 Let A 2 2 3 . 3 1 4 (a) Find A1 using elementary row operations to reduce A to I. (b) Express A and A1 as products of elementary matrices. Sol: 1 3 1 0 0 3 1 0 0 3 1 0 0 1 1 1 1 1 3 2 1 0 ~ 0 2 5 3 0 1 2 2 3 0 1 0 r ~2 r 0 0 r r 3 r23 3r11 0 2 5 3 0 1 2 3 0 0 1 4 0 0 1 3 2 1 0 0 1 1 3 1 0 0 1 1 3 1 0 ~1 0 1 5 / 2 3 / 2 0 1 / 2 1~ 0 1 5 / 2 3 / 2 0 1 / 2 r2 r 2 0 3 3 0 0 1 2 / 3 1 / 3 0 0 0 3 2 1 1 0 1 0 0 5 / 6 1/ 6 1/ 2 1 1 0 1 ~5 0 1 0 1 / 6 5 / 6 1 / 2 ~ 0 1 0 1 / 6 5 / 6 1 / 2 r r r2 r3 1 20 0 1 2 / 3 2 0 0 1 2 / 3 1 / 3 0 1/ 3 0 r1 3 r3 So 5 / 6 1/ 6 1/ 2 A 1/ 6 5 / 6 1/ 2 2/3 1/ 3 0 1 (b) Observing the above we have E8 E7 E6 E5 E 4 E3 E 2 E1 A 1 3 1 1 0 1 0 3 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 5 1 0 1 0 0 1 0 0 1 0 1 0 0 0 0 0 1 0 1 0 2 1 0 2 2 2 2 1 0 0 1 0 0 1 1 4 0 0 1 0 1 0 3 0 1 0 0 1 3 0 0 1 0 0 3 1 0 0 0 1 0 0 0 1 19 Thus A1 E8 E7 E6 E5 E 4 E3 E2 E1 1 1 0 1 0 3 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 . 5 1 0 1 0 0 1 0 0 1 0 1 0 0 0 0 0 1 0 1 0 2 1 0 2 2 1 0 0 1 0 0 1 0 0 0 0 1 0 1 0 3 0 1 0 0 1 0 0 1 3 And A E8 E7 E6 E5 E 4 E3 E 2 E1 1 1 1 0 0 1 1 1 1 1 1 1 1 1 0 1 0 E8 E7 E6 E5 E 4 E3 E 2 E1 E1 E 2 E3 E 4 E5 E6 E7 E8 0 0 1 1 1 1 0 0 1 0 0 1 0 0 1 0 1 2 1 0 0 1 0 0 0 1 0 2 0 0 1 3 0 1 0 1 0 0 0 0 0 1 1 1 1 0 0 1 0 0 1 1 0 3 1 1 1 0 1 5 0 1 0 0 1 0 1 0 0 1 0 2 1 0 0 0 0 1 0 0 1 0 0 1 3 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 2 1 0 0 1 0 0 0 1 0 2 0 0 1 0 0 1 0 0 1 3 0 1 0 1 0 0 0 1 0 0 3 0 0 0 1 0 3 1 1 0 5 0 1 0 0 1 0 2 1 0 0 1 0 0 1 2.5 Partitioned Matrices It can be convenient to partition a matrix into submatrices by horizontal and vertical lines as illustrated by: a11 a12 a a22 A 21 . . a31 a32 a13 a23 . a33 . a14 . a24 . . . a34 a a where A11 11 12 a21 a22 . a15 . a25 . . . a35 a16 a26 A11 . A21 a36 a13 , A22 a34 a23 , A12 A22 A13 A23 etc. All the usual matrix operations of addition, multiplication etc may be performed on partitioned matrices as if the submatrices were single elements, as long as the matrices are partitioned such that it is permissable to form the various operations. 20 Example 3 1 If A is as above, A 2 A11 1 A21 A12 2 A13 A22 A23 (1,2,3 – denote numbers of rows/columns in each submatrix) then A may be added to a ( 3 6 ) matrix B partitioned in the same way or multiplied by a ( 6 n ) matrix C partitioned as 3 C11n 2 A11C11 A12n C 21 A13C31 C 1 C21 , AC 1 A21C11 A22C21 A23C31 2 C31 In fact C may be partitioned vertically in any way to give a similar vertical partition of AC. Example 1 2 . 5 A A11 3 4 . 6 6 7 . 8 4 5 . 9 B 11 B . . . . B21 1 2 . 3 A12 B12 B22 AB A11B11 A12 B21 A11B12 A12 B22 . 1 2 8 5 1 2 6 7 5 3 1 2 . 3 4 9 6 3 4 4 5 6 14 17 5 10 . 26 15 19 27 . 41 34 41 6 12 . 60 18 40 53 . 78 21