Eigenvalues and eigenvectors

Formal
(Eigenvalues and Eigenvectors)

Let ARn×nA \in \mathbb{R}^{n\times n} be a square matrix. Then λR\lambda \in \mathbb{R} is an eigenvalue of AA and xRn{0}x \in \mathbb{R}^n \setminus \{ 0 \} is the corresponding eigenvector of AA if

Ax=λx.(1)Ax=\lambda x. \tag{1}
(Theorem)

rk(AλI)=0\text{rk}(A-\lambda I) = 0

Proof
  1. The equation for an eigenvector is Ax = λx. Rearranging it gives us: (A - λI)x = 0

  2. Let’s call the new matrix M = (A - λI). The equation is now Mx = 0.

  3. This equation asks a simple question: “What vectors x does the transformation M send to the zero vector?” For any matrix M, the zero vector (x = 0) is always a solution.

  4. This is the “trivial” solution. But by definition, an eigenvector must be non-zero.

  5. So, for λ to be a valid eigenvalue, there must be some non-zero vector x that the matrix M = (A - λI) squashes completely down to the origin.

  6. What kind of transformation can squash a non-zero vector to zero? Only a transformation that is “destructive”—one that collapses the space. A transformation that collapses space loses at least one dimension.

(Collinearity and Codirection)

Two vectors that point in the same direction are called codirected. Two vectors are collinear if they point in the same or the opposite direction.

(Theorem):

λR\lambda \in \mathbb{R} is an eigenvalue of ARn×nA \in \mathbb{R}^{n\times n} if and only if λ\lambda is a root of the characteristic polynomial pA(λ)p_A(λ) of AA. ref: Characteristic Polynomial

(Eigenspace and Eigenspectrum)

For ARn×nA \in \mathbb{R}^{n\times n}, the set of all eigenvectors of AA associated with an eigenvalue λ\lambda span a subspace of Rn\mathbb{R}^n, which is called the eigenspace of AA w.r.t. λ\lambda and is denoted by EλE_{\lambda}. The set of all eigenvalues of AA is called eigenspectrum of AA.

Proof

Any zEλz \in E_{\lambda} can be represented as z=mx+nyz = mx+ny where x,yx,y are eigenvectors of AA w.r.t. λ\lambda. (take only two eigenvectors here, easy to extend to a higher number of eigenvectors w.r.t. λ\lambda) Az=A(mx)+A(ny)Az = A(mx) + A(ny) =mAx+nAy= mAx + nAy =mλx+nλy= m\lambda x+n\lambda y =λ(mx+ny)=\lambda (mx + ny) =λz=\lambda z

(Geometric multiplicity)

The dimension of the eigenspace EλE_λ is called the geometric multiplicity of the eigenvalue λλ. It tells you how many linearly independent eigenvectors exist for that eigenvalue.

(Theorem)

The eigenvectors x1,,xnx_{1},\dots, x_n of a matrix ARn×nA \in \mathbb{R}^{n\times n} with nn distinct eigenvalues λ1,,λnλ_1,\dots, λ_n are linearly independent.

Proof

Imagine you have two eigenvectors x1,x2x_{1}, x_{2} corresponding to two eigenvalues λ1,λ2\lambda_{1}, \lambda_{2} for a transformation matrix AA. Suppose that they are not linearly independent. This means that kRx1=kx2\exists k\in \mathbb{R} | x_{1} = kx_{2}. But, if x1x_{1} is a multiple of x2x_{2} (viz., they are pointing in the same direction) then the matrix AA would have to stretch them by same value (definition of Eigenvalue). Hence, we arrive at a contradiction and λ1λ2\lambda_{1} \ne \lambda_{2}.

(Defective Matrices)

A square matrix ARn×nA \in \mathbb{R}^{n\times n} is said to be defective if it possesses fewer than nn linearly independent eigenvectors.

Defective matrices hinder with matrix decomposition.
  • This is due to the implication that for the decomposition of for PDP1PDP^{-1}, a linearly independent set of eigenvectors guarantees that DD is a diagonal matrix.
  • But if P is still invertible, we can still get a decomposition of the form PJP1PJP^{-1} where JJ is kind of diagonal but not completely. Note that PDP1PDP^{-1} decomposition is ideal but PJP1PJP^{-1} always exists when PP is invertible.
(Spectral Theorem)

If ARn×nA \in \mathbb{R}^{n \times n} is symmetric, there exists an orthonormal basis of the corresponding vector space VV consisting of eigenvectors of AA, and each eigenvalue is real. Due to Angles and Orthogonality, this leads to a supercharged decomposition of the form PDPTPDP^T (since P1=PTP^{-1}=P^T).

(Theorem)

The determinant of a square matrix is the product of its eigenvalues. (think of it from volume perspective)

det(A)=i=1nλi.(2)\det(A) = \prod_{i=1}^n\lambda_{i}. \tag{2}

The trace of the matrix is the sum of the eigenvalues.

tr(A)=i=1nλi.(3)\text{tr}(A) = \sum_{i=1}^n\lambda_{i}. \tag{3}
Intuition

Decomposition the the overall objective of all these concepts.

How defectiveness hinders decomposition

Geometrically, eigendecomposition finds the axes along which the transformation matrix acts purely by stretching/shrinking. A defective matrix, however, represents a transformation that includes shearing. Shearing skews the space in a way that cannot be represented merely by scaling along fixed axes.

Imagine a linear transformation as a function that takes a vector and maps it to a new vector. For a given transformation matrix A, most vectors will be knocked off their original direction when multiplied by A. However, there exist special vectors, eigenvectors, that do not change their direction under this transformation. They are only scaled—stretched, shrunk, or flipped. The factor by which an eigenvector is scaled is its corresponding eigenvalue.

Think of it this way: applying a linear transformation to a vector space is like stretching or rotating a sheet of rubber. The eigenvectors are the directions that are only stretched or shrunk, not rotated. The eigenvalue tells you how much stretching or shrinking occurs in that direction.

This concept is crucial because it allows us to identify the principal axes of a transformation, the directions along which the transformation acts purely by scaling. In machine learning, this is invaluable for understanding the variance in data and for dimensionality reduction.

ML Applications

Eigenvalues and eigenvectors are not just mathematical curiosities; they are at the heart of many machine learning algorithms and concepts:

  • Principal Component Analysis (PCA): In PCA, eigenvectors of the covariance matrix of the data are the principal components. The eigenvalues give the variance of the data along these principal components. By selecting the eigenvectors with the largest eigenvalues, you can reduce the dimensionality of the data while preserving the most variance. This is a cornerstone of dimensionality reduction.
  • Understanding Data Variance: Eigen-decomposition of a covariance matrix reveals the directions of maximum variance in your data. This is crucial for understanding the structure of your data and for feature engineering.
  • Spectral Clustering: This clustering technique uses the eigenvectors of a similarity matrix of the data to perform dimensionality reduction before clustering in a lower-dimensional space.
  • Google’s PageRank Algorithm: The PageRank of a webpage is related to the eigenvector of the link matrix of the web, corresponding to the largest eigenvalue.
Connections
  • #type/concept
  • #matrix-decomposition
  • #eigenvalues
  • #eigenvectors