Econ 407: An example for computing eignevalues for a 3 by 3 matrix and demonstrating that the
product of the eigenvalues is the same as the determinat of the matrix. Use the following B matrix
and find the determinant, and eigenvalues.
>
B:=matrix([[4,0,1],[-2,1,0],[-2.0,0,1]]);
>
detb:=det(B);
>
B1:=matrix([[4-lambda,0,1],[-2,1-lambda,0],[-2.0,0,1-lambda]]);
>
with(linalg):
Warning, new definition for norm
Warning, new definition for trace
>
detb1:=det(B1);
>
solve(detb1,lambda);
The three roots are 1, 2, and 3. If you multiply these roots you get 1*2*3=6. QED.