Eigenvalues and Eigenvectors
An intuitive introduction to eigenvalues and eigenvectors, explained with the idea of direction and length change, plus real-world applications like PCA.
What Are Eigenvalues and Eigenvectors?
A matrix transforms vectors — it can rotate, stretch, squash, or flip them.
Most vectors change both their direction and length when multiplied by a matrix.
But there are special vectors that behave differently:
Their direction stays the same, and only their length changes.
These special vectors are called eigenvectors, and
the factor by which their length changes is called the eigenvalue.
The Mathematical Definition
An eigenvalue–eigenvector pair satisfies:
- : the matrix (transformation)
- : eigenvector
- : eigenvalue
Here, .
The equation says: Applying to simply scales it by .
How to Find Them
- Start with the equation:
- For a non-trivial solution (), we require:
This is called the characteristic equation.
Solving it gives the eigenvalues .
- Substitute each eigenvalue back into to find the corresponding eigenvectors.
Example: A 2×2 Matrix
Let
- Characteristic equation:
That is:
- Expanding:
So:
- For , solving gives:
- For , we get:
Geometric Meaning
- with eigenvector : the transformation triples the vector’s length but keeps its direction.
- with eigenvector : the length stays the same, direction unchanged.
Real-World Application: PCA
Eigenvalues and eigenvectors are not just theoretical — they are key tools in data science and machine learning.
A famous example is Principal Component Analysis (PCA).
PCA analyzes high-dimensional data to find the directions where the data varies the most.
These directions are:
- Eigenvectors → directions of maximum variance (principal components)
- Eigenvalues → amount of variance along those directions
In PCA, we compute the eigenvectors and eigenvalues of the covariance matrix of the data,
and choose the top eigenvectors (with the largest eigenvalues) to reduce dimensionality while keeping most of the information.
Interactive Demo
Eigenvalues and Eigenvectors Demo
Watch how regular vectors change both direction and length, while eigenvectors only change length!
Legend:
Transformation Matrix:
Eigenvalues:
🧮 Try calculating by hand:
🔑 Key Insight:
When you apply the transformation, notice that the red eigenvectorskeep pointing in the same direction but change length by their eigenvalue factor. The gray regular vectors change both direction and length.
Demo idea:
- Show multiple arrows (vectors) on a plane.
- When a matrix is applied, all arrows move — except eigenvectors, which only change in length.
- PCA mode: show a scatter plot of data points, highlight the principal components (eigenvectors), and scale them according to their eigenvalues.