A={{2,-1,1,2},{1,2,3,1},{0,0,2,-1},{0,0,1,2}};
MatrixForm[A]

chi=Det [A-t IdentityMatrix[4]]
Factor[chi]
Solve[chi==0,t]

B=A-(2+I) IdentityMatrix[4];MatrixForm[B]

NullSpace[B]
K2=NullSpace[B.B]
w2=K2[[1]]
w1=B.w2

v1=Conjugate[w1]
v2=Conjugate[w2]

(* Macierz przejścia z bazy Jordana do standardowej *)
J=Transpose[{v1,v2,w1,w2}];MatrixForm[J]

MatrixForm[Inverse[J].A.J]

(* baza rzeczywista *)
a1=(v1+w1)/2
a2=(v2+w2)/2
b1=(v1-w1)/(2 I)
b2=(v2-w2)/(2 I)

JJ=Transpose[{a1,b1,a2,b2}]

MatrixForm[Inverse[JJ].A.JJ]