Matrices CHAPTER 8.1 ~ 8.8
Ch _2 Contents 8.1 Matrix Algebra 8.1 Matrix Algebra 8.2 Systems of Linear Algebra Equations 8.2 Systems of Linear Algebra Equations 8.3 Rank of a Matrix 8.3 Rank of a Matrix 8.4 Determinants 8.4 Determinants 8.5 Properties of Determinants 8.5 Properties of Determinants 8.6 Inverse of a Matrix 8.6 Inverse of a Matrix 8.7 Cramer’s Rule 8.7 Cramer’s Rule 8.8 The Eigenvalue Problem 8.8 The Eigenvalue Problem
Ch _3 8.1 Matrix Algebra Matrix The forms (x 1 x 2 … x n ) or(1) Each array in (1) is called a matrix.
Ch _4 Entry or Element: a mn, the members in the array Size: m n Square matrix: n n, n is called the order. Main diagonal entries: a nn A matrix is any rectangular array of numbers or functions (2) DEFINITION 8.1 Matrix
Ch _5 A n 1 matrix is called a column vector. A 1 n matrix is called a row vector. DEFINITION 8.2 Column and Row Vectors Two matrices A, B are equal if aij = bij. DEFINITION 8.4 Equality of Matrices
Ch _6 Example 1 (a) The following matrix are not equal, since they are not of the same size. (b) The following matrix are not equal, since the corresponding entries are not all equal.
Ch _7 The sum of two m n matrices A, B is A + B = (a ij + b ij ) m n DEFINITION 8.4 Matrix Addition
Ch _8 Example 2 (a)
Ch _9 Example 2 (2) (b) The sum is not defined.
Ch _10 If k is a real number, then the scalar multiple is DEFINITION 8.5 Scalar Multiple of a Matrix
Ch _11 If A, B, C are m n matrices, k 1 and k 2 are scalars (i) A + B = B + A (ii) A + (B + C) = (A + B) + C (iii) (k 1 k 2 ) A = k 1 (k 2 A) (iv) 1 A = A (v) k 1 (A + B) = k 1 A + k 1 B (vi) (k 1 + k 2 ) A = k 1 A + k 2 A THEOREM 8.1 Matrix Multiplication
Ch _12 If A is m p, B is p n, then the product is DEFINITION 8.6 Matrix Multiplication
Ch _13 Example 3 (a) (b) Note: In general, AB BA
Ch _14 We can write a system of linear equations as the form of product. eg: Associate Law: A(BC) = (AB)C Distributive Law: A(B + C) = AB + BC
Ch _15 The transpose of (2) is DEFINITION 8.7 Transpose of a Matrix
Ch _16 Note: (A + B + C) T = A T + B T + C T (ABC) T = C T B T A T Suppose A and B are matrices and k a scalar, (i) (A T ) T = A (ii) (A + B) T = A T + B T (iii) (AB) T = B T A T (iv) (kA) T = kA T THEOREM 8.2 Properties of Transpose
Ch _17 Zero Matrices A + 0 = A(4) andA + (–A) = 0(5)
Ch _18 Triangular Matrices For square n n matrices
Ch _19 Diagonal Matrices For square n n matrices, i≠j, a ij = 0
Ch _20 Scalar Matrices Diagonal matrices with equal a ii
Ch _21 Identity Matrices A: m n, then I m A = A I n = A
Ch _22 Symmetric An n × n matrix A is said to be symmetric if A T = A.
Ch _ Systems of Linear Algebraic Equations General Form (1)
Ch _24 Solution A solution of a (1) is said to be consistent if it has at least one solution and inconsistent if it has no solutions. If a linear system is consistent: (i) a unique solution (ii) infinitely many solutions See Fig 8.2
Ch _25 Fig 8.2
Ch _26 Example 1 Verify that x 1 = t, x 2 = 9 + 6t, x = t, where t is any real number, is a solution of 2x 1 – 3x 2 + x 3 = 1 x 1 – x 2 – x 3 = 5 Solution 2(14 + 7t) – 3(9 + 6t) + 4t = t – (9 + 6t) – t = 5 For each number of t, we obtain a different solution.
Ch _27 Solving Systems: Elementary Operations (i) Multiply an equation by a nonzero constant. (ii) Interchange the position of equations (iii) Add a nonzero multiple of one equation to another one.
Ch _28 Example 2 Solve 2x 1 + 6x 2 + x 3 = 7 x 1 + 2x 2 – x 3 = –1 5x 1 + 7x 2 – 4x 3 = 9 Solution (i) Interchange positions x 1 + 2x 2 – x 3 = –1 …(a) 2x 1 + 6x 2 + x 3 = 7…(b) 5x 1 + 7x 2 – 4x 3 = 9…(c) (ii) −2 (a) + (b) x 1 + 2x 2 – x 3 = –1 …(a) 2x 2 + 3x 3 = 9…(b)’ 5x 1 + 7x 2 – 4x 3 = 9…(c)
Ch _29 Example 2 (2) (iii) −5 (a) + (c) x 1 + 2x 2 – x 3 = –1 …(a) 2x 2 + 3x 3 = 9…(b)’ –3x 2 + x 3 = 14…(c)’ (iv) From (b)’ and (c)’, we have x 2 = −3, x 3 = 5, then x 1 = 10
Ch _30 Augmented Matrix To solve (1) we can use the augmented matrix (2)
Ch _31 Example 3 (a) The augmented matrix represents x 1 – 3x 2 + 5x 3 = 2 4x 1 + 7x 2 – x 3 = 8 (b)x 1 – 5x 3 = – 1 x 1 + 0x 2 – 5x 3 = – 1 2x 1 + 8x 2 = 7 and2x 1 + 8x 2 + 0x 3 = 7 x 2 + 9x 3 = 10x 1 + x 2 + 9x 3 = 1 are the same. Thus the matrix of the system is
Ch _32 Elementary Row Operations (i) Multiply a row by a nonzero constant. (ii) Interchange the position of rows (iii) Add a nonzero multiple of one row to another one. Matrices after elementary row operations are called row equivalent. The procedure is called row reduction.
Ch _33 Example 4 (a) and are in row-echelon form. (b) and are in reduced row-echelon form.
Ch _34 Example 5 Solve the equations in example 2. Solution (a)
Ch _35 Example 5 (2) and x 3 = 5, x 2 = –3, x 1 = 10
Ch _36 Example 5 (3) (b) we have the same solution.
Ch _37 Example 6 Use Gauss-Jordan method to solve x 1 + 3x 2 – 2x 3 = – 7 4x 1 + x 2 + 3x 3 = 5 2x 1 – 5x 2 + 7x 3 = 19 Solution
Ch _38 Example 6 (2) We havex 2 – x 3 = –3 x 1 + x 3 = 2 Let x 3 = t, then x 2 = –3 + t, x 1 = 2 – t.
Ch _39 Example 7 Solve x 1 + x 2 = 1 4x 1 − x 2 = −6 2x 1 – 3x 2 = 8 Solution We have = 16, no solutions.
Ch _40 Networks From Fig 8.3, we have or(3)
Ch _41 Fig 8.3
Ch _42 Example 8 Solve (3) where R 1 = 10 ohms, R 2 = 20 ohms, R 2 = 10 ohms, E = 12 volts Solution From the data, we have i 1 – i 2 – i 3 = 0 10i i 2 = 12 20i 2 – 10i 3 = 0
Ch _43 Example 8 (2) Use Gauss-Jordan method We have i 1 = 18/25, i 2 = 6/25, i 3 = 12/25.
Ch _44 Homogeneous Systems The system of equations (4) is always consistent, since x 1 = x 2 = … = x n = 0 will satisfy the system.
Ch _45 The system (4) possesses nontrivial solutions if the number m of equations is less than the number n of unknowns. THEOREM 8.3 Existence of Nontrivial Solutions
Ch _46 Example 9 Solve 2x 1 − 4x 2 + 3x 3 = 0 x 1 + x 2 − 2x 3 = 0 Solution Use Gauss-Jordan method
Ch _47 Example 9 (2) Let x 3 = t, then x 1 = (5/6)t, x 2 = (7/6)t, and the system has nontrivial solutions.
Ch _48 Example 10: Chemical Equations Balance C 2 H 6 + O 2 CO 2 + H 2 O Solution Assuming x 1 C 2 H 6 + x 2 O 2 x 3 CO 2 + x 4 H 2 O, we have2x 1 = x 3 (for C) 6x 1 = 2x 4 (for H) 2x 2 = 2x 3 + 2x 4 (for O) Then
Ch _49 Thus x 4 = t, x 1 = t/3, x 2 = 7t/6, x 3 = 2t/3. We choose t = 6, then x 1 = 2, x 2 = 7, x 3 = 4, x 4 = 6 2C 2 H 6 + 7O 2 4CO 2 + 6H 2 O Example 10 (2)
Ch _ Rank of a Matrix Introduction Row vectors: u 1 = (a 11 a 12 … a 1n ), u 2 = (a 21 a 22, … a 2n ),…, u m = (a m1 a m2 … a mn )
Ch _51 Column Vectors:
Ch _52 The rank of a m n matrix A, denoted by rank(A), is the maximum linearly independent row vectors. DEFINITION 8.8 Rank of a Matrix
Ch _53 Example 1 Consider (1) The row vectors are in turn denoted as u 1, u 2, u 3. Since 4u 1 – ½u 2 + u 3 = 0, they are linearly dependent. In addition, u 1 and u 2 are not constant multiple couples, so they are linearly independent. rank(A) = 2
Ch _54 Row Space As in Example 1, Span(u 1, u 2, u 3 ) is called the Row Space of A. If a matrix A is row equivalent to a row-echelon form B, then (i) Row space of A = Row space of B (ii) The nonzero rows form a basis for the row space of A (iii)rank(A) = the number of nonzero rows in B THEOREM 8.4 Rank of a Matrix by Row Reduction
Ch _55 Example 2 Consider the matrix in (1) rank(A) = 2
Ch _56 Example 3 Determine whether the set of u 1 =, u 2 =, u 3 = is linearly independent. Solution Form a matrix A by using u 1, u 2, u 3, and reduce it. We have rank(A) = 3, so the set of vectors is linearly independent.
Ch _57 Rank and Linear Systems Consider Make an augmented matrix and reduce it:
Ch _58 We have rank(A|B) = 3. Since then rank(A) = 2
Ch _59 AX = B is consistent if and only if rank(A|B) = rank(A) THEOREM 8.5 Consistence of AX = B Suppose AX = B with m equations and n unknowns is consistent. If rank(A) = r, then the solution contains n – r parameters. THEOREM 8.6 Number of Parameters in a Solution
Ch _60 Example x 1 + 3x 2 – 2x 3 = –7 4x 1 + x 2 + 3x 3 = 5(3) 2x 1 – 5x 2 + 7x 3 = 19 We already know that (3) is consistent and has infinitely many solutions. Since We have rank(A|B) = rank(A) = 2, then the number of parameter of the solution is 3 – 2 = 1.
Ch _61 Flow chart AX = 0 Always consistent Unique solution X = 0 rank(A) = n Infinity of solutions Rank(A) < n n – r parameters
Ch _62 AX = B, B≠0 Inconsistent rank(A) < rank(A│B) consistent rank(A) = rank(A│B) Unique solution rank(A) = n Infinity of solutions rank(A) < n n – r parameters
Ch _ Determinants Notation
Ch _64 eg: The determinant is (1) DEFINITION 8.9 Determinant of 2 × 2 Matrix
Ch _65 The determinant is (1) DEFINITION 8.10 Determinant of 3 × 3 Matrix
Ch _66 In view of (1), we have (4) where A has been expanded by cofactors along the first row, with the cofactors of a 11, a 12, a 13 : Thus det A = a 11 C 11 + a 12 C 12 + a 13 C 13 (5)
Ch _67 In general, the cofactors of a ij is C ij = (–1) i+ j M ij (6) where M ij is called a minor determinant. From (3), we have (8) Similarly, we can expand by cofactors along the third rows: det A = a 31 C 31 + a 32 C 32 + a 33 C 33 (9) Note: We can expand by cofactors along any rows or any columns.
Ch _68 Example 1 Find the determinant of Solution Along the first row:
Ch _69 Example 1 (2)
Ch _70 We also can expanded along the second row, since it has zero entry.
Ch _71 Example 2 Find the determinant of Solution Along the third column:
Ch _72 Let A = (a ij ) n × n ne an n × n matrix. For each the cofactor expansion of det A along the ith row is For each the cofactor expansion of det A along the ith column is THEOREM 8.7 Consistence of AX = B
Ch _73 Example 3 Find the determinant of Solution Along the fourth row where
Ch _74 Example 3 (2)
Ch _75 Example 3 (3)
Ch _ Properties of Determinants If A T is the transpose of the n × n matrix A, then det A T = det A THEOREM 8.8 Determinant of a Transpose If any two rows (columns) of an n × n matrix A are the same, then det A = 0. THEOREM 8.9 Two Identical Rows
Ch _77 Example 1
Ch _78 If all the entries in a row (column) of an n × n matrix A are all zeros, then det A = 0. THEOREM 8.10 Zero Row or Column If B is the matrix obtained by interchanging any two rows (columns) of an n × n matrix A, then det B = −det A THEOREM 8.11 Interchanging Rows
Ch _79 If B is obtained by interchanging the first and third row of
Ch _80 If B is obtained from an n × n matrix A by multiplying a row (column) by a nonzero real number k, then det B = k det A THEOREM 8.12 Constant Multiple of a Row
Ch _81 Example 2 (a) (b)
Ch _82 If A and B are both n × n matrices, then det AB = det A det B. THEOREM 8.13 Determinant of a Matrix Product
Ch _83 Example 3 Suppose then Now det AB = −24, det A = −8, det B = 3, Thus det AB = det A det B.
Ch _84 Suppose B is the matrix obtained from an n × n matrix A by multiplying the entries in a row (column) by Nonzero real number k and adding the result to the corresponding entries in another row (column). Then det B = det A. THEOREM 8.14 Determinant is Unchanged
Ch _85 Example 4 We have det A = 45 = det B = 45.
Ch _86 Proof Suppose A is an n × n matrix (upper or lower). Then det A = a 11 a 22 … a nn where a 11, a 22, …, a nn are the entries on the main diagonal of A. THEOREM 8.15 Determinant of a Triangular Product
Ch _87 Example 5 (a)
Ch _88 (b)
Ch _89 Example 6 Find the determinant of Solution
Ch _90 Example 6 (2)
Ch _91 Suppose A is a n n matrix. If a i1, a i2, …, a in are the entries in the ith row and C k1, C k2, …, C kn are the cofactors in the kth row, then a i1 C k1 + a i2 C k2 + …+ a in C kn = 0, for i k If a 1j, a 2j, …, a nj are the entries in the jth column and C 1k, C 2k, …, C nk are the cofactors in the kth column, then a 1j C 1k + a 2j C 2k + …+ a nj C nk = 0, for j k THEOREM 8.16 A Property of Cofactors
Ch _92 THEOREM 8.16 Proof Let B be the matrix obtained from A by letting the entries in the ith row of A be the same as the ones in the kth row, that is, a i1 = a k1, a i2 = a k2, …, a in = a kn then there are two identical rows in B, det B = 0, then
Ch _93 Example 7 Consider the matrix we have
Ch _ Inverse of a Matrix Note: If A has no inverse, then A is called singular. Let A be an n n matrix. If there exists an n n matrix B such that AB = BA = I(1) where I is the n n identity, then A is said to be nonsingular or invertible. Then B is said to be the inverse of A. DEFINITION 8.11 Inverse of a Matrix
Ch _95 Proof (i)A -1 A = AA -1 = I, A = (A -1 ) -1 (ii)(AB)(AB) -1 = I, B -1 A -1 (AB)(AB) -1 = B -1 A -1 (AB) -1 = B -1 A -1 Let A, B be nonsingular matrices. (i)(A -1 ) -1 = A (ii)(AB) -1 = B -1 A -1 (iii)(A T ) -1 = (A -1 ) T THEOREM 8.17 Properties of the Inverse
Ch _96 Let A be an n × n matrix. The matrix that is the Transpose of the matrix of cofactors corresponding to the entries of A: is called the adjoint of A and is denoted by adj A. DEFINITION 8.12 Adjoint Matrix
Ch _97 Proof For n = 3, (3) Let A be an n × n matrix. If det A 0, then (2) THEOREM 8.18 Finding the Inverse
Ch _98 From Theorem 8.16, we have Thus A -1 = adj A/det A
Ch _99 For 2 2 matrix (4)
Ch _100 For 3 3 matrix (5)
Ch _101 Example 1 Find the inverse of Solution Check
Ch _102 Example 2 Find the inverse of Solution Since
Ch _103 Example 2 (2) We have
Ch _104 An n n matrix A is nonsingular if and only if det A 0 THEOREM 8.19 Nonsingular Matrices and det A
Ch _105 Example 3 has no inverse. A is singular, since det A = 0
Ch _106 An n n matrix A can be transformed into the n n identity matrix I by a sequence of elementary row operations, then A is nonsingular. The same operations that transforms A into the identity I will also transform I into A -1. THEOREM 8.20 Finding the Inverse
Ch _107 First we construct the augmented matrix (A|I), and the process for finding A -1 is outlined.
Ch _108 Row operations on A until I is obtained )IA(| )A|I( 1 Simultaneously applying the same operations
Ch _109 Example 4 Find the inverse of Solution
Ch _110 Example 4 (2)
Ch _111 Example 4 (3) Thus
Ch _112 Example 5 Find the inverse of Solution
Ch _113 Example 5 (2) There is a row of zeros, it is singular
Ch _114 Using the Inverse A system of m linear equations in n unknowns (6) can be written as AX = B, where
Ch _115 Special Case When m = n, if A is nonsingular, then X = A -1 B(7)
Ch _116 Example 6 Use the inverse to solve Solution The system can be written as Since, it is nonsingular. From (4)
Ch _117 Example 6 (2) Using (7) Thus
Ch _118 Example 7 Use the inverse to solve Solution From the equations we have
Ch _119 Example 7 (2) Thus (7) gives Thus
Ch _120 A homogeneous system of n linear equations in n unknowns AX = 0 has only the trivial solution if and only if A is nonsingular. THEOREM 8.21 Trivial Solution Only A homogeneous system of n linear equations in n unknowns AX = 0 has a nontrivial solution if and only if A is singular. THEOREM 8.22 Existence of Nontrivial Solutions
Ch _ Cramer’s Rule Introduction For example, the equations (1) possesses the solution (2) where a 11 a 22 – a 12 a 21 0
Ch _122 Rewrite (2) as determinant forms, we have (3)
Ch _123 Special Matrix For the following system (4)
Ch _124 We define a special matrix
Ch _125 Let A be the coefficient matrix of the system (1). If det A 0, then the solution of (1) is given by where A k, k = 1, 2, …, n, is defined in (5) THEOREM 8.23 Cramer’s Rule
Ch _126 Proof
Ch _127 Now the entry in the kth row is (7)
Ch _128 Example 1 Solve Solution
Ch _129 Example 1 (2) From (3), we have
Ch _ The Eigenvalue Problems Let A be n n matrix. A number is said to be an eigenvalue of A if there exists a nonzero solution vector K of AK = K(1) The solution vector K is said to be an eigenvector corresponding to the eigenvalue. DEFINITION 8.13 Eigenvalues and Eigenvectors
Ch _131 Example 1 Verify that is an eigenvector of the matrix Solution Since we conclude that K is an eigenvector of A.
Ch _132 From (1), we have (A – I)K = 0(2) However, (2) is the same as a homogeneous system of linear equations. Since we want K to be nontrivial, we must have det (A – I) = 0(4) Inspection of (4) shows det (A – I) results in an nth- degree polynomial in, and is called the characteristic equation.
Ch _133 Example 2 Find the eigenvalues and eigenvectors of Solution
Ch _134 Example 2 (2) We have – 3 – = 0 or ( + 4)( – 3) = 0 then = 0, −4, 3. To find the eigenvectors, (i) 1 = 0,
Ch _135 Example 2 (3) Choose k 3 = −13, then
Ch _136 Example 2 (4) (ii) For 2 = −4,
Ch _137 Example 2 (5) implies k 1 = −k 3, k 2 = 2k 3. Choose k 3 = 1, then
Ch _138 Example 2 (6) (iii) 2 = 3, implies k 1 = – k 3, k 2 = –(3/2)k 3. Choose k 3 = –2,
Ch _139 Example 3 Find the eigenvalues and eigenvectors of Solution We see 1 = 2 = 5 is an eigenvalue of multiplicity 2. From (A – 5I|0), we get
Ch _140 Example 3 (2) Choose k 2 = 1, we have k 1 = 2, then We can have only one eigenvector though A is a 2 2 matrix.
Ch _141 Example 4 Find the eigenvalues and eigenvectors of Solution We see 1 = 11, 2 = 3 = 8 is of multiplicity 2.
Ch _142 Example 4 (2) (i) For 1 = 11, Gauss-Jordan method gives Hence k 1 = k 3, k 2 = k 3. If k 3 = 1, then
Ch _143 Example 4 (3) (ii) Now for 2 = 8, we have For k 1 + k 2 + k 3 = 0, we can select two of them arbitrarily. We choose: k 2 = 1, k 3 = 0, and k 2 = 0, k 3 = 1, then
Ch _144 Proof Since AK = K, The proof is completed. Let A be a square matrix with real entries. If = + i , 0, is a complex eigenvalue of A, then its conjugate is also an eigenvalue of A. If K is an eigenvector corresponding to, then is an eigenvector corresponding to. THEOREM 8.24 Complex Eignvalues and Eigenvectors
Ch _145 Example 5 Find the eigenvalues and eigenvectors of Solution For 1 = 5 + 2i,
Ch _146 Example 5 (2) Since k 2 = (1 – 2i) k 1, after choosing k 1 = 1, then From Theorem 8.24, then
Ch _147 The eigenvalues of an upper triangular, lower triangular, or diagonal matrix are the main diagonal entries. THEOREM 8.25 Triangular and Diagonal Matrices