Clear Filters
Clear Filters

Eigenvalues and Eigenvectors Question

1 view (last 30 days)
LukeO
LukeO on 18 Nov 2016
Commented: Greg Bishop on 15 Feb 2017
I've solved a matrix in MATLAB using the following in the command window:
>> A = [1 2 -5; 3 7 3; -4 6 1]
A =
1 2 -5
3 7 3
-4 6 1
>> eig(A)
ans =
-5.4490
5.6560
8.7930
>> [v,d] = eig(A)
v =
0.6404 -0.7188 -0.2483
-0.3223 0.0583 0.7017
0.6971 0.6927 0.6677
d =
-5.4490 0 0
0 5.6560 0
0 0 8.7930
I understand the function eig(A) is returning the eigenvalues of the matrix but I don't fully understand the function [v,d]=eig(A). Could someone please explain it in a way that is easy to understand?
Also, I understand there are many different ways of reporting the eigenvector but which eigenvector does MATLAB report?
Finally, is there a way in MATLAB that i can confirm the above answers for the eigenvalues and eigenvectors just to prove its correct?
Thanks.
  1 Comment
Greg Bishop
Greg Bishop on 15 Feb 2017
https://www.mathworks.com/help/matlab/ref/eig.html
V are the eigenvectors, D are the eigenvalues, the algorithm used to compute them is cholesky which is a triangular decomposition. By definition, you can check this by performing A*V = V*D, within the machine limits of float precision.

Sign in to comment.

Answers (2)

Star Strider
Star Strider on 18 Nov 2016
According to the documentation, ‘v’ in your example are the right eigenvectors. See the documentation for eig for a full explanation.

Roger Stafford
Roger Stafford on 18 Nov 2016
The ‘eig’ function “[v,d] = eig)A)” is a solution to the equation
A*v = v*d
where ‘d’ is a diagonal matrix and if possible the columns of ‘v’ are of unit magnitude. These diagonal elements of ‘d’ are known as the eigenvalues of A and the columns of ‘v’ are the eigenvectors. The above equation is a way of testing that ‘eig’ has solved the problem correctly (to within round-off error accuracy, of course.) For further information, read:
https://en.wikipedia.org/wiki/Eigenvalues_and_eigenvectors
The subject of eigenvalues and eigenvectors is an important subject in linear algebra.

Categories

Find more on Linear Algebra in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!