Hello friends, In this video we will learn
how to evaluate the eigenvalues and eigenvectors
in MATLAB.
The condition is capital A into capital X
is equal to small n into capital X.
Here capital A matrix is n by n matrix.
Capital X is eigenvector.
small n is eigenvalue.
It is also called a scalar.
We can comment it.
So by commenting this equation then it means
it will not run.
or we can write here capital A capital X is
equal to small n capital I into capital X
.
So final equation becomes A minus n I into
X is equal to zero.
Here X is a nonzero vector . And I is the
identity matrix.
Now suppose I have a matrix capital A is equal
to bracket started one, two, three, semicolon
seven, eight, nine semicolon, four, five,
six bracket close.
Now first we will save this script . Eigenvalue
. So now we will run it.
Add to the path.
So we can see here.
our matrix is a 3 by 3 matrix that mean three
rows and three columns.
So we can use the command eig for finding
the eigenvalues of matrix A. eig of matrix
A . If we run it . So from here we can see
the eigenvalues of the matrix A are 15.5777,
-0.5 , 0.0.
So these are three eigenvalues of the matrix capital A. Now if we want to find the eigenvectors
then we can write here . Capital X 
capital D bracket close is equal to eig of
capital A. So capital X is our vector eigenvector
and capital D is diagonal matrix . And eig
of A these are eigenvalues.
If we run it then . then we can see here we
evaluated all the vectors that is eigenvectors
. and we can again see the diagonal elements
are our eigenvalues.
