Presentation is loading. Please wait.

Presentation is loading. Please wait.

Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 86 Chapter 2 Matrices.

Similar presentations


Presentation on theme: "Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 86 Chapter 2 Matrices."— Presentation transcript:

1 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 86 Chapter 2 Matrices

2 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 2 of 86 Outline 2.1 Solving Systems of Linear Equations I 2.2 Solving Systems of Linear Equations II 2.3 Arithmetic Operations on Matrices 2.4 The Inverse of a Matrix 2.5 The Gauss-Jordan Method for Calculating Inverses 2.6 Input-Output Analysis

3 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 3 of 86 2.1 Solving Systems of Linear Equations I 1.Diagonal Form of a System of Equations 2.Elementary Row Operations 3.Elementary Row Operation 1 4.Elementary Row Operation 2 5.Elementary Row Operation 3 6.Gaussian Elimination Method 7.Matrix Form of an Equation 8.Using Spreadsheet to Solve System

4 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 4 of 86 Diagonal Form of a System of Equations A system of equations is in diagonal form if each variable only appears in one equation and only one variable appears in an equation. For example:

5 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 5 of 86 Elementary Row Operations Elementary row operations are operations on the equations (rows) of a system that alters the system but does not change the solutions. Elementary row operations are often used to transform a system of equations into a diagonal system whose solution is simple to determine.

6 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 6 of 86 Elementary Row Operation 1 Elementary Row Operation 1Rearrange the equations in any order.

7 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 7 of 86 Example Elementary Row Operations 1 Rearrange the equations of the system so that all the equations containing x are on top.

8 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 8 of 86 Elementary Row Operation 2 Elementary Row Operation 2Multiply an equation by a nonzero number.

9 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 9 of 86 Example Elementary Row Operation 2 Multiply the first row of the system so that the coefficient of x is 1.

10 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 10 of 86 Elementary Row Operation 3 Elementary Row Operation 3Change an equation by adding to it a multiple of another equation.

11 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 11 of 86 Example Elementary Row Operation 3 Add a multiple of one row to another to change so that only the first equation has an x term.

12 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 12 of 86 Gaussian Elimination Method Gaussian Elimination Method transforms a system of linear equations into diagonal form by repeated applications of the three elementary row operations. 1. Rearrange the equations in any order. 2. Multiply an equation by a nonzero number. 3. Change an equation by adding to it a multiple of another equation.

13 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 13 of 86 Example Gaussian Elimination Method Continue Gaussian Elimination to transform into diagonal form

14 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 14 of 86 Example Gaussian Elimination (2)

15 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 15 of 86 Example Gaussian Elimination ( 3) The solution is (x,y,z) = (4/5,-9/5,9/5).

16 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 16 of 86 Matrix Form of an Equation It is often easier to do row operations if the coefficients and constants are set up in a table (matrix). Each row represents an equation. Each column represents a variable’s coefficients except the last which represents the constants. Such a table is called the augmented matrix of the system of equations.

17 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 17 of 86 Example Matrix Form of an Equation Write the augmented matrix for the system Note: The vertical line separates numbers that are on opposite sides of the equal sign.

18 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 18 of 86 Using Spreadsheet to Solve System Use a spreadsheet to solve Enter the augmented matrix into your spreadsheet.

19 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 19 of 86 Spreadsheet - Entering Left Side of Equations A sample set up of the left side of the equations in cells B1, B2 and B3 in Excel. The third equation is shown. The three variables’ cells are A1, A2 and A3.

20 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 20 of 86 Spreadsheet - Entering Equations in Solver A sample set up of the constraints (equations) in Excel for Solver. The second constraint is shown.

21 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 21 of 86 Spreadsheet - Using Solver - Setup Complete setup for Solver. Solution is calculated once Solve is clicked.

22 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 22 of 86 Spreadsheet - Using Solver A sample solution (in column A) in Excel using Solver. The solution is x = 0.8 y = -1.8 z = 1.8.

23 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 23 of 86 Summary Section 2.1 - Part 1  The three elementary row operations for a system of linear equations (or a matrix) are as follows:  Rearrange the equations (rows) in any order;  Multiply an equation (row) by a nonzero number;  Change an equation (row) by adding to it a multiple of another equation (row).

24 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 24 of 86 Summary Section 2.1 - Part 2  When an elementary row operation is applied to a system of linear equations (or an augmented matrix) the solutions remain the same. The Gaussian elimination method is a systematic process that applies a sequence of elementary row operations until the solutions can be easily obtained.

25 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 25 of 86 2.2 Solving Systems of Linear Equations, II 1.Pivot a Matrix 2.Gaussian Elimination Method 3.Infinitely Many Solutions 4.Inconsistent System 5.Geometric Representation of System

26 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 26 of 86 Pivot a Matrix MethodTo pivot a matrix about a given nonzero entry: 1.Transform the given entry into a one; 2.Transform all other entries in the same column into zeros.

27 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 27 of 86 Example Pivot a Matrix Pivot the matrix about the circled element.

28 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 28 of 86 Gaussian Elimination Method Gaussian Elimination Method to Transform a System of Linear Equations into Diagonal Form 1. Write down the matrix corresponding to the linear system. 2. Make sure that the first entry in the first column is nonzero. Do this by interchanging the first row with one of the rows below it, if necessary.

29 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 29 of 86 Gaussian Elimination Method (2) Gaussian Elimination Method to Transform a System of Linear Equations into Diagonal Form 3. Pivot the matrix about the first entry in the first column. 4. Make sure that the second entry in the second column is nonzero. Do this by interchanging the second row with one of the rows below it, if necessary.

30 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 30 of 86 Gaussian Elimination Method (3) Gaussian Elimination Method to Transform a System of Linear Equations into Diagonal Form 5. Pivot the matrix about the second entry in the second column. 6. Continue in this manner.

31 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 31 of 86 Infinitely Many Solutions When a linear system cannot be completely diagonalized, 1. Apply the Gaussian elimination method to as many columns as possible. Proceed from left to right, but do not disturb columns that have already been put into proper form. 2. Variables corresponding to columns not in proper form can assume any value.

32 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 32 of 86 Infinitely Many Solutions (2) 3. The other variables can be expressed in terms of the variables of step 2. 4. This will give the general form of the solution.

33 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 33 of 86 Example Infinitely Many Solutions Find all solutions of General Solution z = any real number x = 3 - 2z y = 1

34 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 34 of 86 Inconsistent System When using the Gaussian elimination method, if a row of zeros occurs to the left of the vertical line and a nonzero number is to the right of the vertical line in the same row, then the system has no solution and is said to be inconsistent.

35 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 35 of 86 Example Inconsistent System Find all solutions of Because of the last row, the system is inconsistent.

36 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 36 of 86 Summary Section 2.2 - Part 1  The process of pivoting on a specific entry of a matrix is to apply a sequence of elementary row operations so that the specific entry becomes 1 and the other entries in its column become 0.  To apply the Gaussian elimination method, proceed from left to right and perform pivots on as many columns to the left of the vertical line as possible, with the specific entries for the pivots coming from different rows.

37 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 37 of 86 Summary Section 2.2 - Part 2  After an augmented matrix has been completely reduced with the Gaussian elimination method, all the solutions to the corresponding system of linear equations can be obtained.  If the reduced augmented matrix has a 1 in every column to the left of the vertical line, then there is a unique solution.

38 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 38 of 86 Summary Section 2.2 - Part 3  If one row of the reduced augmented matrix has the form 0 0 0 … 0 | a where a ≠ 0, then there is no solution.  Otherwise, there are infinitely many solutions. In this case, variables corresponding to columns that have not been pivoted can assume any values, and the values of the other variables can be expressed in terms of those variables.

39 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 39 of 86 2.3 Arithmetic Operations on Matrices 1.Definition of Matrix 2.Column, Row and Square Matrix 3.Addition and Subtraction of Matrices 4.Multiplying Row Matrix to Column Matrix 5.Matrix Multiplication 6.Identity Matrix 7.Matrix Equation

40 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 40 of 86 Definition of Matrix A matrix is any rectangular array of numbers and may be of any size. The size of a matrix is nxk where n is the number of rows and k is the number of columns. The entry a ij refers to the number in the i th row and j th column of the matrix. Two matrices are equal provided that they have the same size and that all their corresponding entries are equal.

41 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 41 of 86 Example Definition of Matrix is a 2x3 matrix. The entry a 1,2 = -1. The entry a 2,3 = 7.

42 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 42 of 86 Column, Row and Square Matrix A row matrix or row vector only has one row. A column matrix or column vector only has one column. A square matrix has the same number of rows as columns.

43 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 43 of 86 Example Column, Row & Square Matrix is a 2x2 matrix and a square matrix. is a 1x4 matrix and a row matrix. is a 3x1 matrix and a column matrix.

44 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 44 of 86 Addition and Subtraction of Matrices The sum A + B of two matrices A and B is defined only if A and B are two matrices of the same size. In this case A + B is the matrix formed by adding the corresponding entries of A and B. Two matrices of the same size are subtracted by subtracting corresponding entries.

45 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 45 of 86 Example Addition & Subtraction is not defined.

46 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 46 of 86 Multiplying Row Matrix to Column Matrix If A is a row matrix and B is a column matrix, then we can form the product A  B provided that the two matrices have the same length. The product A  B is a 1x1 matrix obtained by multiplying corresponding entries of A and B and then forming the sum.

47 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 47 of 86 Example Multiplying Row to Column is not defined.

48 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 48 of 86 Matrix Multiplication If A is an mxn matrix and B is an nxq matrix, then we can form the product A  B. The product A  B is an mxq matrix whose entries are obtained by multiplying the rows of A by the columns of B. The entry in the i th row and j th column of the product A  B is formed by multiplying the i th row of A and j th column of B.

49 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 49 of 86 Example Matrix Multiplication 7 12 -5 -190 2 is not defined.

50 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 50 of 86 Identity Matrix The identity matrix I n of size n is the nxn square matrix with all zeros except for ones down the upper-left-to-lower-right diagonal. Here are the identity matrix of sizes 2 and 3:

51 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 51 of 86 Example Identity Matrix For all nxn matrices A, I n  A = A  I n = A.

52 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 52 of 86 Matrix Equation The matrix form of a system of linear equations is AX = B where A is the coefficient matrix whose rows correspond to the coefficients of the variables in the equations. X is the column matrix corresponding to the variables in the system. B is the column matrix corresponding to the constants on the right-hand side of the equations.

53 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 53 of 86 Example Matrix Equation Write the following system as a matrix equation Equation 1 Equation 2 x y constants

54 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 54 of 86 Summary Section 2.3 - Part 1  A matrix of size mxn has m rows and n columns.  Matrices of the same size can be added (or subtracted) by adding (or subtracting) corresponding elements.

55 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 55 of 86 Summary Section 2.3 - Part 2  The product of an mxn and an nxr matrix is the mxr matrix whose ij th element is obtained by multiplying the i th row of the first matrix by the j th column of the second matrix. (The product of each row and column is calculated as the sum of the products of successive entries.)

56 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 56 of 86 2.4 The Inverse of a Matrix 1.Inverse of A 2.Inverse of a 2x2 Matrix 3.Matrix With No Inverse 4.Solving a Matrix Equation

57 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 57 of 86 Inverse of A The inverse of a square matrix A, denoted by A -1, is a square matrix with the property A -1 A = AA -1 = I, where I is an identity matrix of the same size.

58 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 58 of 86 Example Inverse of A Verify that is the inverse of checks

59 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 59 of 86 Inverse of a 2x2 To determine the inverse of if  = ad - bc ≠ 0. 1.Interchange a and d to get 2.Change the signs of b and c to get 3.Divide all entries by  to get

60 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 60 of 86 Example Inverse of a 2x2 Find the inverse of 1. Interchange: 2. Change signs: 3. Divide:  = (-2)(7) - (4)(-3) = -2 ≠ 0

61 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 61 of 86 Matrix With No Inverse A matrix has no inverse if  = ad - bc = 0.

62 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 62 of 86 Example Inverse or No Inverse Use  to determine which matrix has an inverse. has no inverse. has an inverse.

63 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 63 of 86 Solving a Matrix Equation Solving a Matrix Equation If the matrix A has an inverse, then the solution of the matrix equation AX = B is given by X = A -1 B.

64 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 64 of 86 Example Solving a Matrix Equation Use a matrix equation to solve The matrix form of the equation is

65 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 65 of 86  A 2x2 matrix has an inverse if = ad - bc ≠ 0. If so, the inverse matrix is Summary Section 2.4 - Part 1  The inverse of a square matrix A is a square matrix A -1 with property that A -1 A = I and AA -1 = I, where I is the identity matrix.

66 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 66 of 86 Summary Section 2.4 - Part 2  A system of linear equations can be written in the form AX = B, where A is a rectangular matrix of coefficients of the variables, X is a column of variables, and B is a column matrix of the constants from the right side of the system. If the matrix A has an inverse, then the solution of the equation is given by X = A -1 B.

67 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 67 of 86 1.Gauss-Jordan Method for Inverses 2.5 The Gauss-Jordan Method for Calculating Inverses

68 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 68 of 86 Gauss-Jordan Method for Inverses Step 1: Write down the matrix A, and on its right write an identity matrix of the same size. Step 2: Perform elementary row operations on the left-hand matrix so as to transform it into an identity matrix. These same operations are performed on the right-hand matrix. Step 3: When the matrix on the left becomes an identity matrix, the matrix on the right is the desired inverse.

69 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 69 of 86 Example Inverses Find the inverse of Step 1: Step 2:

70 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 70 of 86 Example Inverses (2) Step 3:

71 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 71 of 86 Summary Section 2.5  To calculate the inverse of a matrix by the Gauss-Jordan method, append an identity matrix to the right of the original matrix and perform pivots to reduce the original matrix to an identity matrix. The matrix on the right will then be the inverse of the original matrix. (If the original matrix cannot be reduced to an identity matrix, then the original matrix does not have an inverse.)

72 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 72 of 86 2.6 The Input-Output Analysis 1.Input-Output Analysis 2.Input-Output Matrix 3.Final Demand 4.Production Level Problem

73 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 73 of 86 Input-Output Analysis Input-output analysis is used to analyze an economy in order to meet given consumption and export demands.

74 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 74 of 86 Input-Output Matrix The economy is divided into a number of industries. Each industry produces a certain output using the outputs of other industries as inputs. This interdependence among the industries can be summarized in a matrix - an input-output matrix. There is one column for each industry’s input requirements. The entries in the column reflect the amount of input required from each of the industries.

75 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 75 of 86 Input-Output Matrix - Form A typical input-output matrix looks like: Input requirements of: Each column gives the dollar values of the various inputs needed by an industry in order to produce $1 worth of output.

76 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 76 of 86 Example Input-Output Matrix An economy is composed of three industries - coal, steel, and electricity. To make $1 of coal, it takes no coal, but $.02 of steel and $.01 of electricity; to make $1 of steel, it takes $.15 of coal, $.03 of steel, and $.08 of electricity; and to make $1 of electricity, it takes $.43 of coal, $.20 of steel, and $.05 of electricity. Set up the input- output matrix for this economy.

77 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 77 of 86 Example Input-Output Matrix Answer

78 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 78 of 86 Final Demand The final demand on the economy is a column matrix with one entry for each industry indicating the amount of consumable output demanded from the industry not used by the other industries:

79 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 79 of 86 Example Final Demand An economy is composed of three industries - coal, steel, and electricity as in the previous example. Consumption (amount not used for production) is projected to be $2 billion for coal, $1 billion for steel and $3 billion for electricity. Set up the final demand matrix.

80 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 80 of 86 Example Final Demand Answer For simplicity, set up the final demand matrix in billions of dollars.

81 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 81 of 86 Production Level Problem Problem: Find the amount of production of each industry to meet the final demand of the economy. Our problem is to determine the output of each industry, X, that yields the desired amounts left over from the production process. Answer: X = (I - A) -1 D

82 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 82 of 86 Example Production Level Problem An economy is composed of three industries - coal, steel, and electricity as in the previous examples. Find the output of each industry that will meet the final demand.

83 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 83 of 86 Example Production Level Solution (1)

84 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 84 of 86 Example Production Level Solution (2) The three industries should produce $3.72 billion of coal, $1.78 billion of steel and $3.35 billion of electricity.

85 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 85 of 86 Summary Section 2.5 - Part 1  An input-output matrix has rows and columns labeled with the different industries in an economy. The ij th entry of the matrix gives the cost of the input from the industry in row i used in the production of $1 worth of the output of industry in column j.

86 Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 86 of 86 Summary Section 2.5 - Part 2  If A is an input-output matrix and D is a demand matrix giving the dollar values of the outputs from various industries to be supplied to outside customers, then the matrix X = (I - A) -1 D gives the amounts that must be produced by the various industries in order to meet the demand.


Download ppt "Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 86 Chapter 2 Matrices."

Similar presentations


Ads by Google