System of m linear equations in n unknowns: Leontief Model. A... technology matrix x... production vector. x Ax = b. (I A)x = b (I A) 1

Size: px
Start display at page:

Download "System of m linear equations in n unknowns: Leontief Model. A... technology matrix x... production vector. x Ax = b. (I A)x = b (I A) 1"

Transcription

1 Lineares Gleichungssystem System of m linear equations in n unknowns: Chapter Linear Equations a x + a a n x n = b a 2 x + a a 2n x n = b 2 a m x + a m2 + + a mn x n = b m a a 2 a n x b a 2 a 22 a 2n b 2 a m } a m2 {{ a mn } x n }{{} b m }{{} coefficient matrix variables vector of constants A x = b Josef Leydold Mathematical Methods WS 29/2 Linear Equations / Matrix Representation Josef Leydold Mathematical Methods WS 29/2 Linear Equations 2 / Leontief Model Advantages of matrix representation: Short and compact notation Compare to A x = b n j= a ij x j = b i, for i =,, m We can transform equations by means of matrix algebra We can use names for parts of the equation, like PRODUCTION VECTOR, DEMAND VECTOR, TECHNOLOGY MATRIX, etc in the case of a Leontief model Input-output model with A technology matrix x production vector x = Ax + b b demand vector For a given output b we get the corresponding input x by x = Ax + b Ax x Ax = b (I A)x = b (I A) x = (I A) b Josef Leydold Mathematical Methods WS 29/2 Linear Equations / Solutions of a System of Linear Equations Josef Leydold Mathematical Methods WS 29/2 Linear Equations 4 / Row Echelon Form Three possibilities: The system of equations has exactly one solution The system of equations is inconsistent(not solvable) The system of equations has infinitely many solutions In Gaussian elimination the augmented coefficient matrix (A, b) is transformed into row echelon form Then the solution set is obtained by back substitution It is not possible to determine the number of solutions from the numbers of equations and unknowns We have to transform the system first In row echelon form the number of leading zeros strictly increases from one row to the row below a 2 a a 4 a 5 a 2 a 24 a a 5 For our purposes it is not required that the first nonzero entries are equal to Josef Leydold Mathematical Methods WS 29/2 Linear Equations 5 / Steps in Gaussian Elimination Josef Leydold Mathematical Methods WS 29/2 Linear Equations 6 / Example Gaussian Elimination We (have to) obtain the row echelon form (only) by means the following transformations which do not change the set of solutions: Multiplication of a row by some nonzero constant Addition of the multiple of some row to another row Exchange of two rows We first add 4 times the first row to the second row We denote this operation by R 2 R R Josef Leydold Mathematical Methods WS 29/2 Linear Equations 7 / Josef Leydold Mathematical Methods WS 29/2 Linear Equations 8 /

2 Example Gaussian Elimination Example Back Substitution R R R From the third row we immediately get: 775 x = 27 x = 5 We obtain the remaining variables and x by back substitution: = 5 = x = 7 x = 2 The solution is unique: x = (2,, 5) T Josef Leydold Mathematical Methods WS 29/2 Linear Equations 9 / Josef Leydold Mathematical Methods WS 29/2 Linear Equations / x x = x + x = 2 5 x x = R R 2 R The third row implies =, a contradiction This system of equations is inconsistent; solution set L = R 2 R 2 R, R R 5 R Josef Leydold Mathematical Methods WS 29/2 Linear Equations / Josef Leydold Mathematical Methods WS 29/2 Linear Equations 2 / 2 x x + x 4 = x x + 9 x 4 = x 2 x 6 x 4 = R R 2 R This equation has infinitely many solutions This can be seen from the row echelon form as there are more variables than nonzero rows R 2 2 R 2 R, R 2 R + R Josef Leydold Mathematical Methods WS 29/2 Linear Equations / Josef Leydold Mathematical Methods WS 29/2 Linear Equations 4 / The third row immediately implies 2 x 4 = 2 x 4 = 6 Back substitution yields 2 6 x + 8 ( 6) = 2 In this case we use pseudo solution x = α,, and get α + 4 ( 6) = = + α 2 x + 8 ( + α) + α + ( 6) = x = 7 7 α We obtain a solution for each value of α Using vector notation we obtain x 7 7 α x = x + α α + α x Thus the solution set of this equation is L = x = + α 6 Josef Leydold Mathematical Methods WS 29/2 Linear Equations 5 / Josef Leydold Mathematical Methods WS 29/2 Linear Equations 6 /

3 Equivalent Representation of Solutions In we also could use = α (instead of x = α) Then back substitution yields x 25 7 L = x = x x α Equivalent Representation of Solutions The set of solution points in can be interpreted as a line in a (4-dimensional) space The representations in L and L are thus parametric curves in R 4 with the same image L = L However, these two solution sets are equal, L = L! We thus have to different but equivalent representations of the same set x The solution set is unique, its representation is not! Josef Leydold Mathematical Methods WS 29/2 Linear Equations 7 / A Non-Example Josef Leydold Mathematical Methods WS 29/2 Linear Equations 8 / A Non-Example 2 x + = 2 x x = 4 4 x + 9 x = R 2 R 2 + R, R R 2 R Now one could find R R 7 R convenient However, destroys the already created row echelon form in the first column! Much better: R R 7 R Josef Leydold Mathematical Methods WS 29/2 Linear Equations 9 / Reduced Row Echelon Form Josef Leydold Mathematical Methods WS 29/2 Linear Equations 2 / Gauss-Jordan Elimination / In Gauss-Jordan elimination the augmented matrix is transformed into reduce row echelon form, ie, It is in row echelon form The leading entry in each nonzero row is a Each column containing a leading has s everywhere else Back substitution is then simpler a a 2 2 x x + x 4 = x x + 9 x 4 = x 2 x 6 x 4 = R 2 R, R 2 2 R 2 R, R 2 R + R Josef Leydold Mathematical Methods WS 29/2 Linear Equations 2 / Gauss-Jordan Elimination / Josef Leydold Mathematical Methods WS 29/2 Linear Equations 22 / Gauss-Jordan Elimination / R R 2 R 2, R 2 2 R 2, R R 2 R The third row immediately implies x 4 = 6 Set pseudo solution x = α, R R + 2 R, R 2 R 2 2 R, R 2 R, Back substitution yields = + α and x = 7 7 α Josef Leydold Mathematical Methods WS 29/2 Linear Equations 2 / Josef Leydold Mathematical Methods WS 29/2 Linear Equations 24 /

4 Gauss-Jordan Elimination / Gauss-Jordan Elimination / Thus the solution set of this equation is L = x = + α 6 Compare and x = + α 6 The positional vector ( 7,,, 6) T follows from the rhs of the reduced row echelon while the direction vector ( 7,,, ) T is given by the column without leading Josef Leydold Mathematical Methods WS 29/2 Linear Equations / Inverse of a Matrix Josef Leydold Mathematical Methods WS 29/2 Linear Equations 26 / Example Computation of the inverse A of matrix A by Gauss-Jordan elimination: () Augment matrix A by the corresponding identity matrix to the right (2) Transform the augmented matrix such that the identity matrix appears on the left hand side by means of the transformation steps of Gaussian elimination () Either the procedure is successful Then we obtain the inverse matrix A on the right hand side Compute the inverse of () Augment matrix A: 2 6 A = (4) Or the procedure aborts (because we obtain a row of zeros on the lhs) Then the matrix is singular Josef Leydold Mathematical Methods WS 29/2 Linear Equations 27 / Example Josef Leydold Mathematical Methods WS 29/2 Linear Equations 28 / Example (2) Transform: R R, R 2 R 2 R, R R + R 2 2 R R 2 R 2 2 R 2 R 2 R 2 4 () Matrix A is invertible with inverse 2 A = 4 Josef Leydold Mathematical Methods WS 29/2 Linear Equations 29 / Josef Leydold Mathematical Methods WS 29/2 Linear Equations / Compute the inverse of () Augment matrix A: A = (2) Transform: R R, R 2 R 2 2 R, R R 5 R R R R 2, R 2 R 2, R R R (4) Matrix A is not invertible Josef Leydold Mathematical Methods WS 29/2 Linear Equations / Josef Leydold Mathematical Methods WS 29/2 Linear Equations 2 /

5 Summary system of linear equations Gaussian elimination Gauss-Jordan elimination computation of inverse matrix Josef Leydold Mathematical Methods WS 29/2 Linear Equations /