1.1.14Linear Algebra Essentials

Eigendecomposition of matrices

1,815 words8 min readdifficulty · medium

1. WHAT is an eigenvector / eigenvalue?

WHY the "v0v \neq 0" rule? If we allowed v=0v=0, then A0=λ0A\cdot 0 = \lambda \cdot 0 holds for every λ\lambda — useless. We forbid the zero vector so the eigenvalue is meaningful.


2. HOW to find eigenvalues — derive from scratch

Start from the defining equation and rearrange (do NOT memorize the char. polynomial — build it):

Av=λv    Avλv=0    (AλI)v=0A v = \lambda v \;\Longrightarrow\; Av - \lambda v = 0 \;\Longrightarrow\; (A - \lambda I)v = 0

Now (AλI)v=0(A-\lambda I)v = 0 is a homogeneous system. We need a nonzero solution vv. A square system Mv=0Mv=0 has a nonzero solution iff MM is singular, i.e.

det(AλI)=0\boxed{\det(A - \lambda I) = 0}

Once you have each λi\lambda_i, plug it back and solve (AλiI)v=0(A-\lambda_i I)v = 0 for the eigenvector(s) (the null space).


3. HOW to assemble the decomposition

Suppose AA (size nn) has nn linearly independent eigenvectors v1,,vnv_1,\dots,v_n with eigenvalues λ1,,λn\lambda_1,\dots,\lambda_n. Stack the eigenvectors as columns of VV and eigenvalues on the diagonal of Λ\Lambda:

V=[v1  v2    vn],Λ=diag(λ1,,λn)V = [\,v_1 \; v_2 \; \cdots \; v_n\,], \qquad \Lambda = \operatorname{diag}(\lambda_1,\dots,\lambda_n)

Look at what AA does to all columns at once: AV=[Av1    Avn]=[λ1v1    λnvn]=VΛA V = [\,Av_1 \; \cdots \; Av_n\,] = [\,\lambda_1 v_1 \; \cdots \; \lambda_n v_n\,] = V\Lambda

So AV=VΛAV = V\Lambda. If VV is invertible (needs independent eigenvectors), right-multiply... actually multiply by V1V^{-1}:

Figure — Eigendecomposition of matrices

4. WHY this is powerful — matrix powers

A2=(VΛV1)(VΛV1)=VΛV1VIΛV1=VΛ2V1A^2 = (V\Lambda V^{-1})(V\Lambda V^{-1}) = V\Lambda \underbrace{V^{-1}V}_{I}\Lambda V^{-1} = V\Lambda^2 V^{-1}

By induction: Ak=VΛkV1,Λk=diag(λ1k,,λnk)\boxed{A^k = V\Lambda^k V^{-1}}, \qquad \Lambda^k = \operatorname{diag}(\lambda_1^k,\dots,\lambda_n^k)

WHY huge: raising a diagonal matrix to a power is just powering the diagonal entries — O(n)O(n) instead of repeated O(n3)O(n^3) multiplies. This is how Markov chains find steady states and how we analyze long-term behavior.


5. Special case: symmetric matrices


6. Worked examples


7. Common mistakes (Steel-man them)


8. Recall

Recall Active recall — cover the answers
  • What equation defines an eigenpair? → Av=λvAv=\lambda v.
  • Why do we require det(AλI)=0\det(A-\lambda I)=0? → so (AλI)v=0(A-\lambda I)v=0 has a nonzero solution (matrix singular).
  • What must VV contain and satisfy? → columns = eigenvectors; must be linearly independent (invertible).
  • Formula for AkA^k? → VΛkV1V\Lambda^k V^{-1}.
  • When is VV orthogonal? → when AA is symmetric (spectral theorem).
Recall Explain to a 12-year-old (Feynman)

Imagine a big rubber sheet. When you pull on it, most drawn arrows on it swing to point somewhere new. But a few magic arrows keep pointing the same way — they just get longer or shorter. Those magic arrows are eigenvectors, and "how much longer" is the eigenvalue. If you know all the magic arrows, you understand everything the pull does: just stretch along each magic arrow. Eigendecomposition is writing down that list of magic arrows and their stretch amounts.


9. Connections


Eigenvector defining equation
Av=λvAv=\lambda v (with v0v\neq 0); AA scales vv without rotating it.
Why do we insert II in AλIA-\lambda I?
To make λv=λIv\lambda v = \lambda I v a matrix–vector product so it can be subtracted from AvAv.
Characteristic equation
det(AλI)=0\det(A-\lambda I)=0; its roots are the eigenvalues.
Why det(AλI)=0\det(A-\lambda I)=0?
A homogeneous system (AλI)v=0(A-\lambda I)v=0 has a nonzero solution iff the matrix is singular, i.e. determinant zero.
Eigendecomposition formula
A=VΛV1A=V\Lambda V^{-1}, VV = eigenvector columns, Λ\Lambda = diag of eigenvalues.
Derive AV=VΛAV=V\Lambda
A[v1vn]=[λ1v1λnvn]=VΛA[v_1\dots v_n]=[\lambda_1 v_1\dots\lambda_n v_n]=V\Lambda; then A=VΛV1A=V\Lambda V^{-1}.
Formula for AkA^k
Ak=VΛkV1A^k=V\Lambda^k V^{-1} with Λk=diag(λik)\Lambda^k=\mathrm{diag}(\lambda_i^k).
When is eigendecomposition impossible?
When AA lacks nn linearly independent eigenvectors (defective matrix), so VV is not invertible.
Spectral theorem
Symmetric A=AA=A^\top ⇒ real eigenvalues, orthonormal eigenvectors, A=QΛQA=Q\Lambda Q^\top.
Are eigenvectors unique?
No — any nonzero scalar multiple works; we normalize to v=1\|v\|=1.

Concept Map

has special

scaled by

satisfies

requires

rearrange to

roots give

plug back

yields

stacked into

placed into

combine

combine

enables

Matrix A transforms vectors

Eigenvector v

Eigenvalue lambda

Av equals lambda v

v not zero

det of A minus lambda I equals 0

Eigenvalues as roots

Solve null space for v

V columns are eigenvectors

Lambda diagonal of eigenvalues

A equals V Lambda V inverse

PCA PageRank stability

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Dekho, ek matrix AA basically ek machine hai jo vectors ko transform karti hai — kisi ko ghumati hai, kisi ko stretch karti hai. Lekin kuch special vectors hote hain jinko AA sirf lamba ya chhota karti hai, direction bilkul same rehti hai. Yehi hote hain eigenvectors, aur kitna stretch hua woh number hai eigenvalue λ\lambda. Equation simple hai: Av=λvAv=\lambda v.

Ab eigenvalue nikalne ke liye hum Av=λvAv=\lambda v ko rearrange karte hain: (AλI)v=0(A-\lambda I)v=0. Yahan II isliye ghusaya kyunki λ\lambda ek scalar hai aur usko matrix banana zaroori tha subtract karne ke liye. Iss system ka nonzero solution tabhi milega jab matrix singular ho, matlab det(AλI)=0\det(A-\lambda I)=0. Iss equation ke roots hi eigenvalues hain. Phir har λ\lambda ko wapas daal ke null space solve karo — woh eigenvector hai.

Jab tumhare paas nn independent eigenvectors ho, unhe columns me rakh do VV me, aur eigenvalues ko diagonal Λ\Lambda me. Toh A=VΛV1A = V\Lambda V^{-1}. Isko yaad rakho "Enter, Stretch, Exit" — pehle eigen-coordinates me jao (V1V^{-1}), phir har axis ko stretch karo (Λ\Lambda), phir wapas aao (VV). Sabse bada faayda: Ak=VΛkV1A^k = V\Lambda^k V^{-1}, matlab power sirf diagonal pe lagao, bahut fast!

Yeh cheez ML me har jagah hai — PCA me covariance matrix (jo symmetric hoti hai) ka eigendecomposition hi principal directions deta hai. Ek warning: har matrix decompose nahi hoti — agar independent eigenvectors kam pad jaayein (defective matrix), toh SVD use karna padta hai. Bas yeh dhyaan rakho aur tum set ho.

Test yourself — Linear Algebra Essentials

Connections