Eigenvector different to expected using eig

6 visualizaciones (últimos 30 días)
Joshua Tsui
Joshua Tsui el 4 de Mzo. de 2021
Comentada: Joshua Tsui el 4 de Mzo. de 2021
Hello! The problem is as the title suggests.
A=[1.5 -0.5; -1 1];
[Vec,Val]=eig(A)
The outputted eigenvalues are 2 and 0.5
The outputted eigenvectors are: [0.7071 0.4472; -0.7071 0.8944]
The expected eigenvectors from calculations are (1 2) and (1 -1)
Anyway I can get the expected values ?

Respuesta aceptada

Steven Lord
Steven Lord el 4 de Mzo. de 2021
A=[1.5 -0.5; -1 1];
[Vec,Val]=eig(A)
Vec = 2×2
0.7071 0.4472 -0.7071 0.8944
Val = 2×2
2.0000 0 0 0.5000
What does the eig function return? From its documentation: "[V,D] = eig(A) returns diagonal matrix D of eigenvalues and matrix V whose columns are the corresponding right eigenvectors, so that A*V = V*D." So is A*V close to V*D?
format longg
A*Vec-Vec*Val
ans = 2×2
0 2.77555756156289e-17 0 0
Yeah, those are pretty close to 0. How about for your matrix of eigenvectors?
Vec2 = [1 1; 2 -1]
Vec2 = 2×2
1 1 2 -1
A*Vec2-Vec2*Val
ans = 2×2
-1.5 1.5 -3 -1.5
Perhaps, from the orientation of your eigenvectors, you're trying to use the left eigenvectors? "[V,D,W] = eig(A) also returns full matrix W whose columns are the corresponding left eigenvectors, so that W'*A = D*W'."
[Vec, Val, VecLeft] = eig(A);
VecLeft
VecLeft = 2×2
0.894427190999916 0.707106781186547 -0.447213595499958 0.707106781186547
VecLeft'*A - Val*VecLeft'
ans = 2×2
0 0 0 0
Vec2'*A-Val*Vec2'
ans = 2×2
-2.5 -2.5 2 -1
Still no. So please show me why you believe that the columns of Vec2 are eigenvectors for this matrix.
If we scaled VecLeft a bit it looks a little similar to your Vec2 matrix but not exactly.
VecLeftScaled = VecLeft ./ VecLeft(2, :)
VecLeftScaled = 2×2
-2 1 1 1
VecLeftScaled'*A-Val*VecLeftScaled'
ans = 2×2
0 0 0 0
  1 comentario
Joshua Tsui
Joshua Tsui el 4 de Mzo. de 2021
Thankyou Steven. It appears, I read my textbook incorrectly. I mistook the arbitary relationships as vectors.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Resizing and Reshaping Matrices en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by