M = Matrix.New({{ 1, I, 2, I}, {-I, 1, I, 2}, { 2,-I, 4, I}, {-I, 2,-I, 4}}) val, fun = Matrix.Eigensystem(M) Mdiag = Chop(Rotate(M,fun)) print(Mdiag)