Eigenvector and Eigenvalue Calculation Norman Poh.

11
Eigenvector and Eigenvalue Calculation Norman Poh

Transcript of Eigenvector and Eigenvalue Calculation Norman Poh.

Page 1: Eigenvector and Eigenvalue Calculation Norman Poh.

Eigenvector and Eigenvalue Calculation

Norman Poh

Page 2: Eigenvector and Eigenvalue Calculation Norman Poh.

Steps1. Compute the Eigenvalues by solving

polynomial equations to get eigenvalues– det() and set it to zero– If is an n-by-n matrix, you have to solve a

polynomial of degree n

2. Compute the Eigenvectors by solving a system of linear equations via Gaussian elimination– For each eigenvalue• Reduce the matrix to a triangular form• Apply back-substitution• Normalise the vector

Page 3: Eigenvector and Eigenvalue Calculation Norman Poh.

A walk-through example

• An example for solving a 3x3 matrix: – http://www.sosmath.com/matrix/eigen2/eigen2.html

• A calculator with a step-by-step solution using your own matrix:– http://karlscalculus.org/cgi-bin/linear.pl– Not useful for solving Eigenvectors as it ends up with a

trivial solution of 0 but you should stop before the last step.• Another one but does not always work:– http://

easycalculation.com/matrix/eigenvalues-and-eigenvectors.php

Page 4: Eigenvector and Eigenvalue Calculation Norman Poh.

What tools you can use?

• Matlab symbolic solver• Mathematica• Maple• Online – Expression simplifier:• http://

www.numberempire.com/simplifyexpression.php

– Equation solver:• http://www.numberempire.com/equationsolver.php

Page 5: Eigenvector and Eigenvalue Calculation Norman Poh.

An example

• Compute the Eigenvalues for:

– Compute det() and set it to zero– Simplify the expression: • (4-x)*((2-x)*(3-x)-1) - ( (3-x)-3) - 3*(-1+ 3 * (2-x))

– Solve it using an equation solver by setting it to zero

– Evaluate the solutions in Octave/Matlab

Page 6: Eigenvector and Eigenvalue Calculation Norman Poh.

A screenshot from http://www.numberempire.com/equationsolver.php

Page 7: Eigenvector and Eigenvalue Calculation Norman Poh.

Trick• Don’t worry about the complex numbers. In this

case, they are all real! You can be converted into real numbers using the following rules:

• Further reference:– http://

www.intmath.com/complex-numbers/4-polar-form.php

Page 8: Eigenvector and Eigenvalue Calculation Norman Poh.

Matlab/Octave example (demo)i=sqrt(-1)r(1) = (-sqrt(3)*i/2-1/2)*(sqrt(15)*i+7)^(1/3)+4*(sqrt(3)*i/2-1/2)/(sqrt(15)*i+7)^(1/3)+3r(2) = (sqrt(3)*i/2-1/2)*(sqrt(15)*i+7)^(1/3)+4*(-sqrt(3)*i/2-1/2)/(sqrt(15)*i+7)^(1/3)+3r(3) = (sqrt(15)*i+7)^(1/3)+4/(sqrt(15)*i+7)^(1/3)+3%in this example, we know the eigenvalues are all real, so we can do this:real(r)%Not sure, check:m=[4 1 -31 2 -1-3 -1 3]eig(m)%by convention, we sort the eigenvalues

Page 9: Eigenvector and Eigenvalue Calculation Norman Poh.

An example

(4-x)*((2-x)*(3-x)-1) - ( (3-x)-3) - 3*(-1+ 3 * (2-x))

Page 10: Eigenvector and Eigenvalue Calculation Norman Poh.

Further references

• http://en.wikipedia.org/wiki/Gaussian_elimination

Page 11: Eigenvector and Eigenvalue Calculation Norman Poh.

More on Complex numbers

• http://www.intmath.com/complex-numbers/5-exponential-form.php