Let
A={{1,1},{-2,4}}
(a) Find the characteristic polynomial of A.
cp[A]=Det[A-&lgr;*IdentityMatrix[2]]
(b) Find the eigenvalues of A.
Solve[cp[A]==0,&lgr;]
{&lgr;[1],&lgr;[2]}={&lgr;/.%[[1]],&lgr;/.%[[2]]}
or, more simply:
{&lgr;[1],&lgr;[2]}=Eigenvalues[A]
(c) Find a basis for each eigenspace of A.
x[1]=NullSpace[A-&lgr;[1]*IdentityMatrix[2]][[1]]
x[2]=NullSpace[A-&lgr;[2]*IdentityMatrix[2]][[1]]
or, more simply:
{x[1],x[2]}=Eigenvectors[A]
(d) Find a diagonal matrix &Lgr; and an invertible matrix S such that A=S.&Lgr;.S-1
&Lgr;=DiagonalMatrix[{&lgr;[1],&lgr;[2]}]
S={x[1],x[2]}
Check:
A==S.&Lgr;.Inverse[S]