eigEigenvalues and eigenvectors
Let
An
d = eig(A)A is a square matrix.d which contains eigenvalues of A.[V, D] = eig(A)A is a square matrix.D which contains eigenvalues of A.V are the right eigenvectors such that [V, D, W] = eig(A)A is a square matrix.D that contains eigenvalues of A.V are the right eigenvectors such that W are the left eigenvectors such that a = rand(10);
cplxpair(eig(a))
ans =
-0.4109130 - 0.6592851i
-0.4109130 + 0.6592851i
0.1072426 - 0.2233978i
0.1072426 + 0.2233978i
0.4336722 - 0.6942055i
0.4336722 + 0.6942055i
-0.3721263 + 0.0000000i
-0.1895444 + 0.0000000i
0.5893938 + 0.0000000i
5.6223728 + 0.0000000i
A, the second eigenvalue is d(2,2) and the corresponding right eigenvector is V(:,2). Here A*V(:,2) and D(2,2)*V(:,2) give approximately the same values.A = rand(4);
[V,D]=eig(A);
A*V(:,2)
D(2,2)*V(:,2)
ans = 1e-1 ×
-2.3628584 + 1.3160677i
1.1303095 - 1.2702069i
1.1515366 + 2.1725013i
-0.0463397 - 1.7423500i
ans = 1e-1 ×
-2.3628584 + 1.3160677i
1.1303095 - 1.2702069i
1.1515366 + 2.1725013i
-0.0463397 - 1.7423500i
A, the second eigenvalue is d(2,2) and the corresponding left eigenvector is W(:,2). Here W(:,2)'*A and D(2,2)*W(:,2)' give approximately the same values.A = rand(4);
[V,D,W] = eig(A);
W(:,2)'*A
D(2,2)*W(:,2)'
ans = 1e-2 ×
0.7739085 -0.3822298 0.0919348 -1.4037180
ans = 1e-2 ×
0.7739085 -0.3822298 0.0919348 -1.4037180