Properties of Eigenvectors and Eigenvalues
Eigenvalues follow a handful of rules that save a lot of computation: they add up to the trace, multiply to the determinant, survive transposes and changes of basis, and move in simple ways when you take powers, inverses or shifts of a matrix. And eigenvectors that belong to different eigenvalues are always linearly independent.
Trace and determinant
Over the complex numbers the characteristic polynomial of an matrix factors completely (The Fundamental Theorem of Algebra), with roots listed with multiplicity:
Set : . Comparing the coefficients of on both sides gives the other half:
Two consequences: is invertible exactly when 0 is not an eigenvalue, and for a matrix the trace and determinant determine the eigenvalues completely.
How eigenvalues transform
Suppose . Then the same is an eigenvector of each of these related matrices:
| Matrix | Eigenvalue for | Reason |
|---|---|---|
| apply times | ||
| ( invertible) | ||
| scale both sides | ||
| for a polynomial | combine the rows above | |
| (but usually a different eigenvector) | ||
| (similar) | , with eigenvector | same characteristic polynomial |
The shift rule is used constantly in numerical code: it moves all eigenvalues by while keeping the eigenvectors, which is how "shifted" and "inverse" power iterations find eigenvalues other than the largest.
Be careful with sums and products of two different matrices: in general the eigenvalues of or are not sums or products of eigenvalues of and (unless and share eigenvectors).
from sympy import Matrix, eye
A = Matrix([[2, 1, 0], [0, 3, 1], [0, 0, 5]])
print("eigenvalues of A: ", sorted(A.eigenvals()))
print("trace, det: ", A.trace(), A.det())
print("eigenvalues of A^2: ", sorted((A**2).eigenvals()))
print("eigenvalues of A^-1: ", sorted(A.inv().eigenvals()))
print("eigenvalues of A^2-3A+I:", sorted((A**2 - 3 * A + eye(3)).eigenvals()))
print("eigenvalues of A^T: ", sorted(A.T.eigenvals()))eigenvalues of A: [2, 3, 5]
trace, det: 10 30
eigenvalues of A^2: [4, 9, 25]
eigenvalues of A^-1: [1/5, 1/3, 1/2]
eigenvalues of A^2-3A+I: [-1, 1, 11]
eigenvalues of A^T: [2, 3, 5]
For the polynomial gives −1, 1 and 11, which is exactly what SymPy found for .
Distinct eigenvalues give independent eigenvectors
Theorem. If are eigenvectors of for distinct eigenvalues , then are linearly independent.
Proof sketch (for two vectors, the general case is induction). Suppose . Apply : . Subtract times the first equation: . Since and , , and then gives . ∎
This is why distinct eigenvalues guarantee that an matrix is diagonalizable. More generally, if you take a basis of each eigenspace and put them together, the combined list is still independent.
Symmetric matrices are special
For a real symmetric matrix ():
- all eigenvalues are real, even though the characteristic polynomial could in principle have complex roots;
- eigenvectors for distinct eigenvalues are orthogonal, not just independent.
The second fact has a two-line proof: if and , then , so and when . These facts lead to the spectral theorem in Diagonalization of Real Symmetric Matrices.
import numpy as np
rng = np.random.default_rng(7)
B = rng.integers(-3, 4, size=(4, 4)).astype(float)
S = B + B.T # a random symmetric matrix
values, vectors = np.linalg.eigh(S)
print("eigenvalues:", [round(float(v), 4) for v in values])
print("sum =", round(float(values.sum()), 6), " trace =", float(np.trace(S)))
print("product =", round(float(values.prod()), 4), " det =", round(float(np.linalg.det(S)), 4))
print("eigenvectors orthonormal:", np.allclose(vectors.T @ vectors, np.eye(4)))eigenvalues: [-7.7715, -0.6394, 6.7854, 11.6255]
sum = 10.0 trace = 10.0
product = 392.0 det = 392.0
eigenvectors orthonormal: True
In software
- Sanity checks: after computing eigenvalues numerically, compare their sum with the trace and their product with the determinant. A mismatch means a bug or a badly conditioned matrix.
- Regularisation: adding to in ridge regression shifts every eigenvalue up by , so none is close to 0 and the matrix is safely invertible.
- Learning rates: for gradient descent on a quadratic loss, the step size must be below of the Hessian; the shift and scale rules tell you how preconditioning changes this.
Exercises
Exercise 1: From eigenvalues to everything else
A matrix has eigenvalues 1, 2 and 4. Find , , the eigenvalues of and of .
Answer
, ; has ; has −2, 1, 13.
Solution
Exercise 2: The missing eigenvalue
has 1 and 3 among its eigenvalues. Find the third one from the trace alone, then check it against the determinant.
Answer
The third eigenvalue is 3 (so 3 is a double eigenvalue); .
Solution
from sympy import Matrix
A = Matrix([[2, 1, 1], [1, 2, 1], [0, 0, 3]])
print("det:", A.det(), " trace:", A.trace())
print("eigenvalues {value: multiplicity}:", A.eigenvals())det: 9 trace: 7
eigenvalues {value: multiplicity}: {3: 2, 1: 1}
Exercise 3: Singular means zero
Explain why every matrix with two equal rows has 0 as an eigenvalue, and find an eigenvector of for .
Answer
Equal rows give , so 0 is an eigenvalue; is an eigenvector.
Solution
A matrix with two equal rows has determinant 0, and is the product of the eigenvalues, so one of them is 0. The eigenvectors for 0 are the null vectors: , for example . The other eigenvalue is .
Exercise 4: Shift and invert
has eigenvalues 0.9, 2 and 5. Which eigenvalue does power iteration on find, and why?
Answer
It finds , the eigenvalue closest to the shift 2.1.
Solution
has eigenvalues :
Power iteration converges to the eigenvector for −10, which is the eigenvector of for . This is inverse iteration with a shift.
Test yourself
The eigenvalues of a matrix are 2, −1 and 3. What is its determinant?
- 4
- −6
- 6
- 0
If , what is ?
Which matrix always has the same eigenvalues as ?