I am a bit puzzled by the discriminant of a ternary quadratic form.
According to Lehman 1992 and another related question, the discriminant of a ternary quadratic form is the half-determinant of its symmetric (Gram) matrix.
(I admit that I find this definition a bit strange, since multiplying a form by a scalar $\lambda$ multiplies its discriminant by the cube of $\lambda$, but why not.)
Over the integers of a number ring (say the rationals, for simplicity), ternary forms correspond to orders in quaternions algebra, the correspondence being given by (quaternion order $\mathcal O$) $\mapsto$ (restriction of the reduced norm form $\mathrm{Nrd}$ to the pure part of $\mathcal O$). The reverse correspondence is given for example in Lemurell 2011 by the Clifford algebra construction; however, I try to make an explicit construction of the quaternion order in an standard quaternion algebra $\left(a,b\over \mathbb Q\right)$.
I am trying to work this out in the case of the form $q := x^2 + xy + y^2 + 2 z^2$ over the integers. According to the above definition, $q$ has discriminant $6$, so the corresponding quaternion order should lie in the quaternion algebra $B_6 = B_{\{2,3\}}$ ramified exactly at $2$ and $3$ over the rationals. A model for $B_6$ is $B_6 \simeq \left(6,5\over \mathbb Q\right)$; in particular, $B_6 \otimes \mathbb Q(\sqrt{6})$ is split.
Now let $\mathcal O$ be the corresponding quaternion order, $B = \mathcal O \otimes_{\mathbb Z} \mathbb Q$, and $K$ be an extension of $\mathbb Q$ which splits $B$, so that $B_K := B \otimes_{\mathbb Q} K = K^{2\times 2}$. I try to explicitly write down the isomorphism, using the elements of $B_K$ corresponding to nilpotent matrices such as $\tiny \begin{pmatrix} 0 & 1\\0 & 0\end{pmatrix}$ or $\tiny\begin{pmatrix} 0 & 0\\1 & 0\end{pmatrix}$: under this isomorphism they all have trace and norm zero and therefore are $K$-rational points of the conic with equation $q = 0$.
However, we may also see directly that $$ 6q = (-x+y+2z)^2 + (2x+y+2z)^2 + (-x-2y-2z)^2,$$ which means that the conic $q = 0$ has rational points on every $\mathbb Q_p$ except $p = 2$ and $p = \infty$. This means that $B$ ramifies exactly at the primes $\{2,\infty\}$: it is not the quaternion algebra $B_6$. (In particular, it does not split over $\mathbb Q(\sqrt{6})$, since the equation $u^2 + v^2 + w^2 = 0$ has no non-trivial solution in this field).
This suggests that a “correct” value for the discriminant of $q$ is 2 and not 6.
So, first question: where is the catch ?
- are the discriminants of $q$ and $\mathcal O$ (and therefore $B$, since in my example $\mathcal O$ should be maximal) not supposed to be the same?
- did I make a mistake in my computations? (probably, but where?)
- should I use another definition for the discriminant of q, such as the one I hint above (product of places where the conic has no rational point) ?
OK, so I boldly assume the first case and try to write down the order $\mathcal O \otimes \mathbb Q(\sqrt{-2})$. The conic $q = 0$ has the rational parametrization $(\sqrt{-2} (1-2t): \sqrt{-2} (t^2-1): t^2-t+1)$. With a bit of linear algebra, I can use this to find the three matrices $$I = \begin{pmatrix}-2&1\\-1&2\end{pmatrix}, J = \begin{pmatrix}-1&-1\\-2&1\end{pmatrix}, K = \sqrt{-2}\begin{pmatrix}1&-2\\2&-1\end{pmatrix},$$ such that $\det (x I + y J + z K) = -3 q(x,y,z)$. I am however unable to get rid of this $(-3)$ factor. Therefore,
Second question: how to find three matrices $I$, $J$, $K$, defined over a quadratic extension of $\mathbb Q$, such that $\det (x I + y J + z K) = q(x,y,z)$ ?
There is one aspect where i have comments. It is a consequence of the global relation for Hilbert's norm residue symbol that a positive ternary quadratic form is anisotropic in at least one $p$-adic field $\mathbb Q_p.$ The precise reason there is at least one such $p$ is that the count of such (finite primes) $p$ must be odd. In turn, the reason for that is that the total count for all primes, including $\infty,$ must be even. I recommend CASSELS for this material as well as the expression of a form as an even Clifford algebra.
You have correctly found the primes $(2,\infty).$ However, a little more is possible than isotropy or the lack of it; we can have restrictions modulo some prime without anisotropy. For example, $x^2 + y^2 + 9 z^2$ integrally represents all positive integers except for all $4^k (8n+7)$ and all $9n \pm 3.$ In your viewpoint, the $9n \pm 3$ is a bit of a throw-away. Still, the obstruction, while mild, is there. Put another way, this obstruction is invisible in $\mathbb Q_3$ but clear enough in its integers $\mathbb Z_3.$