PGD01C01
Module 3 · Linear Algebra for Data Science

Eigenvalues and Eigenvectors

Core Titles
Key headlines and terms for quick recall
  • Eigenvalue equation Av=λvAv = \lambda v with v0v \ne 0
  • Characteristic polynomial det(AλI)=0\det(A - \lambda I) = 0
  • Algebraic vs Geometric multiplicity
  • Diagonalizable matrix
  • Spectrum — set of eigenvalues
  • Eigendecomposition A=PDP1A = P D P^{-1}
  • Spectral theorem (real symmetric ⇒ orthogonally diagonalizable)
Basic Idea
What it is, why it matters, how it works

Definition

For a square matrix AA, a scalar λ\lambda is an eigenvalue and v0v \ne 0 an eigenvector if Av=λvAv = \lambda v i.e., AA only stretches vv by factor λ\lambda — direction unchanged.

How to find them

Rewrite: (AλI)v=0(A - \lambda I) v = 0. For non-zero vv, (AλI)(A - \lambda I) must be singular, so det(AλI)=0.\det(A - \lambda I) = 0. This is the characteristic polynomial in λ\lambda. Its roots are the eigenvalues. For each root, solve (AλI)v=0(A - \lambda I) v = 0 to get the eigenvectors.

Key properties

  • λi=tr(A)\sum \lambda_i = \text{tr}(A)
  • λi=det(A)\prod \lambda_i = \det(A)
  • Eigenvalues of AkA^k are λk\lambda^k
  • AA is invertible ⇔ no eigenvalue is 0

Algebraic vs Geometric multiplicity

  • Algebraic — multiplicity of λ\lambda as a root of char polynomial.
  • Geometric — dimension of eigenspace Eλ=ker(AλI)E_\lambda = \ker(A - \lambda I).
  • Always geometric \le algebraic.
  • AA is diagonalizable iff for every λ\lambda, geometric = algebraic.

Diagonalization

If AA has nn linearly independent eigenvectors, then A=PDP1A = P D P^{-1} where DD is diagonal of eigenvalues and PP has eigenvectors as columns.

Spectral theorem (most important case)

If AA is real symmetric, then:

  • All eigenvalues are real.
  • Eigenvectors of distinct eigenvalues are orthogonal.
  • A=QΛQTA = Q \Lambda Q^T with QQ orthogonal.

Why this matters in Data Science

  • PCA: eigenvectors of the covariance matrix are the principal components; eigenvalues are the variances along them.
  • Spectral clustering: eigenvectors of the graph Laplacian reveal clusters.
  • PageRank: dominant eigenvector of the link matrix.
  • Stability of dynamical systems and Markov chains.
Mind Map
Visual structure of the concept
EIGENVALUES & EIGENVECTORS
├── Av = λv,  v ≠ 0
├── Find via det(A − λI) = 0
├── Properties
│   ├── Σλᵢ = tr(A)
│   ├── Πλᵢ = det(A)
│   └── λᵢ(Aᵏ) = (λᵢ)ᵏ
├── Multiplicities
│   ├── Algebraic
│   └── Geometric ≤ Algebraic
├── Diagonalizable: A = PDP⁻¹
└── Spectral theorem (A = Aᵀ)
    └── A = QΛQᵀ, Q orthogonal
Exam Q&A
Part A (2 marks) and Part B (20 marks) style questions

Part A (2 marks each)

Q1. Define eigenvalue and eigenvector. A scalar λ\lambda and non-zero vector vv such that Av=λvAv = \lambda v.

Q2. What is the characteristic polynomial? det(AλI)\det(A - \lambda I) — its roots are the eigenvalues of AA.

Q3. State the relation between trace and eigenvalues. tr(A)=λi\text{tr}(A) = \sum \lambda_i.

Q4. When is a matrix diagonalizable? When it has nn linearly independent eigenvectors (geometric multiplicity = algebraic multiplicity for each eigenvalue).


Part B (20 marks)

Q. Find the eigenvalues and eigenvectors of A=(4123)A = \begin{pmatrix} 4 & 1 \\ 2 & 3 \end{pmatrix}. Diagonalize AA and use it to compute A10A^{10}.

Step 1 — Characteristic polynomial. det(AλI)=(4λ)(3λ)2=λ27λ+10=0\det(A - \lambda I) = (4-\lambda)(3-\lambda) - 2 = \lambda^2 - 7\lambda + 10 = 0. (λ5)(λ2)=0λ1=5,  λ2=2(\lambda - 5)(\lambda - 2) = 0 \Rightarrow \lambda_1 = 5, \;\lambda_2 = 2.

Step 2 — Eigenvectors.

For λ=5\lambda = 5: (A5I)v=0(A - 5I)v = 0: (1122)v=0v1=(1,1)T\begin{pmatrix} -1 & 1 \\ 2 & -2 \end{pmatrix} v = 0 \Rightarrow v_1 = (1, 1)^T.

For λ=2\lambda = 2: (A2I)v=0(A - 2I)v = 0: (2121)v=02x+y=0v2=(1,2)T\begin{pmatrix} 2 & 1 \\ 2 & 1 \end{pmatrix} v = 0 \Rightarrow 2x + y = 0 \Rightarrow v_2 = (1, -2)^T.

Step 3 — Diagonalize. P=(1112)P = \begin{pmatrix} 1 & 1 \\ 1 & -2 \end{pmatrix}, D=(5002)D = \begin{pmatrix} 5 & 0 \\ 0 & 2 \end{pmatrix}, A=PDP1A = P D P^{-1}.

detP=3\det P = -3, so P1=13(2111)=13(2111)P^{-1} = \dfrac{1}{-3}\begin{pmatrix} -2 & -1 \\ -1 & 1 \end{pmatrix} = \dfrac{1}{3}\begin{pmatrix} 2 & 1 \\ 1 & -1 \end{pmatrix}.

Step 4 — A10A^{10}. A10=PD10P1A^{10} = P D^{10} P^{-1} where D10=diag(510,210)=diag(9765625,1024)D^{10} = \text{diag}(5^{10}, 2^{10}) = \text{diag}(9765625, 1024).

A10=13(1112)(51000210)(2111)A^{10} = \frac{1}{3} \begin{pmatrix} 1 & 1 \\ 1 & -2 \end{pmatrix} \begin{pmatrix} 5^{10} & 0 \\ 0 & 2^{10} \end{pmatrix} \begin{pmatrix} 2 & 1 \\ 1 & -1 \end{pmatrix}

=13(2510+21051021025102210510+2210).= \frac{1}{3} \begin{pmatrix} 2\cdot 5^{10} + 2^{10} & 5^{10} - 2^{10} \\ 2\cdot 5^{10} - 2\cdot 2^{10} & 5^{10} + 2\cdot 2^{10} \end{pmatrix}.

This is the power of diagonalization — instead of multiplying AA by itself 10 times, we exponentiate the eigenvalues.