Numeracy Matrices Definition The word Matrices is the plural of the word Matrix A matrix is a rectangular arrangement (or array) of numbers called elements A x 3 matrix can be represented as below Matrix A Column Column Column 3 5 0 Row 3 Row A x 3 matrix has rows and 3 columns In many aspects of matrices the order is rows then columns More generally, the size or order of a matrix is written as m n, indicating it is a matrix of m rows by n columns In textbooks, there appears to be two methods of expressing each element in the matrix The first method uses letters of the alphabet; Matrix a b c A d e f The other method is to use a single letter Because this is Matrix A, the lower case a is used with a double subscript, written in general form as a i,j Matrix a a a A a a a,, 3,,, 3, Remember the order of the subscripts is row, column Centre for Teaching and Learning Academic Practice Academic Skills Digital Resources Page +6 666 96 ctl@scueduau wwwscueduau/teachinglearning [last edited on 7 September 07]
Example: 3 0 The matrix A 8 3 has size 3 x 4 0 4 The location of element 4 can be stated as a 33, The location of element -3 can be stated as a 4, Types of Matrices The purpose of this section is to introduce the reader to language that is often used in mathematics units containing matrices Row matrices A row matrix consists of only one row For example; [ ], [ 0 ] and [ ] 3 are row matrices Row matrices have the general size x n, containing elements a,j Column matrices A column matrix consists of only one column 0 For example; 4, and [ 3 ] are column matrices Column matrices have the general size m x, containing elements a i, Zero or Null matrix A m n 0 0 For example; [ 0 0 ], 0 0 0 0 matrix containing elements of only 0 is called a zero or null matrix and [ 0 ] are zero or null matrices The zero or null matrix can be written as 0 The matrix 0 (written in bold) contains elements of 0 Page
Square matrix A square matrix has the same number of rows and columns Their size is expressed as m x m 0 For example; [ 4 ], 5 and 9 5 4 are square matrices Diagonal matrix A property of a square matrix is the main diagonal 0 In the matrix 9 5 4 A the main diagonal contains the elements 5 A diagonal matrix is a square matrix where elements off the main diagonal are zero Matrix A is not a diagonal matrix The matrix below is a diagonal matrix Matrix 0 0 B 0 5 0 0 0 Identity matrix A square matrix that has a main diagonal containing all ones () with all other elements 0, is called an Identity matrix 0 0 The matrix A 0 0 is the 3 3 0 0 0 0 matrix above would be more correctly written as I 0 0 0 0 identity matrix The identity matrix is denoted using I, so this Page 3
Equal Matrices Two matrices are considered equal if they have the same size (or order) and corresponding elements are equal + 6 Matrix A 0 is equal to matrix corresponding elements are equal 3 B 0 4 because they have the same size (or order) and Matrix A is not equal to matrix B [ ] because they do not have the same size a 6 4 6 Example: if b + 3 7 evaluate each pronumeral 5c 5 By equating corresponding cells, we know; a 4, b + 3 7, 5c5 b 4 c Transpose of a Matrix The transpose of a m nmatrix A is a n mmatrix denoted as the i th T column in matrix A T A The i th row in matrix A becomes The transpose of matrix first row in T A 5 A is 0 3 A T 0 5 3, that is, the first column in A become the It follows from this that ( A T ) T A 0 0 0 0 Let s consider the transpose of the identity matrix 0 0 T I, then I 0 0 giving the 0 0 0 0 conclusion I T I The identity matrix will be visited again later in this module Page 4
Scalar Multiplication A matrix can be multiplied by a number This number is called a scalar Scalar multiplication involves multiplying each element in the matrix by the scalar 4 4 4 4 4 8 Example: 4 3 5 0 4 3 4 5 4 0 0 0 4 3 4 4 4 4 3 6 4 5 Example: if matrix A, evaluate 3A 0 3 5 3 3 5 6 5 3A 3 3 3 3 3 0 3 3 0 3 3 0 9 In general c ca, ca, ca 3, A ca ca ca,, 3, Matrix Addition and Subtraction Two or more matrices can be added or subtracted provided they are the same size Example: Given matrix 0 A 3 4, 0 B and C 3 4 It is possible to add and subtract A and B but C is a different size so addition or subtraction with A or B is not possible In the matrices, corresponding elements are added or subtracted 0 0 + + 0 0+ 3 A+ B + 3 4 3+ + 4+ 4 3 6 0 0 0 0 A B 3 4 3 4 Example: Given A 3 5 3 4, and 4 0 5 4 B C Calculate; 3 5 3 9 3 5 3 9 5 3 3 4 6 3A B 3 4 0 3 6 4 0 3 4 6 0 7 6 Page 5
Properties of Matrix Addition A + B B + A Commutative ( ) ( ) A+ B + C A + B + C Associative A + 0 0+ A A Identity A A 0 These properties are similar to real number properties Video Matrices Scalar Multiplication Matrix Multiplication Matrix multiplication is very different to scalar multiplication With addition and subtraction, matrices had to be the same size With multiplication there is also a limitation on which matrices can be multiplied The condition that must be met is that the number of columns in the first matrix must be equal to the number of rows in the second Matrix A is a x 4 matrix (rows x column), Matrix B is a 4 x matrix, so these can be multiplied [ 3 0 ] A can multiply 4 5 B 3 0 Generalising: a matrix of size m x n can only multiply a matrix of size n x p The resulting matrix will have size m x p must be the same ( m n ) ( n p ) ( m p) gives the size of the resulting matrix Page 6
Example: 3 A B 5 0 4 3 0 B is ( 3) ( 3 ) the resulting vector will be ( ) As A 3 a, a, 5 0 4 a 3 0, a, The element a, is calculated using the first row of the first matrix multiplied by the first column of the second matrix ( ) + ( 5) + ( 3 3) 3 7 5 0 4 3 0 The element a, is calculated using the first row of the first matrix multiplied by the second column of the second matrix ( ) + ( ) + ( 3 0) 3 7 5 5 0 4 3 0 The element a, is calculated using the second row of the first matrix multiplied by the first column of the second matrix 3 7 5 5 0 4 7 3 0 ( 0 ) + ( 5) + ( 4 3) The element a, is calculated using the second row of the first matrix multiplied by the first column of the second matrix Page 7
3 7 5 5 0 4 7 3 0 ( 0 ) + ( ) + ( 4 0) Example: 3 5 ( 3) + ( ) + ( 5 0) + ( ) 0 0 0 3 0 ( 0 3) + ( ) + ( 0 0) + ( 3 ) 4 Example: The system of linear equations 4x+ y x y 3 has the solution x,y The coefficients can make a matrix 4 and the solutions form the matrix 4 Now multiply these two matrices together as 4 ( 4 ) + ( ) ( ) + ( ) 3, This matrix contains the constant values from the original equations More on this later Example: This example is multiplying a square matrix by an equal sized square matrix 3 5 5 A B 3 ( 3 ) ( 5 ) ( 3 5) ( 5 3) ( ) + ( ) ( 5) + ( 3) 3 5 5 + + 0 3 0 In this example, the two matrices multiplied to give the Identity Matrix When two matrices multiply to give the identity matrix, then one matrix is called the inverse of the other Page 8
Example: In this example, the matrix A is multiplied by the identity matrix Square matrices 3 x 3 are used 4 0 0 AI 3 0 0 0 0 5 0 0 4 0 0 A 3 0 I 0 0 0 5 0 0 ( ) + ( 0) + ( 4 0) ( 0) + ( ) + ( 4 0) ( 0) + ( 0) + ( 4 ) ( ) + ( 3 0) + ( 0 0) ( 0) + ( 3 ) + ( 0 0) ( 0) + ( 3 0) + ( 0 ) ( 0 ) + ( 0) + ( 5 0) ( 0 0) + ( ) + ( 5 0) ( 0 0) + ( 0) + ( 5 ) 4 3 0 0 5 A This example demonstrates the general result that a matrix multiplied by the Identity matrix gives the original matrix as a result, or A I A Video Matrix Multiplication Page 9
Inverse Matrices In an earlier example, two matrices multiplied to give the Identity Matrix 3 5 5 0 3 0 3 5 From the result above, it is possible to say that the inverse of is 5 3 is 3 5 5 3 or the inverse of The inverse can only be found for square matrices because of the nature of Identity Matrices Finding the inverse matrix of a x matrix There are two methods for finding the inverse of a x matrix The first method requires knowledge of determinants If a matrix Example: a b A c d then the inverse of matrix A ( A ) 4 3 Find the inverse of A The value of det ( A) ad bc ( ) d b det ( A ) c a Where det ( A ) written as a b ad bc c d 4 3 3 d b 3 A det ( A ) c a 4 Remembering that a matrix multiplied by its inverse should give the identity matrix, the inverse matrix can be checked AA The inverse of 3 3 ( 4 ) + ( 3 ) 4 ( 3 ) 4 3 + 0 3 0 ( ) ( ) ( + + ) 3 4 3 A is A The matrix is not always invertible We know that the inverse is found using d b A det ( A ) c a Page 0
If the value of det ( A ) is 0 then the fraction ( ) 0 det A or ad bc 0 det ( A) is undefined A matrix is not invertible when Another method used to calculate the inverse of a matrix is to use a partitioned matrix and through a process of row operations or row reductions The original partitioned matrix is the matrix A and the identity matrix Through the process of row operations, this is reduced to the identity matrix and the inverse matrix A I I A ie: [ ] Using the previous example The partitioned matrix becomes 4 3 A [ A I ] 4 3 0 0 The three row operations that are possible are: Two rows can be interchanged A row can be multiplied by a non-zero constant 3 Multiply a row by a constant then add this to another row Overall, the end result of row reductions should give 0 or 0 I A???? Page
The first step is to obtain a for the element a This can be performed by dividing the, first row by 4 The next step is to get a 0 for the element a This is performed by multiplying row, 3 by, giving 0 and then adding this to Row Now the first column is finished The next step is to get a in cell a, and then use this to get a 0 for element a, Row is multiplied by Multiply Row by 3 / 4, giving 0 and add to Row 3 3 3 4 4 3 4 3 0 0 4 4 0 0 3 3 0 0 4 4 4 4 0 0 3 0 3 4 4 0 4 4 0 0 3 3 0 0 4 4 0 0 Now this is in the form of I A, so 3 A This process is called the Gauss Jordan method Example: Find the inverse of 3 6 A 4 The value of det ( A) ad bc 3 4 6 0 This matrix does not have an inverse Page
Example: 5 4 Find the inverse of A 4 3 The value of det ( A) ad bc 5 3 4 4 using both methods d b 3 4 3 4 A det ( A ) c a 4 5 4 5 The first step is to obtain a for the element a, This can be performed by dividing the first row by 5 The next step is to get a 0 for the element, This is performed by multiplying row by -4, giving 6 4 4 0 and then adding this to Row 5 5 The next step is to get a in cell a, and then use this to get a 0 for element a, Row is multiplied by -5 Multiply Row by - 4 / 5 and add to Row Now this is in the form of a 4 5 4 0 0 5 5 4 3 0 4 3 0 4 4 0 0 5 5 5 5 4 4 3 0 0 5 5 4 0 4 5 5 0 5 5 4 0 0 4 5 5 5 4 0 0 3 4 5 5 0 4 5 0 4 5 I A, so 3 4 A 4 5 Page 3
Example: Find the inverse of A 4 9 0 6 The value of det ( A) ad bc ( ) ( ) A using both methods 4 6 9 0 4 3 d b 6 9 4 8 det ( A ) c a 4 0 4 0 6 The first step is to obtain a for the element a, This can be performed by dividing the first row by 4 9 4 9 0 0 4 4 0 6 0 0 6 0 The next step is to get a 0 for the element a, There is already a 0, so no calculation is required 9 0 4 4 0 6 0 The next step is to get a in cell a, and then use this to get a 0 for element a, Row is multiplied by - / 6 Multiply Row by - 9 / 4 and add to Row Now this is in the form of I A, so 9 9 0 0 4 4 4 4 0 6 0 0 0 6 9 9 0 0 4 4 4 4 0 0 0 0 6 6 3 4 8 A 0 6 Video Inverse of a Matrix Page 4
Using Matrices to solve systems of linear equations Find the solution to the system of linear equations (previously mentioned) 4x+ y x y 3 From this system there are 3 matrices that can be formed The first matrix is formed from the coefficients of the variables The second matrix contains the unknown variables and the third matrix contains the constants 4 x A X B y 3 Which can be written as AX B The solution to the system of linear equations is X A B provided that A is invertible A Using the determinant method of finding inverses d b 5 5 det ( A ) c a ( 4 ) ( ) 4 5 4 4 5 5 X X A B + 3 5 5 5 5 4 3 4 + 3 5 5 5 5 Another method is to set up an augmented coefficient matrix For the question above this would be; 4 3 Using row reduction, this is reduced to 0 0 x y Page 5
The first step is to obtain a for the element a, This can be performed by dividing the first row by 4 The next step is to get a 0 for the element a, Multiply Row by - and add to Row The next step is to get a in cell a, and then use this to get a 0 for element a, Row is multiplied by -4 / 5 4 4 3 3 4 4 5 5 3 0 4 4 4 5 5 0 0 4 Multiply Row by - / 4 and add to Row 0 4 0 0 Now this is in the form of [ ] I B, so B Example: Find the solution to the system of linear equations given below 6x+ 5y x+ y 3 6 5 x The three matrices are: A X B y 3 The solution to the system of linear equations is X A B (A is invertible) d b X A B det ( A ) c a 3 5 6 3 5 6 3 ( ) + ( 5 3) ( ) + ( 6 3) 7 0 Page 6
Example: The cost of a musical is $ for adults and $ for children 5 people made up of adults and children paid a total of $34 to attend the show From this information determine how many adults and how many children attended the show Let x be the number of adults and y be the number of children Then x+ y 5 and, based on the amount paid, x+ y 34 x+ y 5 x+ y 34 The three matrices are: x 5 A X B y 34 X A B (A is invertible) The solution to the system of linear equations is d b 5 X A B det ( A ) c a 34 5 9 34 ( 5) + ( 34) ( 5) + ( 34) 9 54 6 9 8 9 There were 6 adults and 9 children attending the show Page 7
Example: 9Ω i -i 3Ω i i V Ω Using Kirchhoff s Law and your knowledge of matrices, solve for i and i Moving clockwise around loop - 3i i 0 or i+ 3i Moving clockwise around loop - ( ) 9 i i 3i 0 or 9i i 0 The three matrices are: 3 i A X B 9 i 0 The values for i and i are d b X A B det ( A ) c a 0 3 5 9 0 ( ) + ( 3 0) ( 9 ) + ( 0) 5 48 44 7 5 08 36 7 48 36 and amperes, (approx 83 and amp) 7 7 Video Matrices System of Linear Equations Page 8
Activity The matrices below are used in the questions below: 3 A B [ 0 4] C [ 0] D E 0 3 4 6 5 0 0 0 3 0 4 F 0 0 G H J 0 8 5 3 0 0 State the size of each matrix Which of the matrices are row matrices? 3 Which of the matrices are column matrices? 4 Which of the matrices are zero matrices? 5 Which of the matrices are square matrices? 6 Which of the matrices is an identity matrix? 7 If a b+ 9 3 9 3c 0 d 0 0 determine the values of a, b, c and d 8 Determine T T T A, E and J 9 Compute the following using the matrices above; (i) 3E (ii) A + G (iii) G J 0 Perform the following multiplications if it is possible (i) GH (ii) GD (iii) AJ (iv) DG The solution to the system of linear equations below is x6 and y4 x+ y 0 x y Obtain the matrices A, X and B Verify that AXB You are told that the inverse of performing a multiplication 8 5 3 is 5 3 8 Confirm this is correct or otherwise by Page 9
3 Using the first method, find the inverse of each of the matrices below, if possible; 5 4 6 (i) 3 (ii) 0 (iii) 4 4 Using the Gauss Jordan Method, find the inverse of each of the matrices below, if possible; 5 5 5 (i) 4 (ii) 4 0 (iii) 5 Solve the system of linear equations below by using Matrices x 3y 4x+ 3y 9 6 Solve the system of linear equations below by using Matrices x 5y 8x 0y 4 7 Using the matrices given at the beginning, calculate the matrix A and J 8 In Algebra, the difference of squares identity is ( a b)( a+ b) a b 4 3 Using the Matrices P and Q 0 determine if the same relationship may exist for matrices, ie: ( P Q)( P+ Q) P Q Page 0
Answers to Activity questions The matrices below are used in the questions below: 3 A B [ 0 4] C [ 0] D E 0 3 4 6 5 0 0 0 3 0 4 F 0 0 G H J 0 8 5 3 0 0 State the size of each matrix A: B: 4 C: D: E:3 F:3 3 G: H: 3 J: Which of the matrices are row matrices? B, C 3 Which of the matrices are column matrices? C, D 4 Which of the matrices are zero matrices? C 5 Which of the matrices are square matrices? A, C, F, G, J 6 Which of the matrices is an identity matrix? F 7 If a b+ 9 3 9 3c 0 d 0 0 determine the values of a, b, c and d a, b + 3 b, 3c c 4, d 0 d 8 Determine T T T A, E and J T 3 A A 3 4 4 3 T 3 0 E 0 E 5 5 4 T 4 3 J J 3 Page
9 Compute the following using the matrices above; (i) 3E 3 9 3 3E 3 0 0 6 5 3 5 (ii) A + G 0 4 0 3 4 A+ G 3 4 + 0 8 + 6 8 0 8 6 6 (iii) G J 0 4 0 8 4 7 4 G J 0 8 3 0 8 6 6 6 0 Perform the following multiplications if it is possible (i) GH 0 3 0 GH 0 8 5 ( 3) + ( 0 ) ( 0) + ( 0 ) ( ) + ( 0 5) ( 0 3) + ( 8 ) ( 0 0) + ( 8 ) ( 0 ) + ( 8 5) 3 0 8 6 40 (ii) GD 0 ( ) + ( 0 6) GD 0 8 6 ( 0 ) + ( 8 6 ) 48 (iii) AJ AJ ( 4) + ( 3) ( ) + ( ) ( 3 4) + ( 4 3) ( 3 ) + ( 4 ) 4 0 3 4 3 0 (iv) DG this multiplication cannot be performed The solution to the system of linear equations below is x6 and y4 x+ y 0 x y Obtain the matrices A, X and B Verify that AXB 6 0 A X B 4 6 6 + 4 0 AX B 4 6 4 8 5 5 You are told that the inverse of 3 is 3 8 Confirm this is correct or otherwise by performing a multiplication 8 5 5 6 5 40 + 40 0 I 3 3 8 6 6 5 + 6 0 The matrices are inverses 3 Using the first method, find the inverse of each of the matrices below, if possible; Page
(i) (ii) 5 3 A det ( A) 4 0 A det ( A) 3 5 d b 3 5 c a 3 5 d b 4 c a 0 0 (iii) 6 4 det ( A ) ( ) ( 6 4) 4 4 0 It is not possible to find the inverse 4 Using the Gauss Jordan Method, find the inverse of each of the matrices below, if possible; 5 (i) 4 The first step is to obtain a for the element a, This can be performed by dividing the first row by - The next step is to get a 0 for the element a, Multiply Row by - and add to Row 5 5 0 0 4 0 4 0 5 5 0 0 4 0 0 The next step is to get a in cell a, and then use this to get a 0 for element a, As there is a already, nothing is required 5 0 0 Multiply Row by 5 / and add to Row 5 5 0 0 0 0 Now this is in the form of I A, so 5 A (ii) 5 4 0 The first step is to obtain a for the element a, This can be performed by multiplying the first row by - The next step is to get a 0 for the element a, Multiply Row by -4 and add to Row The next step is to get a in cell a, and then use this to get a 0 for element a, Row is divided by -0 5 0 5 0 4 0 0 4 0 0 5 0 5 0 4 0 0 0 0 4 5 0 5 0 0 0 4 0 5 0 Page 3
Multiply Row by -5 and add to Row 5 0 0 0 5 0 0 5 0 Now this is in the form of I A, so A 5 0 (iii) 5 The first step is to obtain a for the element a, This can be performed by dividing the first row by The next step is to get a 0 for the element a, Multiply Row by and add to Row 5 5 0 0 0 0 5 5 0 0 9 0 0 The next step is to get a in cell a, and then use this to get a 0 for element a, Row is multiplied by / 9 5 5 0 0 9 0 0 9 9 Multiply Row by - 5 / and add to Row 5 5 0 0 9 9 0 0 9 9 9 9 Now this is in the form of I A, so 5 9 9 A 9 9 5 Solve the system of linear equations below by using Matrices x 3y 4x+ 3y 9 3 x A X B 4 3 y 9 Page 4
X d b A B det ( A ) c a 9 3 3 5 4 9 33 + 7 5 44 9 + 6 5 53 04 3 53 6 Solve the system of linear equations below by using Matrices x 5y 8x 0y 4 5 x A X B 8 0 y 4 det A no inverse can be found You will notice that one equation is a constant multiple of the ( ) 0 other Graphically they result in the same line Any solution from the line will solve both equations, so there are an infinite number of solutions 7 Using the matrices given at the beginning, calculate the matrix A and A 7 0 A A 3 4 3 4 5 4 4 0 J J J 3 3 5 7 8 In Algebra, the difference of squares identity is ( a b)( a+ b) a b 4 3 Using the Matrices P and Q 0 determine if the same relationship may exist for matrices, ie: ( P Q)( P+ Q) P Q J 4 3 5 3 P Q 0 4 3 5 P+ Q + 0 0 5 3 5 5 P Q P+ Q 0 0 ( )( ) 4 4 4 4 P 0 0 0 Page 5
3 3 Q 4 3 4 4 7 6 P Q 0 4 3 4 This shows that ( P Q)( P+ Q) P Q Page 6