Help with proof of preservation of inner product in Sp(n). In Naive Lie Theory, Stillwell defines the group $Sp(n)$ as the group of quaternion matrices that preserve the inner product defined as $(p_1,p_2,...,p_n) \cdot (q_1,q_2,..,q_n) = p_1\overline{q_1} + p_2\overline{q_2}+  ... + p_n\overline{q_n} $. Then, he says they are characterized by the condition $A\overline{A}^ T = I$ which makes perfect sense since that is true for real and complex matrices. So I must have made some mistake here, since if $ A = \left( \begin{array}{cc}
i/ \sqrt{2} & k/\sqrt{2}  \\
j/ \sqrt{2} & 1/ \sqrt{2} \end{array} \right)$ then $A\overline{A}^T = I$, but $Ae_1 \cdot Ae_2 = j$!
I'd really appreciate if someone could help me see my mistake, and maybe point me to the actual proof that $A \in Sp(n) \iff AA^* = I $.
 A: This is a bit subtle. Part of the problem comes from the fact that on quaternions, conjugation is an anti-involution (i.e. $\overline{\alpha\cdot\beta} = \bar\beta\cdot\bar\alpha$). This has strange consequences. For example, for complex matrices $A, B$, we have $\overline{AB} = \bar A \bar B$, but not necessarily for quaternion matrices. For example, for the matrix $A$ from your question, we have $A{\bar A}^T = I$ and ${\bar A}^TA = I$, but $A^T\bar A \neq I$. You can check all this by direct calculation.
Also, for complex matrices, we have $(AB)^T = B^TA^T$, but not necessarily for quaternion matrices, since quaternion multiplication is not commutative. However, if we combine transpostion and conjugation, we get for quaternion matrices $\overline{AB}^T = {\bar B}^T {\bar A}^T$.
Now, if we use the inner product from your question and work with row vectors, then for your matrix $A$, we have $A \in Sp(2)$ iff $A{\bar A}^T = I$, which is true. This is so because for arbitrary row vectors $u, v$, the inner product is $u{\bar v}^T$, and for the images $uA, vA$, the inner product is $uA{\overline{vA}}^T = uA{\bar A}^T{\bar v}^T$ (see preceding paragraph).
But in your example $Ae_1 \cdot Ae_2$ and $A{\bar A}^T = I$, you use column vectors and the condition for row vectors. This can't go together.
So, I suppose that in the book of Stillwell, they work with row vectors.
What we learn from this is that quaternions are in some sense similar to complex numbers, but since quaternion multiplication is not commutative, there are also significant differences. In particular, you have to pay special attention when working with matrices and inner products over quaternions.
On Wikipedia http://en.wikipedia.org/wiki/Symplectic_group they use a different inner product which is appropriate for column vectors.
