00:01
Given matrix c equals 6 -3 negative 8, 0, negative to 0, and 1 -0, negative 3, we're going to find the eigenvalues and eigenvectors of c using the following comments in matla.
00:15
Poly eigen pairs.
05:30
It's a diagonal matrix whose elements on the main diagonal are just the eigenvalues of c.
05:39
In that way we can compare what we get here with what we get with these two commons, poly and root.
05:49
And you see that the only argument of the function eg is the variable containing the matrix, in this case capital c.
05:59
So given that all these instructions are stored.
06:02
In a dot m file.
06:04
This is a script file that said before and when we go to the common window, we enter the name of that script file like this.
06:12
Hit enter and then you're going to see all the instructions, the result or echo of the instruction on screen because i didn't use semicolon at the end of any of the instructions that we execute here.
06:31
There are four instructions at line 2, at line 6, 9 and 13.
06:41
So the first thing is to store c matrix in the variable c is right here, as you see.
06:48
Matlab has returned the enter matrix, which is indeed written, separating each row into a new line.
06:59
Then the coefficient of the characteristic polynomial of c, as you can see, there are four coefficients and the coefficient corresponds to the decreasing powers of the variable.
07:09
That means that this polynomial here is, we can use x, but i'm going to use lambda, which is a notation for the characteristic polynomial variable, independent variable.
07:20
So is lambda cube because this first coefficient corresponds to the greatest powers of the variable, that is 0, 1, 2, and 3.
07:29
Lambda to the third minus lambda square minus 16 lambda minus 20.
07:37
That's just the characteristic polynomial of c.
07:45
And using that polynomial, we're going to calculate the roots of that polynomial, which we know are the eigenvalues of a.
07:52
As you see that here, we have some interesting thing happening, is that this value, this first value is 5 .00 up to, a 7 here, but then there is what seems to be zero times the imaginary unit.
08:10
Indeed, this is a real root of the characteristic polynomial, but remember, these calculations are done using some algorithms so there can be some round -off happening here.
08:27
And when the roots are double or with multiplicity greater than one, the calculation of the root.
08:35
Can be harder for the software...