选定初始列向量 v ( 0 ) v^{(0)} v(0),由于特征向量线性无关
v ( 0 ) = ∑ i = 1 n α i x ( i ) = α 1 x ( 1 ) + α 2 x ( 2 ) + ⋯ + α n x ( n ) v^{(0)}= \sum_{i=1}^{n} \alpha_ix^{(i)}=\alpha_1x^{(1)}+\alpha_2x^{(2)}+\cdots+\alpha_nx^{(n)} v(0)=i=1∑nαix(i)=α1x(1)+α2x(2)+⋯+αnx(n)
通过迭代关系 v ( 1 ) = A v ( 0 ) v^{(1)}=Av^{(0)} v(1)=Av(0)和特征向量定义式 A x ( i ) = λ i x ( i ) Ax^{(i)}=\lambda_{i}x^{(i)} Ax(i)=λix(i)
v ( 1 ) = A v ( 0 ) = ∑ i = 1 n α i A x ( i ) = ∑ i = 1 n α i λ i x ( i ) v^{(1)}=Av^{(0)}=\sum_{i=1}^{n}\alpha_iAx^{(i)}=\sum_{i=1}^{n}\alpha_i \lambda_{i}x^{(i)} v(1)=Av(0)=i=1∑nαiAx(i)=i=1∑nαiλix(i)
由归纳法,提出最大特征值 ∣ λ 1 ∣ |\lambda_{1}| ∣λ1∣
v ( k ) = A v ( k − 1 ) = λ 1 k ( α 1 x ( 1 ) + α 2 λ 2 k λ 1 k x ( 2 ) + ⋯ + α n λ n k λ 1 k x ( n ) ) v^{(k)}=Av^{(k-1)}=\lambda_1^k(\alpha_1x^{(1)}+\alpha_2 \frac{\lambda_2^k}{\lambda_1^k}x^{(2)}+\cdots+\alpha_n \frac{\lambda_n^k}{\lambda_1^k}x^{(n)}) v(k)=Av(k−1)=λ1k(α1x(1)+α2λ1kλ2kx(2)+⋯+αnλ1kλnkx(n))
当k充分大时, ( λ i λ 1 ) k (\frac{\lambda_i}{\lambda_1})^k (λ1λi)k全部趋近于0
v ( k ) = λ 1 k α 1 x ( 1 ) v^{(k)}=\lambda_1^k\alpha_1x^{(1)} v(k)=λ1kα1x(1)
v ( k + 1 ) = λ 1 k + 1 α 1 x ( 1 ) = λ 1 v ( k ) v^{(k+1)}=\lambda_1^{k+1}\alpha_1x^{(1)}=\lambda_1v^{(k)} v(k+1)=λ1k+1α1x(1)=λ1v(k)
由定义可得:
u ( 0 ) = α 1 x ( 1 ) + α 2 x ( 2 ) + ⋯ + α n x ( n ) m a x [ α 1 x ( 1 ) + α 2 x ( 2 ) + ⋯ + α n x ( n ) ] u^{(0)}=\frac{\alpha_1x^{(1)}+\alpha_2x^{(2)}+\cdots+\alpha_nx^{(n)}}{max[\alpha_1x^{(1)}+\alpha_2x^{(2)}+\cdots+\alpha_nx^{(n)}]} u(0)=max[α1x(1)+α2x(2)+⋯+αnx(n)]α1x(1)+α2x(2)+⋯+αnx(n)
推导为k次迭代时:
u ( k ) = α 1 λ 1 k x ( 1 ) + α 2 λ 2 k x ( 2 ) + ⋯ + α n λ n k x ( n ) m a x [ α 1 λ 1 k x ( 1 ) + α 2 λ 2 k x ( 2 ) + ⋯ + α n λ n k x ( n ) ] u^{(k)}=\frac{\alpha_1 \lambda_1^k x^{(1)}+\alpha_2 \lambda_2^k x^{(2)}+\cdots+\alpha_n \lambda_n^k x^{(n)}}{max[\alpha_1 \lambda_1^k x^{(1)}+\alpha_2 \lambda_2^k x^{(2)}+\cdots+\alpha_n \lambda_n^k x^{(n)}]} u(k)=max[α1λ1kx(1)+α2λ2kx(2)+⋯+αnλnkx(n)]α1λ1kx(1)+α2λ2kx(2)+⋯+αnλnkx(n)
由归纳法,提出最大特征值 ∣ λ 1 ∣ |\lambda_{1}| ∣λ1∣
u ( k ) = λ 1 k ( α 1 x ( 1 ) + α 2 λ 2 k λ 1 k x ( 2 ) + ⋯ + α n λ n k λ 1 k x ( n ) ) m a x [ λ 1 k ( α 1 x ( 1 ) + α 2 λ 2 k λ 1 k x ( 2 ) + ⋯ + α n λ n k λ 1 k x ( n ) ) ] = α 1 x ( 1 ) + α 2 λ 2 k λ 1 k x ( 2 ) + ⋯ + α n λ n k λ 1 k x ( n ) m a x [ α 1 x ( 1 ) + α 2 λ 2 k λ 1 k x ( 2 ) + ⋯ + α n λ n k λ 1 k x ( n ) ] u^{(k)}=\frac{\lambda_1^k(\alpha_1x^{(1)}+\alpha_2 \frac{\lambda_2^k}{\lambda_1^k}x^{(2)}+\cdots+\alpha_n \frac{\lambda_n^k}{\lambda_1^k}x^{(n)})}{max[\lambda_1^k(\alpha_1x^{(1)}+\alpha_2 \frac{\lambda_2^k}{\lambda_1^k}x^{(2)}+\cdots+\alpha_n \frac{\lambda_n^k}{\lambda_1^k}x^{(n)})]}=\frac{\alpha_1x^{(1)}+\alpha_2 \frac{\lambda_2^k}{\lambda_1^k}x^{(2)}+\cdots+\alpha_n \frac{\lambda_n^k}{\lambda_1^k}x^{(n)}}{max[\alpha_1x^{(1)}+\alpha_2 \frac{\lambda_2^k}{\lambda_1^k}x^{(2)}+\cdots+\alpha_n \frac{\lambda_n^k}{\lambda_1^k}x^{(n)}]} u(k)=max[λ1k(α1x(1)+α2λ1kλ2kx(2)+⋯+αnλ1kλnkx(n))]λ1k(α1x(1)+α2λ1kλ2kx(2)+⋯+αnλ1kλnkx(n))=max[α1x(1)+α2λ1kλ2kx(2)+⋯+αnλ1kλnkx(n)]α1x(1)+α2λ1kλ2kx(2)+⋯+αnλ1kλnkx(n)
当k充分大时, ( λ i λ 1 ) k (\frac{\lambda_i}{\lambda_1})^k (λ1λi)k全部趋近于0,u向量也全部收敛
u ( k ) = x ( 1 ) m a x [ x ( 1 ) ] → u ( k + 1 ) = u ( k ) u^{(k)}=\frac{x^{(1)}}{max[x^{(1)}]}\rightarrow u^{(k+1)}=u^{(k)} u(k)=max[x(1)]x(1)→u(k+1)=u(k)
由迭代关系式 v ( k + 1 ) = A u ( k ) v^{(k+1)}=Au^{(k)} v(k+1)=Au(k)和特征向量定义式 A x ( i ) = λ i x ( i ) Ax^{(i)}=\lambda_{i}x^{(i)} Ax(i)=λix(i)
v ( k + 1 ) = A u ( k ) = A x ( 1 ) m a x [ x ( 1 ) ] = λ 1 x ( 1 ) m a x [ x ( 1 ) ] = λ 1 u ( k ) v^{(k+1)}=Au^{(k)}=\frac{Ax^{(1)}}{max[x^{(1)}]}=\frac{\lambda_1x^{(1)}}{max[x^{(1)}]}=\lambda_1u^{(k)} v(k+1)=Au(k)=max[x(1)]Ax(1)=max[x(1)]λ1x(1)=λ1u(k)
最终:
u ( k + 1 ) = v ( k + 1 ) m a x [ v ( k + 1 ) ] = λ 1 u ( k ) m a x [ v ( k + 1 ) ] u^{(k+1)}=\frac{v^{(k+1)}}{max[v^{(k+1)}]}=\frac{\lambda_1u^{(k)}}{max[v^{(k+1)}]} u(k+1)=max[v(k+1)]v(k+1)=max[v(k+1)]λ1u(k)
由 u ( k + 1 ) = u ( k ) u^{(k+1)}=u^{(k)} u(k+1)=u(k):
m a x [ v ( k + 1 ) ] = λ 1 max[v^{(k+1)}]=\lambda_1 max[v(k+1)]=λ1
clc,clear all;
A=[3 -4 3;-4 6 3;3 3 1];
v0=[1 1 1]';
l0=max(abs(v0));
u0=v0./l0;
% calculate
l=l0;lold=inf;v=v0;u=u0;
while abs(l-lold) >1e-4
lold=l;
v=A*u;
l=max(abs(v));
u=v./l;
end
l,u
最后计算的特征值一定记得加p
clc,clear all;
A=[6 2 1; 2 3 1;1 1 1];
p=6;
A=A-p*eye(3);
v0=[1 1 1]';
l0=max(abs(v0));
u0=v0./l0;
% calculate
l=l0;lold=inf;v=v0;u=u0;
while abs(1/l-1/lold) >1e-4
lold=l;
v=A\u;
l=max(abs(v));
u=v./l;
end
1/l+p,u