Basic Mathematics for Economists phần 10 doc

57 585 0
Basic Mathematics for Economists phần 10 doc

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Table 15.1 Cars required Week 1 Week 2 Week 3 Compact 4 7 2 Intermediate 3 5 5 Large 12 9 5 People carrier 2 1 3 Luxury limousine 1 1 2 The total car hire bill for each week can then be calculated by multiplying the number of cars to be hired in each category by the corresponding price. A matrix is defined as an array of numbers (or algebraic symbols) set out in rows and columns. Therefore, the car hire requirements for the 3-week period in this example can be set out as the matrix A =       472 355 12 9 5 213 112       where each row corresponds to a size of car and each column corresponds to a week. The usual notation system is to denote matrices by a capital letter in bold type, as for matrix A above, and to enclose the elements of a matrix in a set of squared brackets, i.e. [ ]. Matrices may also be specified with algebraic terms instead of numbers. Each entry is usually known as an ‘element’. The elements in each matrix must form a complete rectangle, without any blank spaces. For example, if there are 5 rows and 3 columns there must be 3 elements in each row and 5 elements in each column. An element may be zero though. The size of a matrix is called its ‘order’. The order is specified as: (number of rows) × (number of columns) For example, the matrix A above has 5 rows and 3 columns and so its order is 5 × 3. Matrices with only one column or row are known as vectors. These are usually represented by lower case letters, in bold. For example, the set of car rental prices we started this chapter with can be specified (in £) as the 1 × 5 row vector p =  139 160 205 340 430  and the car hire requirements in week 1 can be specified as the 5 × 1 column vector q =       4 3 12 2 1       Matrix addition and subtraction Matrices that have the same order can be added together, or subtracted. The addition, or subtraction, is performed on each of the corresponding elements. © 1993, 2003 Mike Rosser Example 15.1 A retailer sells two products, Q and R, in two shops A and B. The number of items sold for the last 4 weeks in each shop are shown in the two matrices A and B below, where the columns represent weeks and the rows correspond to products Q and R, respectively. A =  5 4 12 7 10 12 9 14  and B =  89 34 818215  Derive a matrix for total sales for this retailer for these two products over the last 4 weeks. Solution Total sales for each week will simply be the sum of the corresponding elements in matrices A and B. For example, in week 1 the total sales of product Q will be 5 plus 8. Total combined sales for Q and R can therefore be represented by the matrix T = A + B =  5 4 12 7 10 12 9 14  +  89 34 818215  =  5 + 84+ 912+ 37+ 4 10 + 812+ 18 9 + 21 14 + 5  =  13 13 15 11 18 30 30 19  An element of a matrix can be a negative number, as in the solution to the example below. Example 15.2 If A =  12 30 815  and B =  735 48  what is A − B? Solution A − B =  12 30 815  −  735 48  =  12 − 730− 35 8 − 415− 8  =  5 −5 47  Scalar multiplication There are two forms of multiplication that can be performed on matrices. A matrix can be multiplied by a specific value, such as a number (scalar multiplication) or by another matrix (matrix multiplication). Scalar multiplication simply involves the multiplication of eachelementinamatrixbythescalarvalue,asinExample15.3.Matrixmultiplicationis rather more complex and is explained later, in Section 15.2. © 1993, 2003 Mike Rosser Example 15.3 The number of units of a product sold by a retailer for the last 2 weeks are shown in matrix A below, where the columns represent weeks and the rows correspond to the two different shop units that sold them. A =  12 30 815  If each item sells for £4, derive a matrix for total sales revenue for this retailer for these two shop units over this two-week period. Solution Total revenue is calculated by multiplying each element in matrix of sales quantities A by the scalar value 4, the price that each unit is sold at. Thus total revenue can be represented (in £) by the matrix R = 4A =  4 × 12 4 × 30 4 × 84× 15  =  48 120 32 60  The scalar value that a matrix is multiplied by may be an algebraic term rather than a specific number value. For example, if the product price in Example 15.3 above was specified as p instead of £4 then the total revenue matrix would become R =  12p 30p 8p 15p  Scalar division works in the same way as scalar multiplication, but with each element divided by the relevant scalar value. Example 15.4 If the set of car rental prices in the vector p =  139 160 205 340 430  includes VAT (Value Added Tax) at 17.5% and your company can claim this tax back, what is the vector v of prices without this tax? Solution First of all we need to find the scalar value used to scale down the original vector element values. As the tax rate is 17.5% then the quoted prices will be 117.5% times the basic price. Therefore a quoted price divided by 1.175 will be the basic price and so the vector of prices (in £) without the tax will be v =  1 1.175  p =  1 1.175   139 160 205 340 430  =  1 1.175  139  1 1.175  160  1 1.175  205  1 1.175  340  1 1.175  430  =  118.30 136.17 174.47 289.36 365.96  © 1993, 2003 Mike Rosser Test Yourself, Exercise 15.1 1. A firm uses 3 different inputs K, L and R to make two final products X and Y. Each unit of X produced requires 2 units of K, 8 units of L and 23 units of R. Each unit of Y produced requires 3 units of K, 5 units of L and 26 units of R. Set up these input requirements in matrix format. 2. ‘A vector is a special form of matrix but a matrix is not a special form of vector’. Is this statement true? 3. For the pairs of matrices below say whether it is possible to add them together and then, where it is possible, derive the matrix C = A + B. (a) A =  235 18 15  and B =  435 98  (b) A =  53 81  and B =  702 881  (c) A =       10 3 12 6 1       and B =       4 0 2 −9 1       4. A company sells 4 products and the sales revenue (in £m.) from each product sold through the company’s three retail outlets in a year are given in the matrix R =   7314 6382.5 41.22 0   If profit earned is always 20% of sales revenue, use scalar multiplication to derive a matrix showing profit on each product for each retail outlet. 15.2 Basic principles of matrix multiplication If one matrix is multiplied by another matrix, the basic rule is to multiply elements along the rows of the first matrix by the corresponding elements down the columns of the second matrix. The easiest way to understand how this operation works is to first work through some examples that only involve matrices with one row or column, i.e. vectors. Returning to our car hire example, consider the two vectors p =  139 160 205 340 430  and q =       4 3 12 2 1       The row vector p contains the prices of hire cars in each category and the column vector q contains the quantities of cars in each category that your company wishes to hire for the week. © 1993, 2003 Mike Rosser At the start of this chapter we worked out the total car hire bill as 139 × 4 + 160 × 3 + 205 × 12 + 340 × 2 +430 × 1 = £4,606 In terms of these two vectors, what we have done is multiply the first element in the row vector p by the first element in the column vector q. Then, going across the row, the second element of p is multiplied by the second element down the column of q. The same procedure is followed for the other elements until we get to the end of the row and the bottom of the column. Now consider the situation where the car hire prices are still shown by the vector p =  139 160 205 340 430  but there are now three weeks of different car hire requirements, shown by the columns of matrix A =       472 355 12 9 5 213 112       To calculate the total car hire bill for each of the three weeks, we need to find the vector t = pA This should have the order 1 × 3, as there will be one element (i.e. the bill) for each of the three weeks. The first element of t is the bill for the first week, which we have already found in the example above. The car hire bill for the second week is worked out using the same method, but this time the elements across the row vector p multiply the elements down the second column of matrix A, giving 139 × 7 + 160 × 5 + 205 ×9 +340 ×1 + 430 × 1 = £4,388 The third element is calculated in the same manner, but working down the third column of A. The result of this matrix multiplication exercise is therefore t = pA =  139 160 205 340 430        472 355 12 9 5 213 112       =  4606 4388 3983  The above examples have shown how the basic principle of matrix multiplication involves the elements across a row vector multiplying the elements down the columns of the matrix being multiplied, and then summing all the products obtained. If the first matrix has more than one row (i.e. it is not a vector) then the same procedure is followed across each row. This means that the number of rows in the final product matrix will correspond to the number of rows in the first matrix. © 1993, 2003 Mike Rosser Example 15.5 Multiply the two matrices A =  23 81  and B =  752 481  Solution Using the method explained above, the product matrix will be AB =  23 81  752 481  =  2 × 7 + 3 × 42× 5 +3 ×82×2 + 3 × 1 8 × 7 + 1 × 48×5 + 1 × 88× 2 + 1 × 1  =  26 34 7 60 48 17  You now may be wondering what happens if the number of elements along the rows of the first matrix (or vector) does not equal the number of elements in the columns of the matrix that it is multiplying. The answer to this question is that it is not possible to multiply two matrices if the number of columns in the first matrix does not equal the number of rows in the second matrix. Therefore, if a matrix A has order m × n and another matrix B has order r ×s, then the multiplication AB can only be performed if n = r, in which case the resulting matrix C = AB will have order (m × s). This principle is illustrated in Example 15.5 above. Matrix A has order 2 ×2 and matrix B has order 2 ×3 and so the product matrix AB has order 2 ×3. Some other examples of how the order of different matrices affects the order of the product matrix when they are multiplied are given in Table 15.2. Table 15.2 ABOrder of product matrix AB 5 ×33×25×2 1 ×88×11×1 3 ×52×4 Matrix multiplication not possible 3 ×44×33×3 4 ×34×3 Matrix multiplication not possible Test Yourself, Exercise 15.2 1. Given the vector v =  25  and matrix A =  62 37  find the product matrix vA. 2. For the pairs of matrices below say if it is possible to derive the product matrix C = AB and, when this is possible, calculate the elements of this product matrix. (a) A =  210 715  and B =  42 98  © 1993, 2003 Mike Rosser (b) A =  53 81  and B =  702 12 8 1  (c) A =       9 3 12 6 1       and B =       4 0 2 −9 1       3. A company’s input requirements over the next four weeks for the three inputs X, Y and Z are given (in numbers of units of each input) by the matrix R =   20.51 7 6382.5 4520   The company can buy these inputs from two suppliers, whose prices for the three inputs X, Y and Z are in given (in £) by the matrix P =  462 581  where the two rows represent the suppliers and the three columns represent the input prices. Use matrix multiplication to derive a matrix that will give the total input bill for the next four weeks for both suppliers. 15.3 Matrix multiplication – the general case Now that the basic principles have been explained with some straightforward examples, we can set out a general formula for matrix multiplication that can be applied to more complex matrix multiplication exercises. The general m × n matrix with any number of rows m and columns n can be written as A =      a 11 a 12 ··· a 1n a 21 a 22 ··· a 2n . . . . . . . . . . . . a m1 a m2 ··· a mn      For each element a ij the subscript i denotes the row number and the subscript j denotes the column number. For example a 11 = element in row 1, column 1 a 12 = element in row 1, column 2 a 1n = element in row 1, column n a mn = element in row m, column n © 1993, 2003 Mike Rosser If this general m ×n matrix A multiplies the general n ×r matrix B then the product will be the m × r matrix C. Thus we can write AB =      a 11 a 12 ··· a 1n a 21 a 22 ··· a 2n . . . . . . . . . . . . a m1 a m2 ··· a mn           b 11 b 12 ··· b 1r b 21 b 22 ··· b 2r . . . . . . . . . . . . b n1 b n2 ··· b nr      =      c 11 c 12 ··· ··· c 1r c 21 c 22 ··· ··· c 2r . . . . . . . . . . . . . . . c m1 c m2 ··· ··· c mr      = C where c 11 =a 11 b 11 +a 12 b 21 + ···+a 1n b n1 c 12 =a 11 b 12 +a 12 b 22 + ···+a 1n b n2 . . . . . . . . . . . . c mr =a m1 b 1r +a m2 b 2r + ···+a mn b nr Example 15.6 Find the product matrix C = AB when A =   4212 6020 18 5   and B =   10 0.51 7 6382.5 4420   Solution Using the general matrix multiplication formula, the elements of the first two rows of the product matrix C can be calculated as: c 11 = 4 × 10 + 2 × 6 + 12 × 4 = 40 + 12 + 48 = 100 c 12 = 4 × 0.5 + 2 × 3 + 12 × 4 = 2 + 6 + 48 = 56 c 13 = 4 × 1 + 2 × 8 + 12 × 2 = 4 +16 + 24 = 44 c 14 = 4 × 7 + 2 × 2.5 + 12 × 0 = 28 + 5 + 0 = 33 c 21 = 6 × 10 + 0 × 6 + 20 × 4 = 60 + 0 + 80 = 140 c 22 = 6 × 0.5 + 0 × 3 + 20 × 4 = 3 + 0 + 80 = 83 c 23 = 6 × 1 + 0 × 8 + 20 × 2 = 6 +0 + 40 = 46 c 24 = 6 × 7 + 0 × 2.5 + 20 × 0 = 42 + 0 + 0 = 42 © 1993, 2003 Mike Rosser Now try and calculate the elements of the final row yourself. You should get the values c 31 = 78,c 32 = 44.5,c 33 = 75,c 34 = 27 The complete product matrix will therefore be C = AB =   100 56 44 33 140 83 46 42 78 44.57527   Although the calculations for matrix multiplication of small matrices can be done manually fairly quickly, it is now becoming obvious that for large matrices the calculations will be very tedious and time-consuming. Several economics applications involving matrix multiplication do not actually require you to calculate all the elements of the product matrix. For occasions when you do need to calculate all these elements, an Excel spreadsheet can be used. Using Excel for matrix multiplication The best way to explain how to use the Excel MMULT formula to multiply two matrices A and B is to work through an example. Example 15.7 Given the two matrices A =  843 456  and B =   0.80.30.1 0.50.20.4 0.30.20.1   find the product matrix AB using an Excel spreadsheet. Solution (a) Enter the values of matrices A and B on a spreadsheet. For example, put the elements of A in cells (A2; C3) and the elements of B in cells (E2; G4). You can also enter labels for the matrix names in the rows of cells above. (b) Highlight the cells where you want the calculated AB matrix to go. Since the order of A is 2 × 3 and the order of B is 3 × 3 the product matrix AB must have order 2 × 3. You therefore need to highlight a block of cells with 2 rows and 3 columns, such as (A6; C7). (c) With this cell range still highlighted, enter the formula = MMULT(A2;C3,E2;G4) or use whatever cells range applies for your matrices to be multiplied, or use mouse to mark out matrices to be multiplied with dotted lines. (d) Hold down the CNTRL and SHIFT keys together and press ENTER (if you do not do this then the formula will not treat all the highlighted cells as part of an array, i.e. a matrix). YourspreadsheetandthecomputedproductmatrixABshouldnowbeasshowninTable15.3. In the simple example above you can check the answers manually. However, once you are satisfied that you can use the Excel MMULT formula properly then you can use it for more complex examples where manual computation would be too time-consuming. © 1993, 2003 Mike Rosser Table 15.3 A B C D E F G H 1 Matrix A Matrix B 2 8 4 3 0.8 0.3 0.1 3 4 5 6 0.5 0.2 0.4 4 0.3 0.2 0.1 5 Matrix AB 6 9 3.8 2.7 7 8 3.4 3 Table 15.4 A B C D E F G H I J K L M N O 1 Matrix A Matrix B 2 120 160 195 220 285 350 8 9 10 11 12 14 3 2 3 125 165 200 225 290 355 12 13 14 15 16 9 12 5 4 130 170 205 230 150 360 4 5 6 5 6 9 3 7 5 135 175 210 235 200 380 8 9 10 11 12 3 3 4 6 140 180 215 240 110 500 5 6 7 0 3 0 2 3 7 2 3 4 1 4 1 2 0 8 Product 9 Matrix AB 10 7545 8875 10205 7465 10065 5885 4795 4140 11 7740 9100 10460 7680 10330 6065 4920 4245 12 7210 8455 9700 7895 10160 6245 4755 3915 13 7660 8995 10330 8125 10620 6440 5000 4155 14 7610 8995 10380 8455 11060 6735 5165 3975 Example 15.8 In the spreadsheet in Table 15.4, the MMULT formula has been used to multiply the 5 × 6 matrix A by the 6 ×8 matrix B to get the 5 ×8 product matrix AB. Try entering the matrices A and B yourself and see if you can use the Excel MMULT formula to get the same product matrix AB. Vectors of coefficients In economic models it is common to specify one dependent variable as a function of a vector of explanatory variables, especially when employing econometric analysis to esti- mate coefficients of these explanatory variables. A typical vector format for a function is q = βx where β is the vector of coefficients for the exogenous explanatory variables in vector x. For example, assume that the demand for oil in time t is the linear function q t = β 0 + β 1 x t 1 + β 2 x t 2 + β 3 x t 3 + β 4 x t 4 + β 5 x t 5 © 1993, 2003 Mike Rosser [...]... 8 5 1 4 − 3 10 4 7 −2 0 4 10 7 +4 0 1 7 10 2 −5 1 4 1 10 4 3 2 +2 4 7 + 2 10 7 4 10 2 −5 0 4 3 10 = 8[5(−16) − 2(−40) + 4(18)] + 2 [10( −40) − 5(−12) + 4(−1)] − 3 [10( 18) − 5(5) + 2(−1)] = 8[−80 + 80 + 72] + 2[−400 + 60 − 4] − 3[180 − 25 − 2] = 8(72) + 2(−344) − 3(153) = 576 − 688 − 459 = −571 © 1993, 2003 Mike Rosser 3 2 +4 0 7 3 10 Using Excel to evaluate determinants It is very straightforward to use... second row, will be 10 |A| = 4 5 3 0 2 6 5 = −4(6 − 12) + 0 − 5(20 − 15) = 24 − 25 = −1 2 The matrix inverse will therefore be   10 6 15  17 10 −26  10 8 −5 −12 AdjA A−1 = = −17 = |A| −1 −8 −6 10 5  −15 26  12 To solve for the vector of unknowns x we calculate      10 −6 −15 76 (10 × 76) − (6 × 41) − (15 × 34) 26  41 = (−17 × 76) + (10 × 41) + (26 × 34) x = A−1 b = −17 10 −8 5 12 34... zero and we have what is known as a singular matrix For example, if the second row is twice the value of the corresponding element in the first row and A= 5 10 8 16 then the determinant |A| = 5 10 8 = 5 × 16 − 8 × 10 = 80 − 80 = 0 16 The formula for the matrix inverse (which we will derive later) involves division by the determinant Therefore, a condition for the inverse of a matrix to exist is that the... the Laplace expansion to find the determinant of matrix A =  2 3 10 5 2 4 2 7 1 4  3 10  4 0 Solution Expanding down the first column (because there is a zero which means one less set of calculations), the first round of the Laplace expansion gives 5 |A| = 8 2 4 7 1 4 10 10 4 −0 2 0 4 2 1 4 3 10 4 +2 5 0 4 2 7 4 3 10 10 − 3 5 0 2 2 7 1 3 10 4 A second round of the Laplace expansion is then used to break... conditions) for both a maximum and a minimum require that ∂f =0 ∂x and ∂f =0 ∂y SOC (second-order conditions) require that ∂ 2f 0 ∂y 2 for a minimum and, for both a maximum and a minimum ∂ 2f ∂x 2 ∂ 2f ∂y 2 > ∂ 2f ∂x∂y 2 These second-order conditions can be expressed more succinctly in matrix format For clarity the abbreviated format for specifying... take the above formula for the matrix inverse as given and there is no need for you to work through the proof of this result for the general case However, we can show how the inverse formula can be derived for the case of a 2 × 2 matrix = a c b d This inverse can be specified as A−1 = e g f h Assume that we wish to invert the matrix A where e, f, g and h are numbers that the inverse formula will calculate... out with the general inverse formula since for matrix A = (10) a c The determinant is |A| = ad − bc d −c d The cofactor matrix C = and so the adjoint is AdjA = −b a −c Substituting these results into (10) gives the inverse formula A−1 = b d −b a AdjA |A| Using Excel for matrix inversion Although you need to understand the rationale behind the matrix inversion process, for any actual computations involving... × 76) + (5 × 41) + (12 × 34)       x1 4 760 − 246 − 510 = −1292 + 410 + 884 = 2 = x2  5 −608 + 205 + 408 x3 You can check that these are the correct values by substituting them for the unknown variables x1 , x2 and x3 in the equations given in this problem For example, substituting into the first equation gives 10x1 + 3x2 + 6x3 = 10( 4) + 3(2) + 6(5) = 40 + 6 + 30 = 76 Using Excel to solve... cofactor matrix     − 110 80 −6 160 − 270 − (100 − 180) 90 − 96 200 − 240 −(180 − 144) =  120 −40 36  C = −(240 − 360) 20 −50 20 180 − 160 −(150 − 100 ) 80 − 60 © 1993, 2003 Mike Rosser The adjoint matrix will then be the transpose of this cofactor matrix   − 110 120 20 −40 −50 AdjX = CT =  80 −6 36 20 The determinant of matrix X can be calculated as |X| = 10( 160 − 270) − 12 (100 − 180) + 20(90 −... (1) y1 = β1 10 + β2 12 + β3 20 = 9.23 (10) + 6.92(12) + 3.23(20) = 240 and so the calculated value of 240 for y1 is correct (allowing for rounding error) Test Yourself, Exercise 15.8 (You can solve questions 1 and 2 manually but Excel should be used for the others.) 1 Use the matrix inverse method to find the unknowns x and y when 4x + 6y = 68 5x + 20y = 185 2 Use matrix algebra to solve for x1 , x2 . Matrix AB 10 7545 8875 102 05 7465 100 65 5885 4795 4140 11 7740 9100 104 60 7680 103 30 6065 4920 4245 12 7 210 8455 9700 7895 101 60 6245 4755 3915 13 7660 8995 103 30 8125 106 20 6440 5000 4155 14 7 610 8995. respectively. A =  5 4 12 7 10 12 9 14  and B =  89 34 818215  Derive a matrix for total sales for this retailer for these two products over the last 4 weeks. Solution Total sales for each week will. A typical vector format for a function is q = βx where β is the vector of coefficients for the exogenous explanatory variables in vector x. For example, assume that the demand for oil in time t

Ngày đăng: 14/08/2014, 22:20

Từ khóa liên quan

Mục lục

  • Basic Mathematics for Economists, Second Edition

    • TOC

      • Chapter 15: Matrix algebra

        • 15.1 Introduction to matrices and vectors

          • Matrix addition and subtraction

          • Example 15.1

          • Example 15.2

          • Scalar multiplication

          • Example 15.3

          • Example 15.4

          • Test Yourself, Exercise 15.1

          • 15.2 Basic principles of matrix multiplication

            • Example 15.5

            • Test Yourself, Exercise 15.2

            • 15.3 Matrix multiplication – the general case

              • Example 15.6

              • Using Excel for matrix multiplication

              • Example 15.7

              • Example 15.8

              • Vectors of coefficients

              • Example 15.9

              • Test Yourself, Exercise 15.3

              • 15.4 The matrix inverse and the solution of simultaneous equations

                • Conditions for the existence of the matrix inverse

                • Test Yourself, Exercise 15.4

                • 15.5 Determinants

                  • Example 15.10

                  • The determinant of a 3rd order matrix

Tài liệu cùng người dùng

Tài liệu liên quan