Consider square matrix . The eigenvalue problem asks for vectors , , scalars such that
(1) |
Eigenvectors are those special vectors whose direction is not modified by the matrix
Rewrite (1): , and deduce that must be singular in order to have non-trivial solutions
Consider the determinant
From determinant definition “sum of all products choosing an element from row/column”
is the characteristic polynomial associated with the matrix , and is of degree
has characteristic polynomial of degree , which has roots (Fundamental theorem of algebra)
Example
octave] |
theta=pi/3.; A=[cos(theta) -sin(theta); sin(theta) cos(theta)] |
A =
0.50000 -0.86603
0.86603 0.50000
octave] |
eig(A) |
ans =
0.50000 + 0.86603i
0.50000 - 0.86603i
octave] |
[R,lambda]=eig(A); |
octave] |
disp(R); |
0.70711 + 0.00000i 0.70711 - 0.00000i
0.00000 - 0.70711i 0.00000 + 0.70711i
octave] |
disp(lambda) |
Diagonal Matrix
0.50000 + 0.86603i 0
0 0.50000 - 0.86603i
octave] |
A=[-2 1 0 0 0 0; 1 -2 1 0 0 0; 0 1 -2 1 0 0; 0 0 1 -2 1 0; 0 0 0 1 -2 1; 0 0 0 0 1 -2]; |
octave] |
disp(A) |
-2 1 0 0 0 0
1 -2 1 0 0 0
0 1 -2 1 0 0
0 0 1 -2 1 0
0 0 0 1 -2 1
0 0 0 0 1 -2
octave] |
lambda=eig(A); |
octave] |
disp(lambda); |
-3.80194
-3.24698
-2.44504
-1.55496
-0.75302
-0.19806
octave] |
For , the eigenvalue problem 5 () can be written in matrix form as
If the column vectors of are linearly independent, then is invertible and can be reduced to diagonal form
Diagonal forms are useful in solving linear ODE systems
Also useful in repeatedly applying
When can a matrix be reduced to diagonal form? When eigenvectors are linearly independent such that the inverse of exists
Matrices with distinct eigenvalues are diagonalizable. Consider with eigenvalues for ,
Proof. By contradiction. Take any two eigenvalues and assume that would depend linearly on , for some . Then
and subtracting would give . Since is an eigenvector, hence we obtain a contradiction .
The characteristic polynomial might have repeated roots. Establishing diagonalizability in that case requires additional concepts
Example. has two single roots , and a repeated root . The eigenvalue has an algebraic multiplicity of 2
Finding eigenvalues as roots of the characteristic polynomial is suitable for small matrices .
analytical root-finding formulas are available only for
small errors in characteristic polynomial coefficients can lead to large errors in roots
Octave/Matlab procedures to find characteristic polynomial
poly(A) function returns the coefficients
roots(p) function computes roots of the polynomial
octave] |
A=[5 -4 2; 5 -4 1; -2 2 -3]; disp(A); |
5 -4 2
5 -4 1
-2 2 -3
octave] |
p=poly(A); disp(p); |
1.00000 2.00000 -1.00000 -2.00000
octave] |
r=roots(p); disp(r'); |
1.0000 -2.0000 -1.0000
octave] |
Find eigenvectors as non-trivial solutions of system
Note convenient choice of row operations to reduce amount of arithmetic, and use of knowledge that is singular to deduce that last row must be null
In traditional form the above row-echelon reduced system corresponds to
In Octave/Matlab the computations are carried out by the null function
octave] |
null(A+5*eye(3))' |
ans = [](0x3)
octave] |
The eigenvalues of are , but small errors in numerical computation can give roots of the characteristic polynomial with imaginary parts
octave> |
lambda=roots(poly(eye(3))); disp(lambda') |
1.00001 - 0.00001i 1.00001 + 0.00001i 0.99999 - 0.00000i
octave> |
In the following example notice that if we slightly perturb (by a quantity less than 0.0005=0.05%), the eigenvalues get perturb by a larger amount, e.g. 0.13%.
octave] |
A=[-2 1 -1; 5 -3 6; 5 -1 4]; disp([eig(A) eig(A+0.001*(rand(3,3)-0.5))]) |
3.0000 + 0.0000i 3.0005 + 0.0000i
-2.0000 + 0.0000i -2.0000 + 0.0161i
-2.0000 + 0.0000i -2.0000 - 0.0161i
octave] |
Extracting eigenvalues and eigenvectors is a commonly encountered operation, and specialized functions exist to carry this out, including the eig function
octave> |
[X,L]=eig(A); disp([L X]); |
-2.00000 0.00000 0.00000 -0.57735 -0.00000 0.57735
0.00000 3.00000 0.00000 0.57735 0.70711 -0.57735
0.00000 0.00000 -2.00000 0.57735 0.70711 -0.57735
octave> |
disp(null(A-3*eye(3))) |
0.00000
0.70711
0.70711
octave> |
disp(null(A+2*eye(3))) |
0.57735
-0.57735
-0.57735
octave> |
Recall definitions of eigenvalue algebraic and geometric multiplicities .
octave> |
A=[-2 1 -1; 5 -3 6; 5 -1 4]; [X,L]=eig(A); disp(L); |
Diagonal Matrix
-2.0000 0 0
0 3.0000 0
0 0 -2.0000
octave> |
disp(X); |
-5.7735e-01 -1.9153e-17 5.7735e-01
5.7735e-01 7.0711e-01 -5.7735e-01
5.7735e-01 7.0711e-01 -5.7735e-01
octave> |
disp(null(A+2*eye(3))); |
0.57735
-0.57735
-0.57735
octave> |
disp(rank(X)) |
2
octave> |
The SVD is determined by eigendecomposition of , and
, an eigendecomposition of . The columns of are eigenvectors of and called right singular vectors of
, an eigendecomposition of . The columns of are eigenvectors of and called left singular vectors of
The matrix has form
and are the singular values of .
The singular value decomposition (SVD) furnishes complete information about
(the number of non-zero singular values)
are orthogonal basis for the domain and codomain of