Applications of eigenvectors
很多时候需要把已有问题转化为特征值问题。
- 有一个对称矩阵(有时候是对称半正定矩阵),我们想要找一个方便的基。
- 具体的优化问题。
Setup
Given: Collection of data points xi
- Age
- Weight
- Blood pressure
- Heart rate
Find: Correlations between different dimensions
Simplest Model
One-dimensional subspace:
xi≈civ,v unknown
Equivalently:
xi≈ciˆv,ˆv unknown with ||ˆv||2=1
Variational Idea
minimize n∑i=1||xi−projˆvxi||22subject to ||ˆv||2=1
What does the constraint do?
- Does not affect optimal ˆv.
- Removes scaling ambiguity.

Geometric Interpretation
Review from Last Lecture
minci∑i||xi−ciˆv||22\xRightarrowci=xi⋅ˆv∑i||xi−(xi⋅ˆv)ˆv||22=∑i||xi||22−2∑i(xi⋅ˆv)2+∑i(xi⋅ˆv)2=∑i||xi||22−∑i(xi⋅ˆv)2=const.−∑i(xi⋅ˆv)2=const.−||XTˆv||22=const.−ˆvTXXTˆv,
X=[|||x1x2⋯xn|||]
XTˆv=[x1⋅ˆvx2⋅ˆv⋮xn⋅ˆv]
Equivalent Optimization
maximize ||XTˆv||22subject to ||ˆv||2=1
homogeneous quadratic function with quadratic constraint,有二次约束(尤其是norm为1)的齐次二次优化问题,可以转化为特征值问题。
Λ(ˆv;λ)=12ˆvTXXTˆv+λ(12−12||ˆv||22)0=∇ˆvΛ(ˆv;λ)=XXTˆv−λˆv⇒XXTˆv=λˆv
vXXTˆv=λvˆv=λ 因此最优的ˆv是XXT的最大的特征值对应的特征向量。
End Goal
Eigenvector of XXT with largest eigenvalue.
"Firs principal component"
More after SVD.
问题转化
min12xTAx−xTb→Ax=bmin12xTAx s.t. ||x||22=1→Ax=λx,A positive semidefinite
Physics
Newton:
F=md2xdt2
Hooke:
F=−k(x−y)
F∈R3n,X∈R3nF=MX″=Axv:=x′
ddt[xv]=[0I3n×3nM−1A0][xv]
General Linear ODE
y是关于时间的向量值函数,yi是B的特征向量,λi是特征值。 y′=ByByi=λiyi
可以假设: y(0)=c1y1+c2y2+⋯+ckyk 此外,假设yi span Rn,则: y(t)=n∑i=1ci(t)yiBy=n∑i=1ci(t)Byi=n∑i=1ci(t)λiyiy′(t)=n∑i=1c′i(t)yi 因为By=y′: c′i(t)=λici(t)→ci(t)=ci(0)eλity(t)=c1eλ1ty1+c2eλ2ty2+⋯+ckeλktyk
Linear Systems
b=c1x1+c2x2+⋯+ckxkAx=b⇒x=c1λ1x1+c2λ2x2+⋯+ckλkxk
Verify:
Ax=k∑i=1ciλiAxi=k∑i=1ciλiλixi=k∑i=1cixi=b
Organizing a Collection
Setup
Have: n items in a dataset
wij≥0 similarity of items i and j
wij=wji
Want: xi embedding on R
我们希望wij越大,xi和xj越接近: min{xi}E(x),E(x)=∑i,jwij(xi−xj)2,s.t. ||x||22=1↔∑ix2i=11⋅x=0↔∑ixi=0
Let a:=w⋅1,
E(x)=∑i,jwij(x2i−2xixj+x2j)=∑i,jwijx2i−2∑i,jwijxixj+∑i,jwijx2j=2∑iaix2i−2∑i,jwijxixj=2xTAx−2xTWx=2xT(A−W)x,A=diag(a)
Fact:
(A−W)1=diag(a)1−W1=a−a=0
Lagrange multiplier:
Λ=2xT(A−W)x−λ(xTx−1)−μ(1Tx)⇒∇xΛ=4(A−W)x−2λx−μ1=0
Premultiply by 1T on both sides:
1T4(A−W)x−1T2λx−1Tμ1=41T(A−W)x−2λ1Tx−μn=0−0−μn=0⇒μ=0∴Λ=0⇒2(A−W)x=λxE(x)=xT(A−W)x=xTλx=λxTx=λ
x is eigenvector of A−W with smallest λ≠0.
λ 不为0的原因是E(x)不能为0,否则所有的xi相等,与约束条件矛盾。
Definition
Eigenvalue and eigenvector
An eigenvector x≠0 of A∈Rn×n satisfies Ax=λx for some λ∈R; λ is an eigenvalue. Complex eigenvalues and eigenvectors instead have λ∈C and x∈Cn.
Scale doesn't matter!
→ can constrain ||x||2=1.
Spectrum and spectral radius
The spectrum of A is the set of all eigenvalues of A. The spectral radius ρ(A) is the maximum value |λ| over all eigenvalues λ of A.
Eigenproblems in the Wild
- Optimize Ax subject to ||x||2=1.(important!)
- ODE/PDE problem: Closed solutions and approximations for y′=By.
- Critical points of Rayleigh quotient: xTAx||x||22.
Applications of eigenvectors
https://grahamzen.github.io/2023/12/22/Applied Numerical Algorithms/Applications-of-eigenvectors/
预览: