📐 Eigenvalues & Eigenvectors — Linear Transformation Visualiser

Visualise how a 2×2 matrix A transforms vectors in the plane. Eigenvectors (Av = λv) are special directions that only scale — they stay on their own span. Watch the unit circle transform into an ellipse, the grid warp, and see eigenvectors highlighted in red and blue.

λ₁:
λ₂:
trace:
det:
Type:

Mathematics

For matrix A, eigenvectors satisfy Av = λv. Eigenvalues are found from det(A − λI) = 0 → λ² − tr(A)·λ + det(A) = 0, giving λ = (tr ± √(tr²−4det))/2. When the discriminant is negative, eigenvalues are complex (rotation-like behaviour). Real symmetric matrices always have real orthogonal eigenvectors. The unit circle under A maps to an ellipse whose semi-axes align with the eigenvectors and have length |λ₁| and |λ₂|. The determinant equals λ₁·λ₂ and gives the signed area scaling.

About Eigenvalue & Eigenvector Visualiser

A 2×2 matrix A acts on vectors in the plane, generally rotating and stretching them. Eigenvectors are special directions that only scale under this transformation: Av = λv, where the scalar λ is the eigenvalue. The unit circle maps to an ellipse whose semi-axes align with the eigenvectors and have lengths |λ₁| and |λ₂|. Eigenvalues are found by solving the characteristic polynomial det(A − λI) = λ² − tr(A)λ + det(A) = 0, giving λ = [tr(A) ± √(tr(A)² − 4det(A))] / 2. This framework is central to quantum mechanics (energy levels are eigenvalues of the Hamiltonian), structural engineering (vibration modes are eigenvectors), and data science (PCA finds eigenvectors of the covariance matrix).

Edit the four matrix entries to see the unit circle deform into an ellipse in real time. Eigenvectors are highlighted as persistent directions; negative eigenvalues cause reflection; complex eigenvalues (negative discriminant) produce rotation-only transformations with no real eigenvectors.

Frequently Asked Questions

What is an eigenvector and why is it special?

An eigenvector v of matrix A is a non-zero vector such that multiplying by A only scales it: Av = λv. Every other vector in the plane is both rotated and scaled by A, but eigenvectors stay on their own line — they point in the same direction before and after the transformation (or exactly opposite, if λ < 0). The eigenvalue λ tells you by how much: |λ| > 1 stretches, |λ| < 1 compresses, λ < 0 flips, λ = 0 collapses the vector to zero.

How do you find eigenvalues of a 2×2 matrix?

For A = [[a,b],[c,d]], solve det(A − λI) = 0: (a−λ)(d−λ) − bc = 0, giving λ² − (a+d)λ + (ad−bc) = 0. The quadratic formula gives λ = [tr(A) ± √(tr(A)²−4det(A))]/2. If the discriminant tr(A)²−4det(A) is positive, there are two real eigenvalues; if zero, one repeated eigenvalue; if negative, two complex conjugate eigenvalues (the matrix acts as a rotation-scaling with no real fixed directions).

What does it mean when eigenvalues are complex?

Complex eigenvalues λ = α ± βi (with β ≠ 0) indicate that no real vector is preserved in direction — the matrix acts as a rotation combined with scaling. The modulus |λ| = √(α²+β²) is the scaling factor; the argument arg(λ) = arctan(β/α) is the rotation angle per application of A. A pure rotation matrix has |λ| = 1 (no stretching) and β = sin(θ), α = cos(θ). These cases arise in vibration analysis (oscillatory modes) and control theory (spiral trajectories of dynamic systems).

What is diagonalisation and when is it possible?

A matrix A is diagonalisable if it has n linearly independent eigenvectors — then A = PDP⁻¹, where D is diagonal with eigenvalues on the diagonal and P's columns are eigenvectors. This decomposes a complex transformation into simple scalings in the eigenbasis. A 2×2 real matrix is diagonalisable over ℝ when it has two distinct real eigenvalues, over ℂ always (unless it has a repeated eigenvalue with only one eigenvector — a defective matrix).

What is the geometric interpretation of the determinant?

The determinant of a 2×2 matrix equals the signed area scale factor of the transformation: det(A) = λ₁λ₂. A unit square maps to a parallelogram with area |det(A)|. If det(A) = 0, the transformation collapses the plane to a line or point (at least one eigenvalue is zero). If det(A) < 0, the transformation includes a reflection (the orientation is reversed). This makes the determinant the first thing to check: det = 0 means A is singular and Av = 0 has non-trivial solutions.

How does PCA relate to eigenvalues?

Principal Component Analysis (PCA) finds the directions of greatest variance in a dataset by computing the eigenvalues and eigenvectors of the covariance matrix C = (1/n)XᵀX. The eigenvector with the largest eigenvalue is the first principal component (the direction that explains the most variance); subsequent eigenvectors are orthogonal and explain decreasing amounts. Reducing data to the top k eigenvectors compresses it while retaining maximum information — the foundation of image compression, face recognition, and dimensionality reduction in machine learning.

What are the eigenvalues of a rotation matrix?

A 2D rotation matrix R(θ) = [[cos θ, −sin θ],[sin θ, cos θ]] has determinant 1 and trace 2cos θ. Its characteristic polynomial is λ² − 2cos(θ)λ + 1 = 0, giving eigenvalues e^(±iθ) — always complex for θ ≠ 0, π. This confirms that no real direction is preserved under a pure rotation (other than the trivial 180° flip). The modulus |e^(iθ)| = 1 confirms that rotation does not stretch or compress any vector.

What is the spectral theorem?

The spectral theorem states that every real symmetric matrix (or complex Hermitian matrix) is diagonalisable with real eigenvalues and mutually orthogonal eigenvectors. This is fundamental in quantum mechanics: observable quantities (energy, momentum, position) are represented by Hermitian operators, and their eigenvalues are the only possible measurement outcomes — the "spectrum" of results. The theorem guarantees these are always real and the corresponding states are orthogonal.

What is the power method for computing eigenvectors?

The power method iterates v ← Av/|Av| repeatedly from an arbitrary starting vector. The direction converges to the eigenvector with the largest |λ| because repeated multiplication amplifies the dominant component exponentially. After k steps the error is O((|λ₂|/|λ₁|)^k). The inverse power method (using A⁻¹ instead of A) converges to the smallest eigenvalue. This is computationally efficient for very large sparse matrices where solving the full characteristic polynomial is impractical.

How are eigenvalues used in differential equations?

For the system ẋ = Ax (a linear ODE), the general solution is x(t) = Σ ck vk e^(λkt), where vk are eigenvectors and λk are eigenvalues. If all Re(λk) < 0, every solution decays to zero (stable equilibrium). If any Re(λk) > 0, solutions grow exponentially (instability). This eigenvalue stability criterion underlies control-system design, population dynamics (Leslie matrices), and analysis of normal modes in mechanical and electrical networks.

What is the condition number of a matrix?

The condition number κ(A) = |λ_max|/|λ_min| (ratio of largest to smallest singular value, for a square matrix these equal eigenvalue magnitudes for symmetric A) measures how sensitive solutions of Ax = b are to perturbations. If κ ≫ 1, the matrix is ill-conditioned: a small error in b leads to a large error in x. In the visualiser, a near-singular matrix (one eigenvalue close to zero) stretches the unit circle into a very elongated ellipse — the visual analogue of poor conditioning.