Scientific Computing QR Factorization Part 2 – Algorithm to Find Eigenvalues.

Slides:



Advertisements
Similar presentations
6.1 Eigenvalues and Diagonalization. Definitions A is n x n. is an eigenvalue of A if AX = X has non zero solutions X (called eigenvectors) If is an eigenvalue.
Advertisements

Lecture 13 - Eigen-analysis CVEN 302 July 1, 2002.
The QR iteration for eigenvalues. ... The intention of the algorithm is to perform a sequence of similarity transformations on a real matrix so that the.
DEF: Characteristic Polynomial (of degree n) QR - Algorithm Note: 1) QR – Algorithm is different from QR-Decomposition 2) a procedure to calculate the.
Lecture 19 Singular Value Decomposition
Slides by Olga Sorkine, Tel Aviv University. 2 The plan today Singular Value Decomposition  Basic intuition  Formal definition  Applications.
Linear Transformations
Symmetric Matrices and Quadratic Forms
Symmetric Matrices and Quadratic Forms
3D Geometry for Computer Graphics
ENGG2013 Unit 19 The principal axes theorem
Chapter 6 Eigenvalues.
Math for CSTutorial 41 Contents: 1.Least squares solution for overcomplete linear systems. 2.… via normal equations 3.… via A = QR factorization 4.… via.
6 1 Linear Transformations. 6 2 Hopfield Network Questions.
NUU Department of Electrical Engineering Linear Algebra---Meiling CHEN1 Lecture 28 is positive definite Similar matrices Jordan form.
Matrix Algebra THE INVERSE OF A MATRIX © 2012 Pearson Education, Inc.
Digital Control Systems Vector-Matrix Analysis. Definitions.
化工應用數學 授課教師: 郭修伯 Lecture 9 Matrices
5.1 Orthogonality.
Numerical Analysis 1 EE, NCKU Tien-Hao Chang (Darby Chang)
Scientific Computing Matrix Norms, Convergence, and Matrix Condition Numbers.
Orthogonal Matrices and Spectral Representation In Section 4.3 we saw that n  n matrix A was similar to a diagonal matrix if and only if it had n linearly.
Scientific Computing QR Factorization Part 1 – Orthogonal Matrices, Reflections and Rotations.
CHAPTER SIX Eigenvalues
Eigenvalue Problems Solving linear systems Ax = b is one part of numerical linear algebra, and involves manipulating the rows of a matrix. The second main.
8.1 Vector spaces A set of vector is said to form a linear vector space V Chapter 8 Matrices and vector spaces.
1 MAC 2103 Module 12 Eigenvalues and Eigenvectors.
PHY 301: MATH AND NUM TECH Chapter 5: Linear Algebra Applications I.Homogeneous Linear Equations II.Non-homogeneous equation III.Eigen value problem.
CHAPTER 2 MATRIX. CHAPTER OUTLINE 2.1 Introduction 2.2 Types of Matrices 2.3 Determinants 2.4 The Inverse of a Square Matrix 2.5 Types of Solutions to.
Gram-Schmidt Orthogonalization
Eigenvalues and Eigenvectors
Linear Algebra (Aljabar Linier) Week 10 Universitas Multimedia Nusantara Serpong, Tangerang Dr. Ananda Kusuma
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.
Linear algebra: matrix Eigen-value Problems
Computing Eigen Information for Small Matrices The eigen equation can be rearranged as follows: Ax = x  Ax = I n x  Ax - I n x = 0  (A - I n )x = 0.
5 5.2 © 2012 Pearson Education, Inc. Eigenvalues and Eigenvectors THE CHARACTERISTIC EQUATION.
Chapter 5 Eigenvalues and Eigenvectors 大葉大學 資訊工程系 黃鈴玲 Linear Algebra.
Class 27: Question 1 TRUE or FALSE: If P is a projection matrix of the form P=A(A T A) -1 A T then P is a symmetric matrix. 1. TRUE 2. FALSE.
Chapter 5 MATRIX ALGEBRA: DETEMINANT, REVERSE, EIGENVALUES.
Co. Chapter 3 Determinants Linear Algebra. Ch03_2 Let A be an n  n matrix and c be a nonzero scalar. (a)If then |B| = …….. (b)If then |B| = …..... (c)If.
Scientific Computing Singular Value Decomposition SVD.
Diagonalization and Similar Matrices In Section 4.2 we showed how to compute eigenpairs (,p) of a matrix A by determining the roots of the characteristic.
Elementary Linear Algebra Anton & Rorres, 9 th Edition Lecture Set – 07 Chapter 7: Eigenvalues, Eigenvectors.
5.1 Eigenvectors and Eigenvalues 5. Eigenvalues and Eigenvectors.
Linear Algebra Chapter 6 Linear Algebra with Applications -Gareth Williams Br. Joel Baumeyer, F.S.C.
5 5.1 © 2016 Pearson Education, Ltd. Eigenvalues and Eigenvectors EIGENVECTORS AND EIGENVALUES.
7 7.2 © 2016 Pearson Education, Ltd. Symmetric Matrices and Quadratic Forms QUADRATIC FORMS.
Algorithm for non-negative matrix factorization Daniel D. Lee, H. Sebastian Seung. Algorithm for non-negative matrix factorization. Nature.
MA5233 Lecture 6 Krylov Subspaces and Conjugate Gradients Wayne M. Lawton Department of Mathematics National University of Singapore 2 Science Drive 2.
Matrices CHAPTER 8.9 ~ Ch _2 Contents  8.9 Power of Matrices 8.9 Power of Matrices  8.10 Orthogonal Matrices 8.10 Orthogonal Matrices 
Reduced echelon form Matrix equations Null space Range Determinant Invertibility Similar matrices Eigenvalues Eigenvectors Diagonabilty Power.
Introduction Types of Matrices Operations
Chapter 5 Eigenvalues and Eigenvectors
Krylov-Subspace Methods - I
Elementary Linear Algebra Anton & Rorres, 9th Edition
Eigenvalues and Eigenvectors
CHAPTER 8.9 ~ 8.16 Matrices.
Linear Algebra Lecture 36.
Euclidean Inner Product on Rn
Symmetric Matrices and Quadratic Forms
EIGENVECTORS AND EIGENVALUES
Linear Algebra Lecture 41.
Linear Algebra Lecture 29.
Performance Optimization
Linear Algebra Lecture 30.
Linear Algebra Lecture 35.
Eigenvalues and Eigenvectors
Linear Algebra: Matrix Eigenvalue Problems – Part 2
Eigenvectors and Eigenvalues
Linear Algebra Lecture 28.
Presentation transcript:

Scientific Computing QR Factorization Part 2 – Algorithm to Find Eigenvalues

Similar Matrices Definition: A and B are similar matrices if and only if there exists a nonsingular matrix P such that B = P -1 AP. (or PBP -1 =A) Theorem: Similar matrices have the same set of eigenvalues. Proof: Since Ap = p  PBP -1 p = p  P -1 (PBP -1 p) = P -1 ( p)  B(P -1 p) = (P -1 p). Then, is an eigenvalue of A (with eigenvector p)  is an eigenvalue of B (with eigenvector P -1 p). QED

QR Algorithm Given square matrix A we can factor A = QR where Q is orthogonal and R is upper triangular. Algorithm to find eigenvalues: Start: A 0 = A= QR (note: R = Q t A) A 1 = RQ = Q t A Q (A and A 1 are similar) Factor: A 1 =Q 1 R 1 A 2 =R 1 Q 1 = Q 1 t Q t A Q Q 1 (similar to A 1 ) General: Given A m Factor: A m =Q m R m A m+1 =R m Q m (similar to A m, …, A 1, A)

QR Algorithm Note: If the eigenvalues of A satisfy | 1 |> | 2 |> … >| n | Then, the iterates A m converge to an upper triangular matrix having the eigenvalues of A on the diagonal. (Proof omitted)

QR Algorithm Example Example: Use the slow_qr algorithm to find the iterates A m for

QR Algorithm Example >> A=[4 2/3 -4/3 4/3; 2/ ; -4/ ; 4/ ]; >> [q r] = slow_qr(A); >>A1= r*q A1 =

QR Algorithm Example >> [q r] = slow_qr(A1); >> A2 = r*q A2 =

QR Algorithm Example >> [q r] = slow_qr(A2); >> A3 = r*q A3 =

QR Algorithm Example >> [q r] = slow_qr(A3); >> A4 = r*q A4 =

QR Algorithm Example >> [q r] = slow_qr(A4); >> A5 = r*q A5 =

QR Algorithm Example >> [q r] = slow_qr(A5); >> A6 = r*q A6 = Note: Off diagonal elements are -> 0 and eigenvalues appear to be 6, 4, 8, 2 (One can show these are the exact values)

QR Algorithm- Eigenvectors How do we compute the eigenvectors? Note: A m = Q m-1 t … Q 1 t Q t A Q Q 1 … Q m-1 Let Q * = Q Q 1 … Q m-1 Then, A m = Q *t A Q * If A m becomes diagonal, the eigenvectors of A m are e 1, e 1, …, e n. Since A m and A are similar, the eigenvectors of A are (Q *t ) -1 e i =Q * I, that is the eigenvectors of A are the columns of Q *. Thus, if A is symmetric (A t = A) then the eigenvectors of A are the columns of Q *.

QR Algorithm Example Example: Find the eigenvectors for:

QR Algorithm Example >> A=[4 2/3 -4/3 4/3; 2/ ; -4/ ; 4/ ]; >> [q r] = slow_qr(A); >> q1 = q q1 =

QR Algorithm Example >> A1=r*q; >> [q r] = slow_qr(A1); >> q2 = q1*q q2 =

QR Algorithm Example >> A2 = r*q; >> [q r] = slow_qr(A2); >> q3 = q2*q q3 =

QR Algorithm Example Class Discussion: Create a matlab function function [Q* Ak] = eigenQ(A,k) that will carry out this iteration and return the matrix Q* and the matrix Ak that you get by iterating the QR algorithm k times.

QR Algorithm Example >> [Q Am] = eigenQ(A, 15) Q = Ak =

QR Algorithm Example Check: >> A*Q(1:4,1)-6*Q(1:4,1) ans = 1.0e-06 *