I ran the following code:
A = matrix(QQbar, [[2,-1,0],[-1,2,1],[0,-1,2]])
D, P = A.diagonalization()
This generated a value error saying that A is not diagonalisable. To see if there are workarounds, I replaced the diagonalization
method by eigenmatrix_right()
, and the results were weird.
D
was twice the identity matrix, and P
had zero vectors in its creation. I think writing QQbar
to make the thing work in algebraic numbers is not proving fruitful at all, because replacing it with QQ
yields exactly the same result.