Dr Huw Owens Room B44 Sackville Street Building Telephone Number 65891 TX-1037 Mathematical Techniques for Managers Lecture – Matrices in Economics Dr Huw Owens Room B44 Sackville Street Building Telephone Number 65891
Matrices in Economics – Objectives 1 Appreciate that using matrices you can handle an array of numbers as a single entity Understand the definitions of a matrix and a vector and be able to transpose them Carry out matrix addition and subtraction Multiply a matrix by a scalar or another matrix Use matrices to handle a system of equations Find the value of a determinant Calculate the inverse of a matrix Use an inverse to solve a system of equations Perform matrix operations in Excel and use Solver to solve a system of equations Dr Huw Owens - University of Manchester : 02/01/2019
Matrix: a rectangle of values arranged in rows and columns Elements of a Matrix Matrix: a rectangle of values arranged in rows and columns Element: the value in a particular row and column of a matrix Vector: a matrix with only one row, or one column Dr Huw Owens - University of Manchester : 02/01/2019
Dimension and Transpose of a Matrix The dimension of a matrix is rows ´ columns The transpose of a matrix is found by interchanging rows and columns Square matrix: a matrix with the same number of rows as columns Order: the number of rows and columns of a square matrix Dr Huw Owens - University of Manchester : 02/01/2019
If a square matrix equals its transpose it is symmetric Symmetric Matrices Principal diagonal: the elements in a square matrix that lie in the same row and column Symmetric matrix: a square matrix where the elements above the principal diagonal are the mirror image of those below If a square matrix equals its transpose it is symmetric Identity matrix I: a square matrix with 1s in the principal diagonal and 0s elsewhere Dr Huw Owens - University of Manchester : 02/01/2019
Matrix Dimensions State the dimension of each of the following matrices or vectors, and write down the transpose of each. Are any of the matrices symmetric? A=2x2, b=4x1, C=2x4, D=3x3 Dr Huw Owens - University of Manchester : 02/01/2019
Matrix Addition and Subtraction Matrix addition and subtraction is applicable only if the matrices have the same dimension Add or subtract corresponding elements in the matrices Equal matrices: matrices with the same dimension and all corresponding elements equal Null matrix: a matrix in which all the elements are 0 Dr Huw Owens - University of Manchester : 02/01/2019
Matrix Addition and Subtraction Just as in ordinary arithmetic, matrix addition and subtraction lets us find sums of values and the differences between them. Dr Huw Owens - University of Manchester : 02/01/2019
Matrix Addition and Subtraction Notice that the elements of a matrix can be zero or negative. The matrix operations of addition and subtraction apply to entire matrices. These must have the same dimension, otherwise there will be no corresponding elements in the other matrix. If a matrix is subtracted from itself we obtain a matrix of the same dimension in which all the elements are zero. The resulting matrix is known as a null matrix and denoted 0. For example, Dr Huw Owens - University of Manchester : 02/01/2019
Matrix Addition and Subtraction Questions If possible, find A+B, A-B, A+C, B-C, C-C, C-0 where Dr Huw Owens - University of Manchester : 02/01/2019
Matrix Addition and Subtraction Questions A+C and B-C are not possible as they have different dimensions. C-C is a square matrix of order 3, the same dimension as C. For C-0 we write a null matrix of the same dimension as C. Dr Huw Owens - University of Manchester : 02/01/2019
Scalar Multiplication Scalar: a single value, not a matrix of values If matrix A is multiplied by a scalar, k, each element in A is multiplied by k kA = Ak Commutative property: the order in which items that are connected by an arithmetic operator are written does not affect the result For example, Dr Huw Owens - University of Manchester : 02/01/2019
Scalar Multiplication Find the scalar products kB and Bk for the matrix Dr Huw Owens - University of Manchester : 02/01/2019
Matrix Multiplication Conformable for multiplication: the matrices are of appropriate dimensions for their product to be formed Pre-multiply A by B: B is written before A to form the product BA Post-multiply A by B: B is written after A to form the product AB Dr Huw Owens - University of Manchester : 02/01/2019
Checking if Matrices are Conformable Write the dimension of each matrix under the proposed product If the inner numbers of the dimensions are equal you can form the product, and the outer numbers give its dimension can be formed because q = q The product is of dimension n by k Dr Huw Owens - University of Manchester : 02/01/2019
For each entry in the product matrix A B Choose the appropriate row of A and column of B as shown in the table multiply corresponding pairs of elements and sum the results Dr Huw Owens - University of Manchester : 02/01/2019
If possible form AB and BA where Example If possible form AB and BA where Dr Huw Owens - University of Manchester : 02/01/2019
No Commutative Property The commutative (independence of order) property of multiplication does not hold for matrix multiplication In general, A B ¹ B A, and one of these products may exist while the other does not Dr Huw Owens - University of Manchester : 02/01/2019
Transpose of a Product The transpose of a product is the product of the separately transposed matrices in the reverse order (AB) ¢ = B¢ A¢ Dr Huw Owens - University of Manchester : 02/01/2019
Associative Property Associative property: the result of arithmetic operations is not affected by groupings of the components When the associative property holds different groupings give the same result: A(BC) = (AB)C This property holds for matrix multiplication providing the dimensions of the matrices are such as to permit the different products to be formed Dr Huw Owens - University of Manchester : 02/01/2019
Distributive Property Distributive property: one arithmetic operation can be distributed over another without changing the result The distributive property allows us to multiply out brackets, distributing what is multiplying the brackets so that it multiplies the terms separately We can state this as A(B + C) = AB + AC Dr Huw Owens - University of Manchester : 02/01/2019
Matrix Questions (1) If k is a scalar, find 3a, kB and Ck for the matrices For the above matrices (a, B and C), find (i) B+C, a(B+C), aB, aC and hence show a(B+C)=aB+aC (ii) BC, a(BC), (aB)C and hence show a(BC)=(aB)C (2) If k is a scalar, find 5A, kB and 7x for the matrices (3) For matrices A, B and x in Q2 above, find where possible, AB, BA, Bx and BTx Dr Huw Owens - University of Manchester : 02/01/2019
(5) If find matrix expressions for uTu and uuT. Matrix Questions (4) For matrices A and x in Q2, find (Ax)T and xTAT and show they are equal. (5) If find matrix expressions for uTu and uuT. Find their numerical values if For vectors x,y and 1 find the matrix expressions for xT1, yT1, xTy and yTx Find the numerical value of the expressions if Dr Huw Owens - University of Manchester : 02/01/2019
If X= show that XTX is a square symmetric matrix Matrix Questions Find XTy for Show that AI=IA=A for If X= show that XTX is a square symmetric matrix Dr Huw Owens - University of Manchester : 02/01/2019
Matrix answers (1) Dr Huw Owens - University of Manchester : 02/01/2019
Matrix Answers Find 5A, kB and 7x Dr Huw Owens - University of Manchester : 02/01/2019
Find, where possible, AB, BA, Bx and BTx Matrix Answers Find, where possible, AB, BA, Bx and BTx Dr Huw Owens - University of Manchester : 02/01/2019
Equation System in Matrix Notation n equations in k unknowns are written in matrix notation as Ax = c where A is a n ´ k matrix of coefficients x is a k ´ 1 vector of unknown variables and c is a n ´ 1 vector of constants Dr Huw Owens - University of Manchester : 02/01/2019
Equation Systems For a solution, number of linearly independent equations = number of unknown variables Linearly independent: the property that none of the equations are linear combinations of other equations If one equation is a linear combination of other equations the system cannot be solved Dr Huw Owens - University of Manchester : 02/01/2019
Linearly Independent Equations With the equations in matrix form, the condition for linear independence is that there should be no linear relationship between the rows or between the columns of the coefficients matrix If this is the case, the matrix is non-singular A matrix that contains linearly dependent rows or columns is described as singular Dr Huw Owens - University of Manchester : 02/01/2019
A determinant is a number, or scalar, associated with a square matrix Determinants A determinant is a number, or scalar, associated with a square matrix It is found by combining the elements of the array according to certain rules The determinant of matrix A is denoted If = 0, matrix A is singular Dr Huw Owens - University of Manchester : 02/01/2019
Determinant of a 2 ´ 2 Matrix If A is the 2 ´ 2 matrix Its determinant is Dr Huw Owens - University of Manchester : 02/01/2019
+ if (i + j) is an even number and – if (i + j) is an odd number Cofactors For a 3 ´ 3 matrix, the cofactor of aij is the determinant of the 2 ´ 2 matrix that remains when row i and column j are deleted, together with the appropriate sign The sign is + if (i + j) is an even number and – if (i + j) is an odd number Dr Huw Owens - University of Manchester : 02/01/2019
Determinant of a 3 ´ 3 Matrix Choose any row or column of A Multiply each element in that row by its cofactor, and add these products A determinant of zero indicates a singular matrix But note that you get a zero value if you use the wrong cofactors to expand a matrix Dr Huw Owens - University of Manchester : 02/01/2019
Solving Equations in Matrix Form For a system of equations in the matrix form Ax = c If we could find an expression for x it would comprise a solution to the set of equations Division does not exist in matrix algebra so we cannot divide by A Instead, we may be able to find a matrix called the inverse of A that will help us The matrix is denoted A-1 Dr Huw Owens - University of Manchester : 02/01/2019
To have an inverse A-1, matrix A must be square and non-singular Inverse of a Matrix To have an inverse A-1, matrix A must be square and non-singular The inverse has the property A-1A = AA-1 = I Pre-multiply both sides of the equation by the inverse: A-1Ax = A-1c so Ix = A-1c and x = A-1c Dr Huw Owens - University of Manchester : 02/01/2019
interchange the elements on the principal diagonal Inverse of a 2 ´ 2 Matrix To invert the 2 ´ 2 matrix interchange the elements on the principal diagonal change the signs of the other two terms multiply by the scalar Dr Huw Owens - University of Manchester : 02/01/2019
Calculate the cofactors of the elements, place them in a matrix Inverse of a 3 ´ 3 Matrix 1 To invert the 3 ´ 3 matrix A= Calculate the cofactors of the elements, place them in a matrix Dr Huw Owens - University of Manchester : 02/01/2019
transpose the cofactor matrix to find the adjoint of A Adj(A) = Inverse of a 3 ´ 3 Matrix 2 transpose the cofactor matrix to find the adjoint of A Adj(A) = Calculate the determinant of matrix A, Dr Huw Owens - University of Manchester : 02/01/2019
Inverse of a 3 ´ 3 Matrix 3 multiply Adj(A) by the reciprocal of the determinant to form the inverse A-1 = check that the inverse is correct either post-multiplying or pre-multiplying it by the original matrix should give an identity matrix Dr Huw Owens - University of Manchester : 02/01/2019
Matrix Operations in Excel Set out each matrix in Excel just as you would write it on paper Put each matrix element in a separate Excel cell You can then perform matrix calculations, either entering formulae for yourself or using the inbuilt formulae that Excel provides Dr Huw Owens - University of Manchester : 02/01/2019
Transposing a matrix You can transpose a matrix in Excel by copying it and then using the ‘Paste Special’ facility Before you start the procedure, consider whereabouts in the spreadsheet the transposed matrix is to be placed Remember that unless the matrix is square the transposed matrix will have a different dimension to the original matrix Dr Huw Owens - University of Manchester : 02/01/2019
Matrix multiplication Check the matrices are conformable and find the dimension of the product matrix before using Excel Select a rectangle of cells of the appropriate dimension for the product you are going to form Click the function button, choose the function MMULT Click on the boxes in turn and either type the name of the appropriate matrix or select its cells in the worksheet Press Ctrl+Shift+Enter to enter the array formula Dr Huw Owens - University of Manchester : 02/01/2019