Generators for the group of linear transformation preserving $x^2 + y^2 - 2z^2$? When I have a quadratic form, such as $Q = x^2 + y^2 - 2z^2$, how do I find generators for the group that preserves this quadratic form?  That group would also be called $SO(Q)$ or $SO(3,Q)$.

If instead I put $Q_0 = x^2 + y^2 - z^2$, it says on Wikipedia that:

*

*$\displaystyle A =  \left[ \begin{array}{ccc} 1 & -2 & 2 \\ 2 & -1 & 2 \\ 2 & -2 & 3 \end{array}\right] $


*$\displaystyle B =  \left[ \begin{array}{ccc} 1 & \;2 & \;2 \\ 2 & \;1 & \;2 \\ 2 & \;2 & \;3 \end{array}\right] $


*$\displaystyle C =  \left[ \begin{array}{ccc} -1 & 2 & 2 \\ -2 & 1 & 2 \\ -2 & 2 & 3 \end{array}\right] $
So it was possible to find three matrices that generate $SO(3, Q_0)$.  Here it's a subset of $SO(2,1, \mathbb{R})$
Here it's called "Pythagorean descent". Here "descent" could mean something very complicated.

Mathoverflow [1] says orthogonal groups of integral quadratic forms are "arithmetic lattices" and seems to reduce it to a computer problem.
 A: as far as Bergren's tree of triples, with $x,y,z > 0,$ then $\gcd(x,y,z)=1,$ we can reduce $z$    as long as $x \neq y.$   Thus any triple descends to $(1,1,1).$
If $x > y$  and $x < \frac{4}{3} z$  let
$$ (x,y,z) \mapsto (-3x+4z, y, -2x + 3z ).  $$
Note that this uses $ 0 < z < x < z \sqrt 2 < \frac{3}{2} z$  and $0 < (3 - \sqrt 8)z < -2x + 3z < z.$
If $x > y$  and $x \geq  \frac{4}{3} z$  let
$$ (x,y,z) \mapsto (3x-4z, y, -2x + 3z ).  $$
If $x < y$  and $y < \frac{4}{3} z$  let
$$ (x,y,z) \mapsto (x, -3y + 4z, -2y + 3z ).  $$
If $x < y$  and $y \geq \frac{4}{3} z$  let
$$ (x,y,z) \mapsto (x, 3y - 4z, -2y + 3z ).  $$
Note that it is not possible to get $x$ or $y$   equal to zero when $z$ is nonzero.
These linear mappings are invertible over the integers  so everything ascends from $(1,1,1)$
As far as the entire group, it should not be difficult to show that an automorphism matrix can be reduced to the identity   with the linear mappings above, their inverses, and mappings corresponding to negating one of $x,y,z$  or corresponding to switching $x,y.$ Inequalities
