0 Linear Algebra Review For Abstract Algebra Neil Sigmon Contents 1. Matrices…..……………………………………………………………………page 1 2. Equality of Matrices…………………………………………………………. page 1 3. Special Types of Matrices – Vectors…………………………………………page 2 4. Addition, Subtraction and Scalar Multiplication of Matrices……………..page 2 5. Matrix Multiplication…………………………………………………………page 3 6. Addition and Multiplicative Identity Matrices……………………………..page 6 7. Upper Triangular and Diagonal Matrices…………………………………..page 6 8. Determinants…………………………………………………………………..page 7 9. Matrix Inverses………………………………………………………………..page 9 1 1. Matrices A matrix is a rectangular array of numbers (usually real) made up of rows and columns. The size of a matrix is its (# rows) (# columns). Example 1: Here are some various matrices with different sizes: 5 10 0 1 A (Size: 2 4) 3 2 5 1 2 100 B 1 / 5 1 (Size: 3 2) 1 2 / 5 C 3 4 8 1 (Size: 1 4) 0 D 1 (Size: 3 1) 4 To indicate an individual entry in a matrix, we use the notation a ij (represents the element in the i th row and j th column of the matrix A) Thus, we have for 5 10 0 1 A ( a12 10, a 23 5 ) and for C 3 4 8 1 ( c12 4, c14 1 ) 3 2 5 1 A general matrix A of size m n has the form a11 a A 21 a m1 a12 a 22 am2 a1n a 2n a mn A square matrix is a matrix where (# rows) = (# columns) or m = n. When this is case, we say the matrix is a square matrix of order n. Here are some examples of square matrices: 1 2 5 1 (2 2 square matrix of order 2) 8 1 0 2 3 1 (3 3 square matrix of order 3). 1 / 2 0 10 2. Equality of Matrices Two matrices A and B are equal (written A = B) if they have the same size and their corresponding entries are equal, that is aij bij for all i and j. 2 3 4 3 4 2 3 1 0 2 , B , C Example 2: Given the matrices A , and 1 / 2 3 5 1 1 2 2 / 4 3 5 2 1 / 2 D 3 3 , then A=C. However, A B since these matrices do not have equal corresponding 4 5 entries and A D since the matrix sizes are not equal (A is a 2 3 matrix and D is a 3 2 matrix). 3. Special Types of Matrices – Vectors A row vector is a matrix with one row. A column vector is a matrix with one column. 0 Example 3: The matrix C 3 4 8 1 is a 1 4 row vector and the matrix D 1 is a 3 1 column 4 vector. 4. Addition, Subtraction and Scalar Multiplication of Matrices Matrices can only be added and subtracted if they have the same size. To add or subtract matrices, we add or subtract each corresponding component. 2 1 1 2 3 4 Example 4: Given the 2 3 matrices A and B , we see that 1 1 4 3 1 2 2 1 A B 1 1 and 2 1 A B 1 1 1 2 3 4 2 2 1 (3) 1 4 4 2 5 4 3 1 2 1 (3) 1 1 4 (2) 4 0 2 1 2 3 4 2 2 1 (3) 1 4 0 4 3 . 4 3 1 2 1 (3) 1 1 4 (2) 2 2 6 1 0 2 3 Example 5: Given the 2 2 matrix A and the 3 2 matrix B 2 1 , the matrix A B is not 1 0 1 1 defined since A and B are not of the same size. When working with matrices, numbers are referred to as scalars. To multiply a matrix by a scalar, we multiply each entry of the matrix by the given scalar. 2 3 2 3 (3)( 2) (3)(3) 6 9 Example 6: Let A , then 3A 3 . 1 2 1 2 (3)(1) (3)( 2) 3 6 3 2 0 5 / 2 Example 7: Let A 2 1 and B 1 2 , then 5 0 3 1 3 3 2 0 5 / 2 15 10 0 5 15 15 5 A 2 B 5 2 1 21 2 10 5 2 4 8 1 . 5 0 3 1 25 0 6 2 19 2 Matrix addition and scalar multiplication have certain basic properties that we now summarize Addition and Scalar Multiplication Properties of Matrices Let A, B, and C be matrices of the same size and c and d be scalars. 1. A + B = B + A (matrix addition is commutative) 2. ( A B) C A ( B C ) (matrix addition is associative) 3. cd(A) = c(dA). 4. c ( A B) = c A + c B 5. Matrix Multiplication To understand matrix multiplication, one must first understand how to multiply a row vector times a b11 b column vector. If A a11, a12 , , a1n is a 1 n row vector and B 21 is a n 1 column vector, then b n1 the product of A and B is the scalar produced by multiplying each corresponding entry of A and B and adding. That is b11 b AB a11, a12 , , a1n 21 a11b11 a12b21 a1n bn1 . bn1 3 5 Example 8: If A 1 1 0 4 and B , then 1 1 3 5 AB 1 1 0 4 (1)(3) (1)( 5) (0)(1) 4(1) 3 5 0 4 4 . 1 1 Multiplication of matrices in general involves multiple multiplications of rows and columns. If A is a m n matrix and B is a n p matrix, the product C=AB is the matrix where each element cij is made up of the product of the i th row of the left matrix A multiplied to the j th column of the right matrix B. That is, c ij (row i of A) (column j of B) . Note! For the matrix product AB to exist, the number of columns of the left matrix A must equal to the number of rows in the right matrix B. The size of the product will be (the number of rows in A) (the number of columns in B). It can be easier to see this by examining the following: 4 C A B mn n p must equal Size of Product m p 1 3 1 0 2 Example 9: If A and B , then the size (2 3) of the product AB is obtained 0 2 1 2 3 by observing: A B 2 2 23 are equal Size of Product 23 The 2 3 matrix AB is computing by performing the following row column multiplications: (row 1 A) (column 1 B) (row 1 AB (row 2 A) (column 1 B) (row 2 Performing these multiplications, we obtain: 1 3 1 0 2 (1)(1) (3)( 1) AB 0 2 1 2 3 (0)(1) (2)( 1) A) (column 2 B) (row 1 A) (column 3 B) . A) (column 2 B) (row 2 A) (column 3 B) (1)( 0) (3)( 2) (1)( 2) (3)(3) 4 6 11 . (0)( 0) (2)( 2) (0)( 2) (2)(3) 2 4 6 3 0 1 1 0 Example 10: For the matrices, A 1 1 , B , after observing from 2 5 1 1 0 A B 3 2 23 are equal Size of Product 3 3 that the size of the product is a 3 3 matrix, we obtain the product AB by computing: 3 0 (3)(1) (0)( 2) (3)( 1) (0)( 5) (3)( 0) (0)(1) 3 3 0 1 1 0 AB 1 1 (1)( 1) (1)( 5) (1)( 0) (1)(1) 3 6 1 . (1)(1) (1)( 2) 2 5 1 (1)(1) (0)( 2) (1)( 1) (0)( 5) (1)( 0) (0)(1) 1 1 0 1 0 To compute the product BA , we observe B A 23 3 2 are equal Size of Product 22 5 and compute 3 0 1 1 0 (1)(3) (1)(1) (0)( 1) (1)( 0) (1)(1) (0)( 0) 2 1 BA 1 1 . 2 5 1 1 0 (2)(3) (5)(1) (1)( 1) (2)(0) (5)(1) (1)( 0) 0 5 3 0 1 1 0 2 1 1 , one can immediately see by Example 11: Consider the matrices A and B 2 5 1 5 1 0 observing A B 2 4 3 2 not equal that the product AB does not exist (the number of columns in the left matrix A (4) is not equal to the number or rows in the right matrix B (3). However, by seeing B A 3 2 2 4 are equal Size of Product 3 4 the product BA is the 3 4 matrix given by 3 0 3 3 0 6 1 1 0 2 BA 1 1 3 6 1 7 . 2 5 1 5 1 0 1 1 0 2 The previous two examples illustrate a very important fact when multiplying matrices: FACT: In general, matrix multiplication is not commutative, that is, given matrices A and B, it is true in most cases that AB BA . However, matrices that are multiplied do have several properties that are summarized: Multiplicative Properties of Matrices Let A, B, and C be matrices whose sizes are multiplicatively compatible, c a scalar. 1. ( AB)C A( BC ) (matrix multiplication is associative) 2. A( B C ) AB AC . 3. ( A B)C AC BC . 4. c (AB) = (c A) B = A(cB) 6 6. Addition and Multiplicative Identity Matrices The zero matrix is a m n matrix make up of all zeros. The following examples represent 2 2 , 3 2 , 2 4 zero matrices 0 0 0 0 0 0 0 0 0 0 , 0 0 , 0 0 0 0 0 0 22 24 32 The zero matrix represents the additive identity matrix of all matrices under the addition operation. If A is a m n matrix and 0 is a m n zero matrix, then A + 0 = 0 + A = A. The multiplicative identity matrix, usually referred to just the identity matrix I, is the n n matrix defined by 1 0 0 0 0 1 0 0 I 0 0 1 0 . 0 0 0 0 1 Note that I has 1’s on the main diagonal and 0’s elsewhere. The following represent a 2 2 , 3 3 , and 4 4 identity matrices: 1 0 0 0 1 0 0 0 1 0 0 1 0 0 1 0 , . , 0 1 0 0 1 0 0 0 1 22 0 0 0 1 33 44 Since I serves as the multiplicative identity, if A is a m n matrix, then AI = IA = A. Note that I is always a square matrix, that is, the number of rows equals the number of columns. Of course, the size of I is dependent on the size of A when multiplying on the left and right as the next example demonstrates. 1 2 0 Example 12: Given the 2 3 matrix A , to be multiplicatively compatible, the size of the 1 1 2 identity I on the left must be 2 2 and on the right 3 3 . This gives 1 0 0 1 0 1 2 0 1 2 0 1 2 0 1 2 0 IA A and AI 0 1 0 A. 0 1 1 1 2 1 1 2 1 1 2 0 0 1 1 1 2 7. Upper Triangular and Diagonal Matrices A square matrix is upper triangular if all entries below the main diagonal are zero. A diagonal matrix is a special case of an upper triangular matrix where entries both above and below the main diagonal are zero. The general form of each matrix looks like: 7 a11 a12 0 a 22 0 0 0 0 a1n a 23 a 2 n a 33 a 3n 0 0 0 a nn a13 upper triangular b11 0 0 b 22 0 0 0 0 0 0 0 0 b33 0 0 0 0 0 0 0 0 b nn diagonal 0 5 0 0 2 1 3 0 2 0 0 The matrix A 0 1 4 is an example of a upper triangular matrix while B is an 0 0 3 0 0 0 3 0 0 0 1 example of a diagonal matrix. Two important facts are evident when concerned with upper triangular and diagonal matrices: 1. The sum or difference of two upper triangular matrices is an upper triangular matrix and the sum or difference of two diagonal matrices is a diagonal matrix. 2. The product of two upper triangular matrices is an upper triangular matrix and the product of two diagonal matrices is a diagonal matrix. 2 1 3 3 1 0 Example 13: Given the two upper triangular matrices A1 0 1 4 and A2 0 1 1 and two 0 0 3 0 0 2 0 0 5 0 0 5 0 0 0 2 0 0 2 0 0 0 and B diagonal matrices B1 , one can readily verify the following 2 0 0 3 0 0 0 3 0 0 0 0 1 0 0 0 1 sums and products: 0 10 0 0 1 0 3 6 3 7 0 4 0 0 , and A1 A2 0 2 5 , A1 A2 0 1 9 , B1 B 2 0 0 6 0 0 0 5 0 0 6 0 0 0 2 25 0 0 0 0 4 0 0 B1 B 2 0 0 9 0 9 9 0 1 8. Determinants a12 a The determinant of a 2 2 matrix A 11 is given by a 21 a 22 det(A) a11a 22 a 21a12 . 3 1 Example 14: The determinant of the matrix A is: 5 2 det( A) (3)( 2) (5)(1) 6 5 11. 8 2 2 Example 15: The determinant of the matrix A is: 4 3 det( A) (2)(3) (4)( 2) 6 8 6 8 14. A fact to note is that the determinant of a 11 matrix is defined to be the entry of the matrix. For example, if A [3] , then det( A) 3 . Another important note to make is that is possible to take determinants of larger size square matrices (larger than 2 2 ). However, this will not be necessary for most purposes except when we are dealing with diagonal and upper triangular matrices defined above. If we have an upper triangular and diagonal matrix of the form: 0 b11 0 a1n a11 a12 0 a 0 b 22 0 a 22 2 n and B , A 0 0 0 0 a nn 0 0 0 0 b nn then the determinant is defined to be the product of the main diagonal elements, that is det( A) a11 a 22 a nn and det(B) b11 b22 bnn . 2 1 3 Example 16: Given the upper triangular matrix A 0 1 4 and diagonal matrix 0 0 3 0 5 0 0 0 2 0 0 B , we see that det( A) (2)(1)(3) 6 and det(B) (5)( 2)( 3)( 1) 30 . 0 0 3 0 0 0 0 1 An important property concerning the determinant of the product of two matrices is the following: det( AB) det( A) det(B) 1 Example 17: For the matrices A 2 compute det( A) 0 , det(B) 6 , and 2 1 2 5 2 and B , one can verify that AB and 4 3 0 10 4 det( AB) 0 . Thus one can see that 0 det( AB) det( A) det(B) (6)(0) 0 . However, this distributive property does not in general hold for the sum of two matrices, that is, in general: det( A B) det( A) det(B) 1 Example 18: For the matrices A 2 compute det( A) 0 , det(B) 6 , and 2 1 2 0 4 and B , one can verify that A B 5 4 and 4 3 0 det( A B) 20 . Thus one can see that 20 det( A B) det( A) det(B) 6 0 6 . 9 9. Matrix Inverses Matrices defined with addition have an obvious inverse. Given a matrix A, its additive inverse is defined to be the matrix –A, where all the elements of A are negated. Note that A + (-A) = 0, where 0 is the zero matrix. We are more interested however with the multiplicative inverse of a matrix, or inverse for short. The inverse of a n n matrix A , if it exists, is denoted by A 1 , and is defined to be the n n matrix where AA 1 A 1 A I , where I is the n n identity matrix. It can be shown that A 1 is unique. Note the inverse only exists for square matrices where the row and column number are the same. 3 / 5 1 / 5 1 1 Example 19: To show that A 1 is the inverse of the matrix A , one computes 2 / 5 1 / 5 2 3 3 / 5 1 / 5 1 1 3 / 5 2 / 5 3 / 5 3 / 5 1 0 A 1 A . A similar calculation can be 2 / 5 1 / 5 2 3 2 / 5 2 / 5 2 / 5 3 / 5 0 1 shown for AA 1 I . Given a matrix A , how do we know if A 1 exists, and if it does, how can we calculate A 1 ? For matrices larger than 2 2 , the recommended method involves a method involving row reduction. However, for 2 2 matrices, there is a method based upon the following: a12 a 1 FACT: For a given 2 2 matrix A 11 , the matrix A exists only if det(A) 0 . If this is so, a a 22 21 the inverse of the matrix is defined to be: A 1 1 a 22 a12 . det( A) a 21 a11 Note that the matrix part of the formula for A 1 is obtained by switching the main diagonal elements and negating the back diagonal elements. 2 1 Example 20: Given the matrix A , we see that det( A) (2)(3) (3)(1) 3 0 . Hence the inverse 3 3 1 3 1 1 1 / 3 exists and A 1 . 3 3 2 1 2 / 3 1 2 1 Example 21: Given the matrix A , one can quickly see that det( A) 4 4 0 . Therefore, A 2 4 does not exist. 10 5 0 Example 22: Given the diagonal matrix B 0 0 0 2 0 0 , one can see that det(B) (5)( 2)(0)( 1) 0 . 0 0 0 0 0 1 0 0 2 1 3 Thus B 1 does not exist. For the upper triangular matrix A 0 1 4 , one can see that 0 0 3 det(A) (2)(1)(3) 6 0 . Thus A 1 exists, although row reduction methods are needed to verify that A 1 1 / 2 1 / 2 1 / 6 0 1 4 / 3 . 0 0 1 / 3 We end with two more useful facts concerning inverses without verification: 1. The inverse of a diagonal matrix is diagonal. 2. The inverse of an upper triangular matrix is upper triangular.