令P=(a1,a2,a3)=
2 0 0
0 1 2
0 2 5
由已知P可逆, 且 P^-1AP = diag(1,0,-1)
所以 A = Pdiag(1,0,-1)P^-1 =
1 0 0
0 4 -2
0 10 -5