How do I go about diagonalizing such a matrix.


I ask because I need to sort out the following problem: 


Let $D$ be the quaternion algebra over $\mathbb{Q}$ with $i^2 = -1, j^2 = -11, ij=-ji=k$. 


Let $\mathfrak{O} = \langle 1,i,\frac{1+j}{2},\frac{i+k}{2}\rangle\_{\mathbb{Z}}$ be a maximal order. 


Consider the Hermitian matrix:


$A = \begin{pmatrix} 11 & -j-3k \\ j+3k & 11 \end{pmatrix}$.


I need to find all matrices $u\in M\_2(\mathfrak{O})$ such that $uA\bar{u}^T = A$. This is proving difficult (there should be $48$ such matrices but extensive checks have only produced $8$ and those are easy diagonal/anti-diagonal ones!) 


I think I can do it easily if I diagonalize $A$.


But how do I find $P\in$ $GL\_2(D)$ such that $\bar{P}^T A P$ is diagonal with rational entries? Apparently such a matrix exists. Does the non-commutativity create problems with the usual construction?



Diagonalization of Quaternion Hermitian matrices
Note that $U=\pmatrix{1&t\cr 0&1}$ and $X=\pmatrix{a&b\cr c&d}$ has $UX\bar U^T=\pmatrix{?&b+dt\cr c&d}\pmatrix{1&0\cr -t&1}=\pmatrix{?&b+dt\cr c-dt&?}$ (for $t$ with trace 0). So just make $t=(j+3k)/11$ in your example, killing the terms off the diagonal. Maybe I transposed this, but you can work it out.


