The method for symbolic computation of eigenvectors and eigenvalues involves first finding the eigenvalues from the characteristic polynomial:
det(M - λ I) = 0
where, in this case for three dimensional matrix M =
m00 |
m01 |
m02 |
m10 |
m11 |
m12 |
m20 |
m21 |
m22 |
which gives the characteristic equation:
-λ³ + λ²(m00 + m11 + i) + λ(m01 m10 + m02 m20 + m21 m12 - m00 m11 - i m00 - i m11) + (m00 m11 i - m00 m12 m21 - m01 m10 i + m10 m02 m21 + m20 m01 m12 - m20 m02 m11) = 0
We then need to solve this cubic equation to give uto 3 values of λ.
We can then substitute these into
m00 - λ |
m01 |
m02 |
m10 |
m11 - λ |
m12 |
m20 |
m21 |
m22 - λ |
|
= |
|
which is equivalent to solving 3 simultaneous equations.
Example - 3D Rotation Matrix
As descrtibed on this page. A 3D rotation matrix can be written:
[R] = c* |
|
+ t* |
x*x |
x*y |
x*z |
x*y |
y*y |
y*z |
x*z |
y*z |
z*z |
|
+s* |
|
where,
- c =cos(θ)
- s = sin(θ)
- t =1 - c
- x = normalised axis x coordinate
- y = normalised axis y coordinate
- z = normalised axis z coordinate
The eigenvalues are: e±iθ and 1 and the eigenvector is [x,y,z].
To check this, try λ=1:
c* |
|
+ t* |
x*x |
x*y |
x*z |
x*y |
y*y |
y*z |
x*z |
y*z |
z*z |
|
+s* |
|
-λ |
|
|
= |
|
giving:
c* |
|
+ t* |
x*x |
x*y |
x*z |
x*y |
y*y |
y*z |
x*z |
y*z |
z*z |
|
+s* |
|
- |
|
|
= |
|
now substitute t =1 - c:
(c-1)* |
|
+ (1-c)* |
x*x |
x*y |
x*z |
x*y |
y*y |
y*z |
x*z |
y*z |
z*z |
|
+s* |
|
|
= |
|
giving:
(1-c)* |
-y²-z² |
x*y |
x*z |
x*y |
-x²-z² |
y*z |
x*z |
y*z |
-x²-y² |
|
+s* |
|
|
= |
|
multiplying out the matrix by the vector gives:
(1-c)* |
(-y²-z²)*x+x*y²+x*z² |
x²*y+(-x²-z²)y+y*z² |
x²*z+y²*z+(-x²-y²)*z |
|
+s* |
-z*y+y*z |
z*x-x*z |
-y*x+x*y |
|
= |
|
Now try λ=eiθ= c + i s
t*x*x + c - λ |
t*x*y - z*s |
t*x*z + y*s |
t*x*y + z*s |
t*y*y + c - λ |
t*y*z - x*s |
t*x*z - y*s |
t*y*z + x*s |
t*z*z + c - λ |
|
|
= |
|
Program
There are a number of open source programs that can calculate eigenvalues and eigenvectors. I have used Axiom, how to install Axiom here.
To get a numeric solution for a given matrix, we can use eigenvalues(m)
and eigenvectors(m) as shown here:
I have put user input in red:
(1) -> m := matrix[[1,4,7],[2,5,8],[3,6,9]]
+1 4 7+
| |
(1) |2 5 8|
| |
+3 6 9+
Type: Matrix Integer
(2) -> ev := eigenvalues(m)
2
(2) [0,%A | %A - 15%A - 18]
Type: List Union(Fraction Polynomial Integer,SuchThat(Symbol,
Polynomial Integer))
(3) -> eigenvectors(m)
(3)
+ 1 +
| |
[[eigval= 0,eigmult= 1,eigvec= [|- 2|]],
| |
+ 1 +
+%G - 12+
|-------|
| 6 |
2 | |
[eigval= (%G | %G - 15%G - 18),eigmult= 1,eigvec= [|%G - 6 |]]]
|------ |
| 12 |
| |
+ 1 +
Type: List Record(eigval: Union(Fraction Polynomial
Integer,SuchThat(Symbol,Polynomial Integer)),eigmult:
NonNegativeInteger,eigvec: List Matrix Fraction Polynomial Integer)
|
Or we can find a general formula for a given matrix as shown here:
(1) -> msymb := matrix[[a,b,c],[d,e,f],[g,h,i]]
+a b c+
| |
(1) |d e f|
| |
+g h i+
Type: Matrix Polynomial Integer
(2) -> evsymb := eigenvalues(msymb)
(2)
[
%B
|
2
((a - %B)e - b d - %B a + %B )i + ((- a + %B)f + c d)h
+
2 2 3
(b f - c e + %B c)g + (- %B a + %B )e + %B b d + %B a - %B
]
Type: List Union(Fraction Polynomial Integer,
SuchThat(Symbol,Polynomial Integer))
(3) -> eigenvectors(msymb)
(3)
[
[
eigval =
%H
|
2
((a - %H)e - b d - %H a + %H )i + ((- a + %H)f + c d)h
+
2 2 3
(b f - c e + %H c)g + (- %H a + %H )e + %H b d + %H a - %H
,
eigmult= 1,
+ 2 2 +
| ((e - %H)h + b g)i - f h + (- c g - %H e + %H )h - %H b g |
| ---------------------------------------------------------- |
| 2 2 |
| d h + (- e + a)g h - b g |
| |
eigvec= [| 2 2 |]]
|(- d h + (- a + %H)g)i + (f g + %H d)h + c g + (%H a - %H )g|
|-------------------------------------------------------------|
| 2 2 |
| d h + (- e + a)g h - b g |
| |
+ 1 +
]
Type: List Record(eigval: Union(Fraction Polynomial Integer,
SuchThat(Symbol,Polynomial Integer))
,eigmult: NonNegativeInteger,eigvec:
List Matrix Fraction Polynomial Integer)
|