<<

5.2 Review of eigenvectors and eigenvalues

is an eigenvalue of A if A I =0 • | | This determinant is a in of degree n: so it has n roots , ,..., • 1 2 n Every symmetric A has a full set () of n orthogonal unit eigenvectors • e1, e2,...,en

No algebraic formula for the polynomial roots for n>4 • – Thus, the eigenvalue problem needs own special – Solving the eigenvalue problem is harder than solving Ax = b

Determinant A = n = (the product of eigenvalues) • | | i=1 i 1 2 ··· n The trace of a matrixQ is the sum of the diagonal elements. That is, • n trace(A)= i=1 aii = a11 + a22 + ...+ ann. It turns outP that trace(A)= n = + + ...+ (the sum of eigenvalues) • i=1 i 1 2 n Ak = A A has the same eigenvectorsP as A: e.g. for A2 • ··· k times Ae = e AAe = Ae = 2e | {z } )

Eigenvalues of Ak are k,...,k • 1 n 1 1 1 Eigenvalues of A are ,..., • 1 n

2 1 Example: Find the eigenvalues and eigenvectors of A = 12  Solution: First, find the eigenvalues of A by solving

2 1 A I = = 2 4 +3=( 1)( 3) = 0. | | 12 So the eigenvalues are 1 = 1 and 2 =3 The eigenvector associated with 1 =1ise1 and satisfies Ae1 = 1e1.Puttinge1 = x 1 we need to solve y  1 2 1 x x 1 = 1 . 12 y y   1  1

12 1 The second row gives x +2y = y ,soy = x .Sofixx = 1 and e = c for 1 1 1 1 1 1 1 1  1 any c = 0. If we choose c so that e is normalised, e = 1 . A similar argument 6 1 1 p2 1  1 shows e = 1 . 2 p2 1  Before leaving this example, it is worth looking at some of the properties of the eigen- values of A:

Determinant det A A =4 1=3 1 3=3 • ⌘| | () 1 · 2 ⌘ · trace(A)=2+2=4 + 1+3=4 • () 1 2 ⌘ 21 Inverse matrix A 1 = 1 : eigenvalues = 1 and =1 • 3 12 1 3 2 

2 5 4 Matrix A = : eigenvalues 1 = 1 and 2 =9 • 45 

3 14 13 Matrix A = : eigenvalues 1 = 1 and 2 = 27 • 13 14  ⇤

13 7.1 LU decomposition via Gaussian elimination

7.1.1 Gaussian elimination to solve systems linear (review)

You should be familiar with the process of Gaussian elimination (or row reduction)in which the Ax = b (where A is arbitrary) in transformed into the equivalent equation Cx = d where C is triangular, making the equation easy to solve. We review the process here. It is easy to show that multiplying both sides of Ax = b from the left by any nonsingular matrix M does not a↵ect the solution. That is MAx = Mb has the same solution as Ax = b,since

1 1 1 1 MAx = Mb x =(MA) Mb = A M Mb = A b. ) We know from the above result that we can multiple both sides by a series of elemen- tary matrices which perform various row operations on A: the three types of operation are row swapping, row multiplication and adding some multiple of one row to another row. Repeated application of these three operations (that is, repeated multiplication by elementary matrices) to both sides of the equation transforms it to Cx = d where C = M1 ...MkA is in upper triangular form (so the only non-zero elements of C are on or above the diagonal) and d = M1 ...Mkb. Example: Use Gaussian elimination to solve the system of equations Ax = b where

3212 4 6635 5 A = 2 3 and b = 2 3 3035 5 6 92787 6 10 7 6 7 6 7 4 A 5 x 4 b 5 Solution: 3212 x1 4 6635 x2 5 2z }| 3{ 2z }| 3{ = 2z }| 3{ 3035 x3 5 6 92787 6 x 7 6 10 7 6 7 6 4 7 6 7 4 5 4 5 4 5 1000 3212 x1 1000 4 2100 6635 x2 2100 5 2 3 2 3 2 3 = 2 3 2 3 ) 1010 3035 x3 1010 5 6 30017 6 92787 6 x 7 6 30017 6 10 7 6 7 6 7 6 4 7 6 7 6 7 4 5 4 5 4 5 4 5 4 5 Eliminating the first column: M1A x M1b | {z } | {z } | {z }

19 3212 x1 4 0211 x2 3 2 3 2 3 = 2 3 ) 0 223 x3 1 6 0 4427 6 x 7 6 2 7 6 7 6 4 7 6 7 4 5 4 5 4 5 1000 3212 x1 1000 4 0100 0211 x2 0100 3 2 3 2 3 2 3 = 2 3 2 3 ) 0110 0 223 x3 0110 1 6 02017 6 0 4427 6 x 7 6 02017 6 2 7 6 7 6 7 6 4 7 6 7 6 7 4 5 4 5 4 5 4 5 4 5 M2M1Ax M2M1b 3212 x 4 | {z 1 } | {z } 0211 x2 3 2 3 2 3 = 2 3 ) 0034 x3 2 6 00647 6 x 7 6 8 7 6 7 6 4 7 6 7 4 5 4 5 4 5 10 00 3212 x1 10 00 4 01 00 0211 x2 01 00 3 2 3 2 3 2 3 = 2 3 2 3 ) 00 10 0034 x3 00 10 2 6 00 217 6 00647 6 x 7 6 00 217 6 8 7 6 7 6 7 6 4 7 6 7 6 7 4 5 4 5 4 5 4 5 4 5 M3M2M1Ax M3M2M1b 321 2 x 4 | {z 1 } | {z } 021 1 x2 3 2 3 2 3 = 2 3 ) 003 4 x3 2 6 000 4 7 6 x 7 6 4 7 6 7 6 4 7 6 7 4 5 4 5 4 5 It is easy to see that the solution to this row reduced matrix equation is

4 x4 = 4 =1 x = 1 ( 2 4 1) = 2 3 3 · x = 1 ( 3 1 ( 2) 1 1) = 1 2 2 · · x = 1 (4 2 ( 1) 1 ( 2) 2 1) = 2 1 3 · · · ⇤

7.1.2 Gaussian elimination as LU decomposition

It turns out that Gaussian elimination can be viewed a LU decomposition in which a matrix A is written as the product of a lower L and an upper triangular matrix U so that A = LU. Recall that the Gaussian elimination process starts with an arbitrary A, multiplies it by a series of elementary vectors, M1 ...Mk to get U = M1 ...MkA where U is upper triangular (we called it C in the earlier discussion).

20 Now (check that you understand the following statements), each of the elementary matri- ces is lower triangular (so long as there are no row swapping operations) and the inverse 1 of lower triangular matrices are lower triangular too, so each of Mi , for i =1,...,k is lower triangular. Finally, the product of lower triangular matrices is also lower triangular so U = M ...M A = LU = A, 1 k ) 1 1 1 where L =(M1 ...Mk) = Mk ...M1 . If row permutations (row swaps) are needed in the Gaussian elimination process, we can’t find an LU decomposition for A but can find an LU decomposition for the permuted matrix PA,whereP describes the necessary permutations. Obviously, the permuted system has the same solution as the unpermuted system. The of solving a system of n equations in n unknown using Gaussian elimination is O(n3). It is typically a stable , though potential for instability arises when a leading non-zero entry is very small (as we divide through by this entry). Reordering of the rows before the start of the row reduction process so that the largest leading non-zero elements are selected first can avoid this cause of instability. This technique is known as pivoting. We won’t look further at LU decompositions but will spend considerable time looking first at singular value decomposition and its uses and, later, when we consider the Least Squares framework, QR decompositions and its applications.

21