No history yet

Eigenvalues and Eigenvectors

The Essence of Transformation

Matrices are powerful tools for transforming vectors. When a matrix multiplies a vector, it can stretch, shrink, or rotate it. Think of a matrix as a function that takes a vector as input and produces a new, transformed vector as output. This process is called a linear transformation.

Imagine a matrix transforming every vector in a plane. Most vectors will be knocked off their original direction. But some special vectors are different. They resist the rotation. When the transformation hits them, they don't change their direction at all. They only get scaled—stretched or shrunk.

These special, direction-preserving vectors are called eigenvectors, and the factors by which they scale are their corresponding eigenvalues.

This relationship is the key to understanding the deep structure of a matrix. It tells us which directions are most important to the transformation it represents. The core idea is captured in a single, elegant equation.

Av=λvA\vec{v} = \lambda\vec{v}

In plain English, this formula says: when matrix AA acts on its eigenvector v\vec{v}, the result is the same as just scaling v\vec{v} by its eigenvalue λ\lambda. The vector's direction, or the line it lies on, remains unchanged.

Finding Eigenvalues

To find these special vectors and scalars, we need to do a bit of algebra. We start by rearranging the main equation.

Av=λvAvλv=0AvλIv=0(AλI)v=0\begin{aligned} A\vec{v} & = \lambda\vec{v} \\ A\vec{v} - \lambda\vec{v} & = \vec{0} \\ A\vec{v} - \lambda I \vec{v} & = \vec{0} \\ (A - \lambda I)\vec{v} & = \vec{0} \end{aligned}

This final equation, (AλI)v=0(A - \lambda I)\vec{v} = \vec{0}, is key. We are looking for a non-zero eigenvector v\vec{v}. This equation will only have a non-zero solution for v\vec{v} if the matrix (AλI)(A - \lambda I) is singular, which means its determinant must be zero.

This gives us a way to find the eigenvalues: we solve the equation det(AλI)=0\det(A - \lambda I) = 0. This is known as the characteristic equation.

Let's find the eigenvalues for a simple 2x2 matrix.

A = \begin{pmatrix} 4 & 1 \\ 2 & 3 \end{pmatrix}

First, we set up the matrix (AλI)(A - \lambda I):

AλI=(4123)λ(1001)=(4λ123λ)A - \lambda I = \begin{pmatrix} 4 & 1 \\ 2 & 3 \end{pmatrix} - \lambda \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} = \begin{pmatrix} 4-\lambda & 1 \\ 2 & 3-\lambda \end{pmatrix}

Next, we find its determinant and set it to zero.

det(AλI)=(4λ)(3λ)(1)(2)=124λ3λ+λ22=λ27λ+10λ27λ+10=0\begin{aligned} \det(A - \lambda I) & = (4-\lambda)(3-\lambda) - (1)(2) \\ & = 12 - 4\lambda - 3\lambda + \lambda^2 - 2 \\ & = \lambda^2 - 7\lambda + 10 \\ \lambda^2 - 7\lambda + 10 & = 0 \end{aligned}

So, the eigenvalues for matrix A are λ1=5\lambda_1 = 5 and λ2=2\lambda_2 = 2.

Finding Eigenvectors

Once we have the eigenvalues, we can find the corresponding eigenvectors. We do this by plugging each eigenvalue back into the equation (AλI)v=0(A - \lambda I)\vec{v} = \vec{0} and solving for v\vec{v}.

For λ1=5\lambda_1 = 5:

(451235)(xy)=(00)    (1122)(xy)=(00)\begin{pmatrix} 4-5 & 1 \\ 2 & 3-5 \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \end{pmatrix} \implies \begin{pmatrix} -1 & 1 \\ 2 & -2 \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \end{pmatrix}

This gives us a system of equations: x+y=0-x + y = 0 and 2x2y=02x - 2y = 0. Notice that both equations are the same; they both simplify to x=yx = y. This is expected. It means any vector where the x and y components are equal is an eigenvector. For simplicity, we can choose:

\vec{v}_1 = \begin{pmatrix} 1 \\ 1 \end{pmatrix}

Any scalar multiple of this vector, like (22)\begin{pmatrix} 2 \\ 2 \end{pmatrix} or (77)\begin{pmatrix} -7 \\ -7 \end{pmatrix}, is also a valid eigenvector for λ1=5\lambda_1=5.

For λ2=2\lambda_2 = 2:

(421232)(xy)=(00)    (2121)(xy)=(00)\begin{pmatrix} 4-2 & 1 \\ 2 & 3-2 \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \end{pmatrix} \implies \begin{pmatrix} 2 & 1 \\ 2 & 1 \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \end{pmatrix}

This gives the equation 2x+y=02x + y = 0, or y=2xy = -2x. We can choose any vector that satisfies this relationship. A simple choice is:

\vec{v}_2 = \begin{pmatrix} 1 \\ -2 \end{pmatrix}

So we've found the two eigenvalue-eigenvector pairs for our matrix AA. These pairs reveal the fundamental axes along which the transformation acts purely as a scaling operation.

Why They Matter in Machine Learning

Eigenvalues and eigenvectors are not just mathematical curiosities; they are fundamental to many machine learning algorithms. They help us understand the structure of data and the behavior of systems.

Eigenvectors show directions a matrix naturally acts on.Eigenvalues show how much stretching or shrinking happens.

In machine learning, data is often represented by matrices. Finding the eigenvectors of a covariance matrix, for instance, tells us the directions of maximum variance in the data—the directions in which the data is most spread out. The eigenvalues tell us how much variance exists along each of these directions.

Lesson image

This concept is the backbone of powerful dimensionality reduction techniques. By identifying the eigenvectors associated with the largest eigenvalues, we can find the most important patterns in the data and discard the less important ones, simplifying complex datasets without losing crucial information.

Eigen-analysis is also used in the PageRank algorithm that powers Google's search engine, in facial recognition systems (using 'eigenfaces'), and in analyzing the stability of dynamic systems. They provide a powerful way to decompose a complex transformation into simple, understandable actions.

Ready to test your knowledge?

Quiz Questions 1/6

When a matrix transformation is applied to one of its eigenvectors, what is the primary effect on the vector?

Quiz Questions 2/6

Which equation correctly defines the relationship between a matrix A, its non-zero eigenvector v\vec{v}, and its corresponding eigenvalue λ\lambda?

Understanding eigenvalues and eigenvectors provides a deeper insight into the behavior of matrices and the linear transformations they represent.