Chapter 4 Section 4.7 Similarity Transformations and Diagonalization Similar Matrices If A,B are two ๐ × ๐ and there is a third ๐ × ๐ matrix S that is non-singular (i.e. invertible) such that ๐ต = ๐ −1 ๐ด๐ then A and B are called similar matrices or A is similar to B. A is similar to B if there is a matrix S such that: ๐ต = ๐ −1 ๐ด๐ The reason we use the word similar is that the two matrices share many of the same features as some of the next results will show. Theorem If A and B are similar matrices then the characteristic polynomial for A call it ๐ ๐ก is equal to the characteristic polynomial for B call it ๐ ๐ก and the eigenvalues of A are the same as the eigenvalues of B with the same algebraic multiplicities. Let S be the non-singular matrix so that ๐ต = ๐ −1 ๐ด๐, that means that det ๐ ≠ 0. ๐ ๐ก = det ๐ต − ๐ก๐ผ = det ๐ −1 ๐ด๐ − ๐ก๐ผ = det ๐ −1 ๐ด๐ − ๐ก๐ −1 ๐ = det ๐ −1 ๐ด − ๐ก๐ผ ๐ = det ๐ −1 det ๐ด − ๐ก๐ผ det ๐ 1 = det ๐ det ๐ด − ๐ก๐ผ det ๐ = det ๐ด − ๐ก๐ผ =๐ ๐ก If the matrices have the same characteristic polynomials they will both factor the same way and have the same roots which are the eigenvalues. The number of time they occur in factored form will also be equal, giving equal algebraic multiplicities. Careful similar matrices may not have the same eigenvectors but they are related. Theorem If A and B are similar with non-singular matrix S, such that ๐ด = ๐ −1 ๐ต๐ and ๐ is an eigenvalue for A with corresponding eigenvector ๐ฏ ≠ ๐ฝ then the eigenvector that corresponds to the eigenvalue ๐ for B is the vector ๐๐ฏ. Since S is non-singular and ๐ฏ ≠ ๐ฝ then ๐๐ฏ ≠ 0. ๐ต ๐๐ฏ = ๐ผ ๐ต๐ ๐ฏ = ๐๐ −1 ๐ต๐ ๐ฏ = ๐ ๐ −1 ๐ต๐ ๐ฏ = ๐ ๐ด๐ฏ = ๐ ๐๐ฏ = ๐๐๐ฏ Therefore ๐ is an eigenvalue of B with corresponding eigenvector ๐๐ฏ. Corollary If A and B are similar with non-singular matrix S, such that ๐ด = ๐ −1 ๐ต๐ and ๐1 , โฏ , ๐๐ are eigenvalues of A with corresponding eigenvectors ๐ฏ1 , โฏ , ๐ฏ๐ then ๐1 , โฏ , ๐๐ are eigenvalues of B with corresponding eigenvectors S๐ฏ1 , โฏ , S๐ฏ๐ . Example For the matrix A to the right find the eigenvalues (there are 3) and corresponding eigenvectors ๐ฏ1 , ๐ฏ2 , ๐ฏ3 . Let ๐ = ๐ฏ1 , ๐ฏ2 , ๐ฏ3 , find ๐ −1 and use it to compute ๐ −1 ๐ด๐. 4 3 ๐ด = −6 −5 0 0 Use a 3rd row expansion to find the characteristic polynomial. 4−๐ก 3 2 4−๐ก ๐ ๐ก = −6 −5 − ๐ก 0 = 2−๐ก −6 0 0 2−๐ก = 2 − ๐ก ๐ก2 + ๐ก − 2 = 2 − ๐ก ๐ก + 2 ๐ก − 1 3 = 2−๐ก −5 − ๐ก 4 − ๐ก −5 − ๐ก + 18 The eigenvalues are : -2, 1, 2 2 0 2 1 12 6 3 2 ๐ด + 2๐ผ = −6 −3 0 , row reduces to 0 0 0 0 4 0 0 3 3 ๐ด − ๐ผ = −6 −6 0 0 2 ๐ด − 2๐ผ = −6 0 2 1 0 , row reduces to 0 1 0 1 0 0 1 0 3 2 −7 0 , row reduces to 0 1 0 0 0 0 0 −12 −1 1 , vector solution: ๐ฅ2 1 , let ๐ฏ1 = 2 0 0 0 0 −1 −1 1 , vector solution: ๐ฅ2 1 , let ๐ฏ2 = 1 0 0 0 7 −72 7 2 3 , vector solution: ๐ฅ3 −3 , let ๐ฏ3 = −6 2 0 1 −1 −1 Forming the matrix with eigenvector columns the matrix ๐ = ๐ฏ1 , ๐ฏ2 , ๐ฏ3 = 2 1 0 0 1 1 −12 Augmenting the matrix with I and row reducing it we get that ๐ −1 = −2 −1 4 1 0 0 2 1 1 ๐ −1 ๐ด๐ = −2 −1 0 0 −12 4 4 −6 1 0 2 3 −5 0 2 −1 −1 7 −2 0 0 2 1 −6 = 0 1 2 0 0 2 0 0 0 0 2 Observe that the result of the matrix computation ๐ −1 ๐ด๐ is a diagonal matrix with the eigenvalues of the matrix A going down the diagonal! This is not a coincidence. 7 −6 . 2 Theorem Let A be a ๐ × ๐ matrix with eigenvalues ๐1 , โฏ , ๐๐ if the basis vectors for the eigenspaces ๐ธ๐1 , โฏ , ๐ธ๐๐ form a complete basis for โ๐ (i.e. the are n vectors ๐ฏ1 , โฏ , ๐ฏ๐ in the combined bases for all the eigenspaces) then if we set ๐ = ๐ฏ1 , โฏ , ๐ฏ๐ the result of ๐ −1 ๐ด๐ will be a diagonal matrix with the eigenvalues of A going down the diagonal. The reason for this comes from making 2 observations 1. If ๐ฏ1 , โฏ , ๐ฏ๐ are eigenvectors of A then ๐ด๐ฏ1 = ๐1 ๐ฏ1 , โฏ , ๐ด๐ฏ๐ = ๐๐ ๐ฏ๐ . 2. Since ๐ −1 ๐ = ๐ผ = ๐1 , โฏ , ๐๐ then ๐ −1 ๐ฏ1 , โฏ , ๐ฏ๐ = ๐ −1 ๐ฏ1 , โฏ , ๐ −1 ๐ฏ๐ = ๐1 , โฏ , ๐๐ or that in other words ๐ −1 ๐ฏ1 = ๐1 , โฏ , ๐ −1 ๐ฏ๐ = ๐๐ . ๐ −1 ๐ด๐ = ๐ −1 ๐ด ๐ฏ1 , โฏ , ๐ฏ๐ = ๐ −1 ๐ด๐ฏ1 , โฏ , ๐ด๐ฏ๐ = ๐ −1 ๐1 ๐ฏ1 , โฏ , ๐๐ ๐ฏ๐ = ๐ −1 ๐1 ๐ฏ1 , โฏ , ๐ −1 ๐๐ ๐ฏ๐ = ๐1 ๐ −1 ๐ฏ1 , โฏ , ๐๐ ๐ −1 ๐ฏ๐ = ๐1 ๐1 , โฏ , ๐๐ ๐๐ Now write out the matrix ๐1 ๐1 , โฏ , ๐๐ ๐๐ we se that ๐1 ๐1 , โฏ , ๐๐ ๐๐ ๐1 = โฎ 0 โฏ 0 โฑ โฎ โฏ ๐๐ Diagonalizable Matrices A ๐ × ๐ matrix A is diagonalizable (or diagonalizes) if there is a non-singular matrix S such that ๐ −1 ๐ด๐ = ๐ท where the matrix D is a diagonal matrix. Theorem If the ๐ × ๐ matrix A is not defective then the matrix A is diagonalizable. Since the algebraic multiplicity is equal to the geometric multiplicity the total number of basis vector in all eigenspaces will be n. Example Determine if the matrix A to the right is diagonalizable. If the matrix is diagonalizable find a matrix S such that ๐ −1 ๐ด๐ = ๐ท where D is a diagonal matrix. ๐ด= 8 −6 9 −7 Begin by computing the characteristic polynomial ๐ ๐ก and eigenvalues. ๐ ๐ก = 8−๐ก −6 9 = 8 − ๐ก −7 − ๐ก + 54 = ๐ก 2 − ๐ก − 2 = ๐ก + 1 ๐ก − 2 −7 − ๐ก We see from the above polynomial the eigenvalues are -1 and 2. The eigenvalues are distinct so the matrix is not defective. Since A is not defective it is diagonalizable. To find S we need to compute a basis for each eigenspace. ๐ด+๐ผ = 9 9 1 1 −1 −1 , row reduces to , vector solution : ๐ฅ2 , let ๐ฏ1 = −6 −6 0 0 1 1 1 6 9 ๐ด − 2๐ผ = , row reduces to −6 −9 0 So ๐ = 3 2 0 , vector solution : ๐ฅ2 −32 −3 , let ๐ฏ2 = 2 1 1 2 −1 −3 , use the 2 × 2 matrix inverse formula for ๐ −1 = 1 1 2 −1 3 2 3 = −1 −1 −1 We can check this with the following computation: 8 9 −1 −3 −1 2 3 2 3 1 −6 ๐ −1 ๐ด๐ = = = 0 −1 −1 −6 −7 1 2 −1 −1 −1 4 0 2 Matrix Functions and Diagonal Matrices Diagonal matrices behave just like numbers for matrix functions that are polynomials. Begin by considering the product of two diagonal matrices which is another diagonal matrix. ๐11 โฎ 0 โฏ 0 โฑ โฎ โฏ ๐๐๐ ๐11 โฎ 0 โฏ 0 ๐11 ๐11 โฑ โฎ = โฎ โฏ ๐๐๐ 0 You can just multiply the corresponding diagonal entries. Taking a ๐๐กโ power of a diagonal matrix is a matter of taking a power of each diagonal entry. ๐11 โฎ 0 โฏ โฑ โฏ 0 โฎ ๐๐๐ ๐๐๐ โฏ 0 โฑ โฎ โฏ ๐๐๐ ๐ ๐ ๐11 = โฎ 0 โฏ 0 โฑ โฎ ๐ โฏ ๐๐๐ Multiplying a diagonal matrix by a scalar multiplies each diagonal entry. Adding two diagonal matrices adds the corresponding diagonal entries. Now if the function ๐ ๐ก is a polynomial function with ๐ ๐ก = ๐๐ ๐ก ๐ + โฏ + ๐1 ๐ก + ๐0 we get the following for a diagonal matrix D: ๐ ๐ท = ๐๐ ๐11 โฎ 0 โฏ 0 โฑ โฎ โฏ ๐๐๐ ๐ + โฏ + ๐0 ๐ ๐11 1 โฏ 0 โฎ โฎ โฑ โฎ = 0 0 โฏ 1 โฏ 0 โฑ โฎ โฏ ๐ ๐๐๐ The difficulty is what if the matrix is not a diagonal matrix? Finding a value of a certain matrix function could involve a great number of calculations considering how you do matrix multiplication. If the matrix you want to evaluate in the function is diagonalizable then there is a huge short cut. Example If matrix A is similar to B with non-singular matrix S such that ๐ต = ๐ −1 ๐ด๐ show that ๐ต2 = ๐ −1 ๐ด2 ๐ and ๐ต3 = ๐ −1 ๐ด3 ๐. ๐ต2 = ๐ −1 ๐ด๐ 2 = ๐ −1 ๐ด๐ ๐ −1 ๐ด๐ = ๐ −1 ๐ด ๐ −1 ๐ ๐ด๐ = ๐ −1 ๐ด๐ผ๐ด๐ = ๐ −1 ๐ด2 ๐ ๐ต3 = ๐ −1 ๐ด๐ ๐ −1 ๐ด๐ ๐ −1 ๐ด๐ = ๐ −1 ๐ด ๐ −1 ๐ ๐ด ๐ −1 ๐ ๐ด๐ = ๐ −1 ๐ด๐ผ๐ด๐ผ๐ด๐ = ๐ −1 ๐ด3 ๐ Computing Powers of Similar Matrices If A and B are similar matrices with ๐ต = ๐ −1 ๐ด๐ for a non-singular matrix S then for any positive integer m, ๐ต๐ = ๐ −1 ๐ด๐ ๐ and ๐ด๐ = ๐๐ต๐ ๐ −1. ๐ต๐ = ๐ −1 ๐ด๐ ๐ ๐ด๐ = ๐๐ต๐ ๐ −1 ๐ต๐ = ๐ −1 ๐ด๐ โฏ ๐ −1 ๐ด๐ = ๐ −1 ๐ด ๐ −1 ๐ โฏ ๐ −1 ๐ ๐ด ๐ = ๐ −1 ๐ด๐ผ โฏ ๐ผ๐ด ๐ = ๐ −1 ๐ด๐ ๐ ๐ ๐ก๐๐๐๐ ๐ ๐ก๐๐๐๐ ๐ ๐ก๐๐๐๐ Example Compute ๐ด5 where A is the matrix to the right from the previous example. We can take advantage of the fact that ๐ −1 ๐ด๐ = ๐ท a diagonal matrix to compute this where S and D are given to the right. −1 −3 −1 0 5 2 ๐ด = ๐๐ท ๐ = 0 2 −1 1 2 −3 98 99 −1 −3 −2 = = −66 −67 1 2 −32 −32 5 5 −1 3 −1 = −1 1 ๐= −1 1 ๐ด= 8 −6 9 −7 −1 0 −3 ,๐ท = 0 2 2 −3 −1 0 2 3 0 32 −1 −1 2 Instead of four matrix multiplications we only needed to do two or 50% faster! Computing Matrix Functions of Similar Matrices If A and B are similar matrices with ๐ต = ๐ −1 ๐ด๐ for a non-singular matrix S then and if ๐ ๐ก = ๐๐ ๐ก ๐ + โฏ + ๐1 ๐ก + ๐0 then the matrices ๐ ๐ด and ๐ ๐ต can be computed as given to the right. ๐ ๐ต = ๐ −1 ๐ ๐ด ๐ ๐ ๐ด = ๐๐ ๐ต ๐ −1 If we can express a function as a polynomial (that is defined for all values) then we can evaluate what the matrix is using this method. For example the function sin ๐ฅ is expressed as an infinite polynomial in the following way: ๐ฅ 3 ๐ฅ 5 ๐ฅ 7 ๐ฅ 9 ๐ฅ 11 sin ๐ฅ = ๐ฅ − + − + − ±โฏ 3! 5! 7! 9! 11! Example Compute sin ๐ด , for the previous matrix A given to the right. We can take advantage of the fact that ๐ −1 ๐ด๐ = ๐ท a diagonal matrix to compute this where S and D are given to the right. 8 9 −1 = ๐ sin −6 −7 0 −1 −3 2 sin −1 3 sin = − sin 2 sin 1 2 sin ๐ด= ๐= 0 −1 −3 sin −1 ๐ −1 = 0 2 1 2 −1 −2 sin −1 + 3 sin 2 = 2 2 sin −1 − 2 sin 2 −1 1 8 −6 9 −7 −1 0 −3 ,๐ท = 0 2 2 0 2 3 sin 2 −1 1 −3 sin −1 − 3 sin 2 3 sin −1 + 2 sin 2 Orthogonal Matrices If the columns of a ๐ × ๐ matrix ๐ = ๐1 , โฏ , ๐๐ form an orthonormal basis for โ๐ . That is the set of vectors ๐1 , โฏ , ๐๐ is a basis such that ๐๐๐ ๐๐ = 0 ๐๐๐ ๐ ≠ ๐ and ๐๐๐ ๐๐ = 1. The matrix Q is called an orthogonal matrix and has the property that ๐−1 = ๐๐ . Example Apply Gram-Schmidt to the basis for โ3 given to the right to find an orthogonal matrix Q. 1 0 0 0 −1 ๐ฐ1 = 0 , ๐ฐ2 = 1 − ๐๐๐๐๐ฐ1 1 = 1 − 2 −1 1 1 1 2 2 2 2 0 ๐ฐ3 = 1 − ๐๐๐๐๐ฐ1 1 − ๐๐๐๐๐ฐ2 1 = 1 − 2 2 2 2 2 ๐ฐ1 ๐ฐ1 1 2 = 0 , −1 1 2 ๐= 0 −1 2 1 6 2 6 1 6 ๐ฐ1 ๐ฐ1 1 3 −1 3 1 3 = 1 6 2 6 1 6 , ๐๐ = , ๐ฐ1 ๐ฐ1 1 2 1 6 1 3 = 0 2 6 −1 3 1 3 −1 3 1 3 −1 2 1 6 1 3 1 1 2 0 = 1 , ๐ฐ2 1 −1 2 1 1 6 0 −6 2 = −1 1 1 0 2 0 , 1 , 1 −1 1 2 1 = 2๐ฐ2 = 2 1 1 −1 1 This gives us an orthogonal basis for โ3 . Normalize each vector by dividing by its length to get a vector of length 1. This is now an orthonormal basis for โ3 . 1 2 ๐ ๐๐ = 0 −1 2 1 6 2 6 1 6 1 3 −1 3 1 3 1 2 1 6 1 3 0 2 6 −1 3 −1 2 1 6 1 3 1 0 = 0 1 0 0 0 0 1