Introduction
Eigenvalues and eigenvectors are among the most important concepts in linear algebra. They reveal fundamental properties of matrices and linear transformations, with applications ranging from principal component analysis (PCA) to quantum mechanics.An eigenvector of a matrix is a non-zero vector that only changes by a scalar factor when the matrix is applied. That scalar factor is the corresponding eigenvalue.
Setup
Import required packages:Definition and Intuition
Mathematical Definition
For a square matrix , a non-zero vector is an eigenvector if: where is a scalar called the eigenvalue. Key Insight: The transformation only scales , without changing its direction.Multiple Eigenvectors
If is an eigenvector with eigenvalue , then any scalar multiple (where ) is also an eigenvector:For each eigenvalue, infinitely many eigenvectors exist (all pointing along the same line). By convention, we typically choose the eigenvector with norm 1 (unit eigenvector).
Visual Example
Consider a transformation defined by: Apply this to standard basis vectors:Computing Eigenvalues and Eigenvectors
Using NumPy
NumPy providesnp.linalg.eig() to compute eigenvalues and eigenvectors:
A_eig[0]: Array of eigenvaluesA_eig[1]: Matrix where each column is an eigenvector
Visualizing Eigenvectors
- is stretched by factor of 4 (eigenvalue )
- reverses direction, equivalent to scaling by -1 (eigenvalue )
Both eigenvectors remain parallel to their original directions after transformation - this is the defining property of eigenvectors.
Standard Transformations
Example 1: Reflection about Y-axis
- Eigenvalue : Eigenvector along x-axis (reversed)
- Eigenvalue : Eigenvector along y-axis (unchanged)
Example 2: Shear Transformation
A shear transformation displaces points proportionally to their distance from a line:j instead of :
- Mathematical:
- Python:
2 + 3j
Example 3: 90° Rotation
Example 4: Identity Matrix
What happens when the transformation doesn’t change anything?Special Case: For the identity matrix, every vector is an eigenvector with eigenvalue . However, NumPy only returns two eigenvectors (the standard basis).
Example 5: Uniform Scaling
Scaling equally in all directions:Example 6: Projection onto X-axis
One eigenvalue is . This is perfectly valid! It means vectors along the y-axis are mapped to the zero vector.
- Eigenvalue : Eigenvector along x-axis (unchanged)
- Eigenvalue : Eigenvector along y-axis (mapped to zero)
Understanding Eigenvalue Cases
Two Distinct Real Eigenvalues
Two Distinct Real Eigenvalues
Typical Case: Most random matrices have two distinct real eigenvalues.Example: General transformation matrix
Two independent eigenvectors exist, forming a basis for .
Complex Eigenvalues
Complex Eigenvalues
Rotation/Shear: Some transformations have no real eigenvectors.Example: 90° rotation
Complex eigenvalues indicate rotation or spiral behavior. No real vector maintains its direction.
Repeated Eigenvalues
Repeated Eigenvalues
Special Cases: Identity and uniform scaling have repeated eigenvalues.Example: Identity matrix
Eigenvalue appears twice. Every vector is an eigenvector, but NumPy returns only two.
Zero Eigenvalue
Zero Eigenvalue
Projection/Collapse: Matrix maps some directions to zero.Example: Projection onto x-axis
One eigenvalue is zero, indicating the transformation collapses one dimension.
Properties of Eigenvalues and Eigenvectors
Number of Eigenvalues
An matrix has exactly eigenvalues (counting multiplicities, including complex ones)
Verification Example
Applications
Principal Component Analysis
PCA uses eigenvectors of the covariance matrix to find directions of maximum variance in data
Google PageRank
PageRank computes the dominant eigenvector of the web graph’s adjacency matrix
Quantum Mechanics
Observable quantities are eigenvalues of Hermitian operators
Stability Analysis
Eigenvalues determine stability of dynamical systems and differential equations
Image Compression
Singular Value Decomposition (related to eigendecomposition) enables efficient compression
Vibration Analysis
Natural frequencies of mechanical systems are eigenvalues of the system matrix
Practical Tips
- Computing
- Normalization
- Verification
Summary
Core Concept
Core Concept
- Eigenvector: Non-zero vector where
- Eigenvalue: Scalar by which eigenvector is scaled
- Eigenvectors maintain their direction under transformation
Computing with NumPy
Computing with NumPy
- Use
np.linalg.eig(A)to find eigenvalues and eigenvectors - Returns tuple:
(eigenvalues, eigenvectors) - Eigenvectors are columns of the second array
- NumPy normalizes eigenvectors to unit length
Types of Eigenvalues
Types of Eigenvalues
- Real: Most common, indicate scaling
- Complex: Indicate rotation or spiral behavior
- Repeated: Special symmetry in transformation
- Zero: Dimension collapse or projection
Limitations
Limitations
- Not all matrices have real eigenvectors
- NumPy may not return all eigenvectors for repeated eigenvalues
- Numerical precision can affect results
- Always verify important results analytically
Applications
Applications
- PCA for dimensionality reduction
- PageRank for web search
- Stability analysis in dynamics
- Quantum mechanics observables
- Vibration and resonance analysis
Further Learning
Diagonalization
Learn how matrices with full sets of eigenvectors can be diagonalized
Singular Value Decomposition
Explore SVD, a generalization applicable to non-square matrices
PCA Implementation
Apply eigendecomposition to real datasets for dimensionality reduction
Markov Chains
Use eigenvectors to find steady-state distributions
Conclusion
Eigenvalues and eigenvectors reveal the fundamental structure of linear transformations. They identify special directions that remain unchanged (up to scaling) and quantify how much scaling occurs. This powerful concept underpins countless applications in science, engineering, and data analysis.Return to Overview
Review all linear algebra topics and continue your learning journey
