Presentation is loading. Please wait.

Presentation is loading. Please wait.

DEF: Characteristic Polynomial (of degree n) QR - Algorithm Note: 1) QR – Algorithm is different from QR-Decomposition 2) a procedure to calculate the.

Similar presentations


Presentation on theme: "DEF: Characteristic Polynomial (of degree n) QR - Algorithm Note: 1) QR – Algorithm is different from QR-Decomposition 2) a procedure to calculate the."— Presentation transcript:

1 DEF: Characteristic Polynomial (of degree n) QR - Algorithm Note: 1) QR – Algorithm is different from QR-Decomposition 2) a procedure to calculate the eigenvalues of a matrix The eigenvalues of A are the n roots of its characteristic polynomial 1 2 3 The set of these roots is called the spectrum of A and denoted by for i=1:50 [Q,R]=qr(A); A=R*Q; end QR Algorithm:(Basic version) Find QR factorization Multiply in the reverse order

2 DEF: Characteristic Polynomial (of degree n) Eigenvalues & Eigenvectors The eigenvalues of A are the n roots of its characteristic polynomial 1 2 3 The set of these roots is called the spectrum of A and denoted by 4 5 6 If A is symmetric then all eigenvalues are reals

3 DEF: the nonzero vectors x that satisfy Eigenvalues & Eigenvectors are called eigenvectors. DEF: THM: same eigenvalues

4 Special Matrices DiagonalTridiagonalUpper triangular Upper Hessenberg Upper bidiagonal

5 Schur Factorization Schur Factorization: 1)A and T are similar 2)They have same eigenvalues 3)Eigenvalues of T are the diagonal entries

6 Example: Compute all eigenvalues of A: Schur Factorization IDEA: We need to construct the Schur factorization for i=1:50 [Q,R]=qr(A); A=R*Q; end QR Algorithm:(Basic version) >> eig(A)‘ -100.0111 -10.0988 -0.8901 A5 = -100.0111 0.0000 0.0000 0.0000 -10.0988 0.0000 0 0.0000 -0.8901 A3 = -100.0111 0.0010 0.0000 0.0010 -10.0988 0.0007 0 0.0007 -0.8901

7 All A’s are similar Compute all eigenvalues of A: Schur Factorization IDEA: We need to construct the Schur factorization for i=1:50 [Q,R]=qr(A); A=R*Q; end QR Algorithm:(Basic version) All A’s have same eigenvalues

8 Compute all eigenvalues of A: Schur Factorization IDEA: We need to construct the Schur factorization QR-factorization

9 Idea QR-factorization Bad Idea All zeros are destroyed

10 Idea Bad Idea Good Idea zeros are not destroyed

11 Idea Good Idea It is not upper triangular Hessenberg Givens

12 Idea Good Idea PHASE-I PHASE-II QR-Algorithm for i=1:50 [Q,R]=qr(A); A=R*Q; end QR Algorithm: for i=1:50 [Q,R]=qr(H); H=R*Q; end QR Algorithm: General matrix A Hessenberg H O(n^3)  All H’s are Hessenberg (why?)  We can upper triangularize H with a sequence of Givens O(n^2) 6n^2

13 for k=1:n-1 v=house(A(k+1:n,k); A(k+1:n,k:n)=(I-2*v*v’/v’*v)*A(k+1:n,k:n); A(1:n,k+1:n)=A(1:n,k+1:n)(I-2*v*v’/v*v); end Reduce  H Idea PHASE-I PHASE-II for i=1:50 [Q,R]=qr(H); H=R*Q; end QR Algorithm: If A is symmetric matrix, then H is Hessenberg and symmetric  A symmetric The work reduces to 50% or less

14 Example Slow Convergence PHASE-I PHASE-II A = 1 2 3 4 4 5 6 7 2 1 5 0 4 2 1 0 H = 1.0000 -5.0000 -1.5395 -1.2767 -6.0000 8.5556 0.1085 3.6986 0 -5.9182 -2.1689 -1.1428 0 0 -0.1428 3.6133 >> eig(A )' 11.1055 -3.8556 3.5736 0.1765 H20 = 11.1055 -4.7403 3.9060 -4.0296 -0.0000 -3.8526 -0.6899 1.2559 0 -0.0322 3.5706 0.1571 0 0 -0.0000 0.1765 H5 = 11.1328 4.5792 3.9941 -4.0372 -0.0905 -3.8908 0.5327 -1.2342 0 -0.1006 3.5815 0.1342 0 0 -0.0000 0.1765 Any solution for low convergence

15 Remark: Deflation Remark: We assume that H is unreduced. If not then we have Decouple and Deflation The problem decouples into two smaller problem

16 QR Algorithm with shift PHASE-II QR Algorithm with shift: A20 = 11.1055 -4.7403 3.9060 -4.0296 -0.0000 -3.8526 -0.6899 1.2559 0 -0.0322 3.5706 0.1571 0 0 -0.0000 0.1765 >> eig(A )' 11.1055 -3.8556 3.5736 0.1765 The theorem says that if we shift an exact eigenvalue, then in exact arithmetic deflation occurs in one step.

17 Example: QR Algorithm with shift PHASE-II QR Algorithm with shift: >> eig(A)' 11.1055 -3.8556 3.5736 0.1765 H = 1.0000 -5.0000 -1.5395 -1.2767 -6.0000 8.5556 0.1085 3.6986 0 -5.9182 -2.1689 -1.1428 0 0 -0.1428 3.6133 H1 = 3.3236 -5.5508 4.4353 2.6929 -8.0984 2.9128 -6.1528 -2.4688 0 -2.2250 1.1900 1.0296 0 0 -0.0017 3.5736 H2 = 2.4924 -9.7341 -2.5648 2.3834 -5.9560 5.0131 3.0854 -2.9507 0 -1.4702 -0.0791 0.0767 0 0 -0.0000 3.5736 deflation

18 Example: QR Algorithm with shift H = 1.0000 -5.0000 -1.5395 -1.2767 -6.0000 8.5556 0.1085 3.6986 0 -5.9182 -2.1689 -1.1428 0 0 -0.1428 3.6133 H1 = 3.3236 -5.5508 4.4353 2.6929 -8.0984 2.9128 -6.1528 -2.4688 0 -2.2250 1.1900 1.0296 0 0 -0.0017 3.5736 H2 = 2.4924 -9.7341 -2.5648 2.3834 -5.9560 5.0131 3.0854 -2.9507 0 -1.4702 -0.0791 0.0767 0 0 -0.0000 3.5736 Theory: quadratic conv Symmetric case : cubic H5 = 11.0798 5.2490 -3.2292 -0.0099 0.1708 1.2672 0 -0.0000 -3.8640 H4 11.0926 5.2199 -3.2299 -0.0368 0.1589 1.2723 0 -0.0029 -3.8649 H3 = 11.1418 5.2542 2.9806 -0.1409 0.0453 -1.4768 0 -0.1735 -3.8005 deflation

19 Eigenvalues of Symmetric Matrices PHASE-I PHASE-II for i=1:50 [Q,R]=qr(H); H=R*Q; end QR Algorithm: If A is symmetric matrix, then H is Hessenberg and symmetric  A symmetric T is tridiagonal O(n) Schur Factorization:

20 Wilkinson shift: QR Algorithm with wilkinson shift PHASE-II QR Algorithm with shift: A more effective choice is to shift by the eigenvalue of That is closer to Wilkinson has shown that: cubically convergent. Can we use this shift to non-symmetric matrix


Download ppt "DEF: Characteristic Polynomial (of degree n) QR - Algorithm Note: 1) QR – Algorithm is different from QR-Decomposition 2) a procedure to calculate the."

Similar presentations


Ads by Google