• A matrix is a rectangular array of numbers or symbols whose dimension is
stated in terms of number of rows by the number of columns. The members of the array are known as the 𝒆𝒍𝒆𝒎𝒆𝒏𝒕𝒔 𝒕𝒐 𝒕𝒉𝒆 𝒎𝒂𝒕𝒓𝒊𝒙. • 𝑑𝑖𝑚𝑒𝑛𝑠𝑖𝑜𝑛𝑠 = 𝑅 × 𝐶. • When the number of rows is equal to the number of columns it is said to be a 𝒔𝒒𝒖𝒂𝒓𝒆 𝒎𝒂𝒕𝒓𝒊𝒙. • For instance: • An 𝒎 × 𝒏 𝒎𝒂𝒕𝒓𝒊𝒙, 𝒘𝒉𝒆𝒏 𝒎 = 𝒏 𝒕𝒉𝒆𝒏 𝒕𝒉𝒆 𝒎𝒂𝒕𝒓𝒊𝒙 𝒊𝒔 𝒔𝒂𝒊𝒅 𝒕𝒐 𝒃𝒆 𝒂 𝒔𝒒𝒖𝒂𝒓𝒆 𝒎𝒂𝒕𝒓𝒊𝒙. • Some matrices that contain only one column, they are said to be 𝐜𝒐𝒍𝒖𝒎𝒏 𝒗𝒆𝒄𝒕𝒐𝒓𝒔, 𝒂𝒏𝒅 𝒂 𝒓𝒐𝒘 𝒗𝒆𝒄𝒕𝒐𝒓 𝒘𝒉𝒆𝒏 𝒐𝒏𝒆 𝒓𝒐𝒘. Special matrices • Null Matrices
• Identity matrix (I)
• Equal matrices
• The transpose of a matrix
Null Matrices
• This is a matrix of any dimension in which every element is zero, for
instance: 0 0 0 • or 0 0 0 𝑜𝑟 0 0 0 0 • It is denoted by 0. The null matrix is not restricted to a square matrix only. • It has the following characteristics: • 1. 𝐴 + 0 = 0 + 𝐴 = 𝐴 • 2. 𝐴. 0 = 0. 𝐴 = 0 Identity matrix (I)
• It is a square matrix in which every element is zero except the
main/principal diagonal being equal to one. 1 0 0 1 0 • 𝑜𝑟 0 1 0 0 1 0 0 1 • For any matrix 𝐴, 𝐼𝐴 = 𝐴𝐼 = 𝐴. • An Identity matrix remains unchanged when it is multiplied by itself any number of times. • (𝐼𝑛 )𝑘 = 𝐼𝑛 Equal matrices • These have the same dimensions and have the same elements. 2 −2 2 −2 • = 0 6 0 6 • The transpose of a matrix • This is the writing of the rows as columns of a matrix and vice-versa, 𝑎11 𝑎12 𝑇 𝑎11 𝑎21 • 𝑎 𝑎 = 𝑎 21 22 12 𝑎22 • The “T” indicates the matrix is to be transposed. Properties of a transpose • The transpose of a matrix has the following properties: • 1. (𝐴𝑇 )𝑇 = 𝐴 • 2. (𝐴 + 𝐵)𝑇 = 𝐴𝑇 + 𝐵𝑇 • 3. (𝐴𝐵)𝑇 = 𝐵𝑇 𝐴𝑇 Exercises 2 4 3 8 1 0 9 • 1. Given 𝐴 = ,𝐵 = 𝑎𝑛𝑑 𝐶 = −1 3 0 1 6 1 1 • Find 𝐴𝑇 , 𝐵𝑇 𝑎𝑛𝑑 𝐶 𝑇 • 2. Use the matrices given in the preceding problem to verify that: • 𝑎) 𝐴 + 𝐵)𝑇 = 𝐴𝑇 + 𝐵𝑇 𝑏 (𝐴𝐶)𝑇 = 𝐶 𝑇 𝐴𝑇 Addition or subtraction of matrices • Two or more matrices can only be added if and only if they have the same dimensions, that is same number of rows and same number of columns. Such matrices are said to be 𝒄𝒐𝒏𝒇𝒐𝒓𝒎𝒂𝒃𝒍𝒆 𝒇𝒐𝒓 𝒂𝒅𝒅𝒊𝒕𝒊𝒐𝒏. 𝑎11 𝑎12 𝑏11 𝑏12 𝑎11 + 𝑏11 𝑎12 + 𝑏12 • 𝑎21 𝑎22 + 𝑏21 𝑏22 = 𝑎21 + 𝑏21 𝑎22 + 𝑏22 𝑎31 𝑎32 𝑏31 𝑏32 𝑎31 + 𝑎31 𝑎32 + 𝑏32 • The subtraction operation can similarly be defined if and only the matrices have the same dimensions. Examples • Given that: 4 −1 0 3 8 3 •𝐴= ,𝐵 = , 𝑎𝑛𝑑 𝐶 = 6 9 3 −2 6 1 • Find a) A+B • b) C-A • c) 3A • d) 4B+2C Scalar Multiplication • A scalar is an ordinary number. • When a matrix is multiplied by a scalar, multiply every element in that matrix by the given scalar. • A scalar can be negative or positive. 𝑎11 𝑎12 𝑘𝑎11 𝑘𝑎12 •𝑘 𝑎 𝑎 = 21 22 𝑘𝑎21 𝑘𝑎22 Exercises 2 4 • 1. Given that 𝐴 = −4 8 • 𝐶𝑎𝑙𝑐𝑢𝑙𝑎𝑡𝑒 5𝐴 • 2. Calculate 2 1 2 𝐼, 𝑤ℎ𝑒𝑟𝑒 𝐼 𝑖𝑠 𝑎 3 × 3 𝑚𝑎𝑡𝑟𝑖𝑥. Matrix multiplication • To find the product of matrices, the conformity condition must be satisfied by each of the adjacent pairs of matrices. • For instance the product of matrices AB can only be formed if and only if: 𝐴 𝑖𝑠 𝑎𝑛 𝑚 × 𝑛 𝑚𝑎𝑡𝑟𝑖𝑥 • 𝐵 𝑖𝑠 𝑎𝑛 𝑛 × 𝑝 𝑚𝑎𝑡𝑟𝑖𝑥, • Otherwise the product will be an 𝑚 × 𝑝 𝑚𝑎𝑡𝑟𝑖𝑥. • When multiplying matrices satisfying the conformity conditions, always sum the products of the row of the preceding matrix and the column of the proceeding matrix. Demonstration • The product is computed as follows: 𝑎11 𝑎12 𝑏11 𝑏12 𝑎11 𝑏11 + 𝑎12 𝑏21 𝑎11 𝑏12 + 𝑎12 𝑏22 • 𝑎 𝑎 = 21 22 𝑏21 𝑏22 𝑎21 𝑏11 + 𝑎22 𝑏21 𝑎21 𝑏12 + 𝑎22 𝑏22 • Examples: −8 0 7 1 0 5 3 •𝐴= ,𝐵 = 𝑎𝑛𝑑 𝐶 = 0 3 0 5 1 3 2 7 1 • 1. Find 𝑎) 𝐴𝐵 𝑏) 𝐵𝐶 𝑐) 𝐴𝐶 Determinants and non-singularity • The determinant of a square matrix 𝐴 is denoted by 𝐴 . • It is a uniquely defined scalar associated with that matrix. • For a 2 × 2 matrix, the determinant is computed as follows: 𝑎11 𝑎12 •𝐴= 𝑎 21 𝑎22 • 𝐴 = 𝑎11 𝑎22 − 𝑎21 𝑎12 • It is the difference between the product of the elements in the principal diagonal and the product of the remaining elements. For a 3 × 3 matrix • The determinant for a 3 × 3 𝑚𝑎𝑡𝑟𝑖𝑥 is given as follows: 𝑎11 𝑎12 𝑎13 • 𝐴 = 𝑎21 𝑎22 𝑎23 𝑎31 𝑎32 𝑎33 𝑎22 𝑎23 𝑎21 𝑎23 𝑎21 𝑎22 • 𝐴 = 𝑎11 𝑎 𝑎 − 𝑎12 𝑎 𝑎 + 𝑎13 𝑎 32 33 31 33 31 𝑎32 • Therefore the value of 𝐴 is the sum of the three terms, each of which is a product of a first row element. • For determinants of orders more than 3 we use the ‘Laplace Expansion’ which is beyond the scope of the course. Exercises • Evaluate the following determinants: 8 1 3 4 0 2 1 2 3 • 𝑎) 4 0 1 𝑏) 6 0 3 𝑐) 4 7 5 6 0 3 8 2 3 3 6 9 𝑎 𝑏 𝑐 1 1 4 𝑥 5 0 • 𝑑) 𝑏 𝑐 𝑎 𝑒) 8 11 −2 𝑓) 3 𝑦 2 𝑐 𝑎 𝑏 0 4 7 9 −1 8 Matrix inverse and properties • An inverse is a derived matrix which may or may not exist. • The inverse of a matrix 𝑨 𝒊𝒔 𝒅𝒆𝒏𝒐𝒕𝒆𝒅 𝒃𝒚 𝑨−𝟏 . • It is defined only if A is a square matrix and the inverse matrix should satisfy the following conditions. • 𝑨𝑨−𝟏 = 𝑨−𝟏 𝑨 = 𝑰 • Whether 𝑨 is pre-multiplied or post-multiplied. Properties of matrix inverses • 1. Not every square matrix has an inverse. Squareness is a necessary condition but not a sufficient condition for the existence of an inverse. • Square matrix A with an inverse is said to be non-singular but if it does not have an inverse is said to be a singular matrix. • 2.If 𝐴−1 exists, A can be regarded as inverse of 𝐴−1 . 𝐴 𝑎𝑛𝑑 𝐴−1 are inverses of each other. • 3. If 𝐴 ℎ𝑎𝑠 𝑛 × 𝑛 𝑑𝑖𝑚𝑒𝑛𝑠𝑖𝑜𝑛, then 𝐴−1 𝑚𝑢𝑠𝑡 ℎ𝑎𝑣𝑒 𝑛 × 𝑛 dimensions, otherwise cannot conform to both pre and post multiplication condition. The identity matrix (I) should have the 𝑛 × 𝑛 𝑑𝑖𝑚𝑒𝑛𝑠𝑖𝑜𝑛𝑠. Definition of some terms • Minor of an element- this is the determinant of what is left when the row and column containing that element are crossed out. • For if given matrix A with the following elements: 𝑎11 𝑎12 𝑎13 • 𝐴 = 𝑎21 𝑎22 𝑎23 𝑎31 𝑎32 𝑎33 • The minor of 𝑎11 is the determinant of the elements left out i.e. 𝑎22 𝑎23 • 𝑎 32 𝑎33 • Cofactor of a given element is the minor (determinant) of that element multiplied by +𝟏 𝒐𝒓 − 𝟏. It is denoted by 𝑪 subscripted by the location of that element, e.g. 𝑪𝟏𝟏 𝒊𝒔 𝒂 𝒄𝒐𝒇𝒂𝒄𝒕𝒐𝒓 𝒐𝒇 𝒂𝟏𝟏 Calculation of the inverse • Therefore given matrix 𝐴, the inverse of 𝐴 is defined as follows: • It the product of the inverse of the determinant and the transpose of the cofactors. (𝐶)𝑇 1 • 𝐴−1 = = . (𝐶)𝑇 𝐴 𝐴 Inverse of a 2 × 2 𝑚𝑎𝑡𝑟𝑖𝑥 2 5 • Given 𝐴 = 2 6 • Step 1. 𝐴 = 12 − 10 = 2 • Step 2. Cofactor of each element. The ±1 𝑠𝑖𝑔𝑛 𝑓𝑜𝑟 𝑎 2 × 2 𝑑𝑒𝑡𝑒𝑟𝑚𝑖𝑛𝑎𝑛𝑡 𝑖𝑠: +1 −1 • −1 +1 • Tabulate the cofactors: • 𝑅𝑜𝑤 𝑒𝑙𝑒𝑚𝑒𝑛𝑡 𝑀𝑖𝑛𝑜𝑟 𝑥 𝑠𝑖𝑔𝑛 = 𝑐𝑜𝑓𝑎𝑐𝑡𝑜𝑟 • 2 6𝑥 + 1 = 6 𝐶11 • 5 2𝑥 − 1 = −2 𝐶12 • 2 5𝑥 − 1 = −5 𝐶21 • 6 2𝑥 + 1 = 2 𝐶22 -cont- • Therefore matrix A will have the cofactors: 2 5 6 −2 •𝐴= 𝐶= 2 6 −5 2 • Transpose of C 6 −5 • 𝐶𝑇 = it is also known as the ad-joint matrix −2 2 • Therefore the inverse would be expressed as follows: −1 1 6 −5 3 −2.5 •𝐴 = = 2 −2 2 −1 1 The inverse of a 3 × 3 𝑚𝑎𝑡𝑟𝑖𝑥 • Find the inverse of a matrix: 1 1 4 • 𝐴 = 2 −5 2 6 3 6 • Step 1. Evaluate 𝐴 by multiplying each element in row 1 by its cofactor. These are the first 3 cofactors. • Step 2. Set up a table to calculate all the cofactors. • 𝐸𝑙𝑒𝑚𝑒𝑛𝑡 𝑀𝑖𝑛𝑜𝑟 𝑥 𝑠𝑖𝑔𝑛 = 𝑐𝑜𝑓𝑎𝑐𝑡𝑜𝑟 • Finally get the inverse as follows: (𝐶)𝑇 1 • 𝐴−1 = = . (𝐶)𝑇 𝐴 𝐴 Inverse matrix and solution of linear equation system • The concept of inverse matrix can be used to solve simultaneous equation system. The equation can be expressed as follows: •𝐴𝑥 =𝑑 • 𝐴−1 𝐴𝑥 = 𝐴−1 𝑑 • 𝑥 = 𝐴−1 𝑑 Solving a linear equation • Solve for P and Q, given the following set of equations. • 5 + 2𝑃 = 6𝑄 • 2𝑃 + 8𝑄 = 25 • Rearranging: • 2𝑃 − 6𝑄 = −5 • 2𝑃 + 8𝑄 = 25 • Presenting in the form: 𝐴𝑥 = 𝑑 2 −6 𝑃 −5 • = 2 8 𝑄 25 illustration • Solve the following system of equations: • 7𝑥1 − 3𝑥2 − 3𝑥3 = 7 • 2𝑥1 − 4𝑥2 − 𝑥3 = 0 • −2𝑥2 − 𝑥3 = 2 Cramer’s rule • This is a general rule which uses determinants to solve simultaneous equations. • The solution to the equation is given as follows with 2 unknowns. • 𝑎1 𝑥 + 𝑏1 𝑦 = 𝑑1 • 𝑎2 𝑥 + 𝑏2 𝑦 = 𝑑2 𝑑1 𝑏1 𝑎1 𝑑1 𝑑2 𝑏2 𝑎2 𝑑2 •𝑥= 𝑎1 𝑏1 and 𝑦 = 𝑎1 𝑏1 𝑎2 𝑏2 𝑎2 𝑏2 • The denominator for both is the determinant of the coefficients of the unknowns and denoting it by ∆, numerator of 𝑥 𝑏𝑦 ∆𝑥 𝑎𝑛𝑑 𝑜𝑓 𝑦 𝑏𝑦 ∆𝑦. • Therefore the Cramer rule can be summarized. -cont- ∆𝑥 ∆𝑦 •𝑥= 𝑎𝑛𝑑 𝑦 = ∆ ∆ • This can be expanded to 3 unknowns(𝑥, 𝑦 𝑎𝑛𝑑 𝑧) as follows: ∆𝑥 ∆𝑦 ∆𝑧 •𝑥= ,𝑦 = 𝑎𝑛𝑑 𝑧 = ∆ ∆ ∆ • If it is zero, the equation has no unique solution. Revision Question 1 • Solve the following systems of equations using Cramer rule. • 𝑋+𝑌+𝑍 =2 • 𝑍 + 2𝑌 + 𝑋 = 1 • 𝑌 + 4𝑋 + 2𝑍 = 0 Question 2 • The following equations represent a particular closed economy: • 1. 𝑌 = 𝐶 + 𝐼 + 𝐺 • 2. 𝐶 = 0.7𝑌 • 3. 𝐼 = 0.2𝑌 + 0.1𝑟 • Where 𝒀 represents income,𝑰 investment, 𝑮 Government expenditure, 𝑪 Consumption, and 𝒓 the interest rate. 𝑌 • Write the system in the form 𝐴𝑋 = 𝐵 where 𝑋 = 𝐶 and 𝐴 is a square 𝐼 matrix of coefficients of 𝒀, 𝑪 𝑎𝑛𝑑 𝑰. • Find 𝒀, 𝑪 𝑎𝑛𝑑 𝑰 in terms of 𝑮 𝑎𝑛𝑑 𝒓 using Cramer’s rule.