Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Lecture 6 Linear Algebra Matrix Operations Special Matrices ECON 1150, Spring 2013 1. Systems of Linear Equations Consider the following equations: x1 + 2x2 = 2 (1) 2x1 – x2 = 4 (2) Method of substitution Solution: Method of elimination (x1*, x2*) ECON 1150, Spring 2013 Consider the following equations: 4x1 – x2 + 2x3 = 13 (1) x1 + 2x2 – 2x3 = 0 (2) -x1 + x2 + x3 = 5 (3) How is the solution (x1*, x2*, x3*) found? ECON 1150, Spring 2013 Row operations: •Multiply an equation by a nonzero constant •Add a multiple of one equation to another •Interchange any two equations Gaussian Elimination x1* = 2, x2* = 3, x3* = 4 ECON 1150, Spring 2013 General rule: To solve a system of linear equations with a unique solution, the number of linearly independent equations must be equal to the number of variables. If any equation of a system of equations can be derived from a series of row operations on that system, then this system is called linearly dependent. Otherwise, it is called linearly independent. ECON 1150, Spring 2013 The following systems are linearly dependent. 2x + y = 8 (1) x– y=1 (2) -1.5x + 3y = 1.5 –x – y + z =–2 3x + 2y – 2z = x – y + (3) z = (4) 7 (5) 4 (6) ECON 1150, Spring 2013 Equation system: m linearly independent equations n unknowns Case 1: m = n unique solution x + y = 10, x – y = 6 Case 2: m < n Infinitely many solutions x + y = 10 Case 3: m > n No solution. x + y = 10, –Spring y =20134, 2x – 3y = 6 ECON x 1150, General equation system a11x1 a12 x 2 a1n x b1 a21x1 a22 x 2 a2n x b 2 a31x1 a32 x 2 a3n x b 3 an1x1 an2 x 2 ann x b n Matrix algebra can help to a. simplify the expression b. solve the system efficiently ECON 1150, Spring 2013 c. testing the existence of a solution 2. Matrices and Vectors Cars required Week 1 Week 2 Week3 4 7 2 3 5 5 Compact 4 7 2 Intermediate 3 5 5 12 9 5 People carrier 2 1 3 2 1 3 Luxury limousine 1 1 2 1 1 2 Large A = 12 9 5 A matrix is a rectangular array of numbers. ECON 1150, Spring 2013 Order (dimension) of a matrix = (# of rows) x (# of columns) 1 2 3 4 1 X , Y 3 4 2 5 7 2x2 Row vector: a matrix with only one row [3 5 -6 1] 2x3 Column vector: a matrix with only one ECON 1150, Spring 2013 column 9 8 2 3 Two matrices are equal if they have the same order and the corresponding elements are equal. E.g., 1 x y 2 1 2 0 2x2 y 2 2x2 x = y = 2. ECON 1150, Spring 2013 3. Matrix Operations Addition and subtraction A M N Adding up elements of the same corresponding position Conformability: Same order Example 6.1: 1 2 2 5 1. ? 3 1 4 0 1 2 2 5 2. ? 3 1 4 0 0 2 3 4 1 3. ECON 5 1150, Spring 6 52013 ? 8 3 B M N C M N Scalar multiplication Conformability: Not required 1 2 3 A 4 5 6 2 4 6 2A 8 10 12 0.5 1 1.5 0.5 A 2 2.5 3 ECON 1150, Spring 2013 A M N Multiplication B N P C M P Conformability: The number of the columns of A is equal to the number of rows of B. Rule of matrix multiplication: The element of the ith row and jth column of matrix C ith row of A jth column of B and adding the resulting products. ECON 1150, Spring 2013 A M N B N P C M P 4 1 2 3 5 1 4 2 5 3 6 32 1x1 1x3 6 3x1 4 7 1 2 3 5 8 1x3 6 9 3x2 1 4 2 5 3 6 1 7 2 8 3 9 32 50 1x2 ECON 1150, Spring 2013 A M N B N P C M P 4 1 2 3 1 4 2 5 3 6 32 7 8 9 5 7 4 8 5 9 6 122 6 2x3 2x1 3x1 ECON 1150, Spring 2013 4 11 7 A , B 17 6 2 22 Let C = AB = c1 c . 2 c1 = 4(7) + 11(2) c2 = 17(7) + 6(2) 21 Then 4 11 7 A , B 17 6 2 4 11 7 A , B 17 6 2 4 11 7 47 112 50 AB 7 62 131 17 6 2ECON 1150, 17 Spring 2013 4 3 5 1 0 1 1 A , B 2 1 1 0 2 4 3 5 1 0 A B 1 1 23 32 2 1 1 0 2 5 4 11 00 5 3 11 02 2 4 1 1 1 0 2 3 1 1 1 2 21 16 9 5 22 ECON 1150, Spring 2013 Remark: • (AB)C = A(BC) • A(B + C) = AB + AC • (A + B)C = AC + BC ECON 1150, Spring 2013 4. Special Matrices 4.1 Square Matrices # of rows = # of columns E.g., 2 1 A , 22 4 2 7 2 3 B 4 8 1 33 5 6 4 ECON 1150, Spring 2013 4.2 Identity Matrices 1 0 0 I3 0 1 0 0 0 1 1 0 I2 , 0 1 For any M by N matrix A, IMA = AIN = A. 4.3 Null Matrices A matrix whose elements are all zero. ECON 1150, Spring 2013 4.4 The transpose of a matrix A is a new matrix AT such that the ith row of A is the ith column of AT. 3 8 - 9 A , 1 0 4 3 1 A T 8 0 9 4 4.5 Symmetric matrices A square matrix that is equal to its transpose. 1 4 - 5 A 4 - 2 6 A T - 5 6 ECON31150, Spring 2013