(*Exercise 1 a) *)
A={{3,4},{4,3}};
A//MatrixForm

(*Computations done on the board gave us the following eigenvectors*)
P={{1,1},{-1,1}};
P//MatrixForm

diag=Inverse[P].A.P//MatrixForm

(*Checking*)
Eigensystem[A]

(*Exercise 1 b) *)
A={{1,0,0},{1,0,0},{1,2,4}};
A//MatrixForm

Eigensystem[A]

(*Exercise 1 c) *)
A={{0,0,0},{1,0,0},{1,0,0}};
A//MatrixForm

Eigensystem[A]

(*Example of Thm 2*)
n=5;
A=Table[RandomInteger[{-10,10}],{i,1,n},{j,1,n}];
A//MatrixForm
(*Characteristic polynomial*)
Det[x IdentityMatrix[n]-A]
Sum[(-1)^k Tr[Minors[A,k]]x^(n-k),{k,0,n}]

Table[Minors[A,k]//MatrixForm,{k,0,n}]//TableForm