Use symbolic linear algebraLesson 34 of 48 · 8 min
Find directions that keep their line
Interpret an eigenvector and verify its eigenvalue equation.
Maths refresher: Scaling along a direction
Multiplying a vector by a scalar changes its magnitude and possibly its sign without changing the line it lies on.
For , the vector becomes . Its eigenvalue is , and is another eigenvector on the same line.
An eigenvector is a nonzero vector whose transformed result remains on the same line. Its eigenvalue is the scalar multiplying that vector. The scalar may stretch, shrink, reverse or, in complex settings, have a broader interpretation.
SymPy eigenvals reports eigenvalues with algebraic multiplicity. eigenvects also reports bases for the corresponding eigenspaces. An eigenvector’s scale is not unique: any nonzero scalar multiple represents the same direction.
The symmetric matrix below has two real eigenvalues. Check the chosen direction directly by calculating . This zero-vector residual is clearer evidence than a picture alone. The zero vector is excluded from the definition because it would satisfy that equation for every scalar.
Must every eigenvector returned by another implementation have exactly the same scale?
Write a prediction (optional)
Exact symbolic investigation
Select Run Python with the code unchanged.
Your saved draft is open. To use the published code, select Restore example in Tools. Use Recover draft to bring back your code.
Tools
About Python
Python and the course packages can load while you read. Each run starts with fresh user variables; imported modules stay loaded. Stop replaces the worker. Runtime details ↗
Ctrl+Enter or ⌘+Enter runs Python.
Execution error
Technical error details
Your result
Python text output
Compare with the worked example
Executed from the published Python during the site build. Your own run appears above. Build environment ↗
Worked text output
Eigenvalues and multiplicities: {3: 1, 1: 1}
Eigenspace bases: [(1, 1, [Matrix([
[-1],
[ 1]])]), (3, 1, [Matrix([
[1],
[1]])])]
Chosen direction: Matrix([[1], [1]])
Eigen residual: Matrix([[0], [0]])
Read the starter result
Read Eigenspace bases as one list of basis vectors per eigenvalue. The starter Eigen residual is a zero vector, so the chosen direction satisfies the eigenvector equation. Any nonzero multiple represents the same line.
Edit and compare
Replace v = sp.Matrix([1,1]) with v = sp.Matrix([1,-1]). Check Eigenspace bases from your first run to choose the eigenvalue. Set eigenvalue = 3 to eigenvalue = 1 and select Run Python. Does Eigen residual verify that direction?
Scope. Eigenvalue multiplicity and eigenspace dimension differ in general; not every square matrix has a full eigenvector basis.
Try a fresh case
Why is the zero vector excluded from the eigenvector definition?
Need a hint?
Hint 1
Substitute into both sides.
Hint 2
No scalar can be distinguished that way.