# Explicit isomorphism for quaternion algebras over $\mathbb{Q}$?

It is known that the isomorphism class of a quaternion algebra $A=\binom{a,b}{K}$ over a number field $K$ is determined by the finite set of places $v$ of $K$ where $A\otimes_K K_v$ is a division algebra, equivalently at which the projective curve $ax^2+by^2-z^2$ fails to have a $K_v$-rational point.

Given two quaternion algebras $\binom{a,b}{\mathbb{Q}}$ and $\binom{c,d}{\mathbb{Q}}$ over $\mathbb{Q}$ that are ramified at the same places, is there a known algorithm to construct an explicit isomorphism? (I.e. to find $I,J\in \binom{a,b}{\mathbb{Q}}$ such that $I^2=c, J^2=d, IJ=-JI$?)

If so, I would love some references.

• Two quaternion algebras over $\mathbf Q$ are isomorphic iff the norm forms on their pure quaternion (trace zero) subspaces are isometric quadratic forms. So this question is tantamount to asking how to construct an isometry between $-ax^2 - by^2 + abz^2$ and $-cx^2 - dy^2 + cdz^2$ if you are told they are isometric. (I'm just pointing out that the question can be phrased equivalently at the level of quadratic form equivalence.) – KConrad Mar 10 '14 at 20:48

In general, here is an idea I kicked around once which at least reduces the problem to solve norm equations over quadratic extensions (instead of biquadratic extensions). This might be only of theoretic/algorithmic interest, but at least it potentially generalizes. We wish to test if $A \cong B$ over a global field $F$ (say of characteristic not $2$ for now), and if so, to find an explicit isomorphism. If $A=(a,b)$ and $B=(c,d)$ and $a=c$, then there is an isomorphism if and only if $b/c$ is a norm from $\mathbb{Q}(\sqrt{a})$, and this can be accomplished algorithmically by a norm equation over this field; so it is enough to reduce to this case. To find a common subfield $K=\mathbb{Q}(\sqrt{a})$ in $A,B$, one can simply pick one (choose $K$ such that $K_v$ is not split at all places $v$ ramified in $A$ and $B$, e.g., take $a=-\mathrm{lcm}(ab,cd)$ if $\gcd(a,b)=\gcd(c,d)=1$, so this step does not even require factoring). The problem of embedding a quadratic field $K$ in a quaternion algebra is equivalent to (checking if $K$ splits the algebra and so) to a norm equation (a standard result, see e.g. http://www.math.dartmouth.edu/~jvoight/articles/quatalgs-060513.pdf). Once the field is embedded, we can diagonalize the quadratic form to reduce to the case where $a=c$.