Examples of Witt decomposition I am trying to understand the Witt decomposition theorem. In particular, I am looking to find the hyperbolic part of a quadratic form. I am able to find the Witt index of a general diagonal quadratic form, so I know the dimension of the hyperbolic part, but I was wondering if there is some sort of algorithm to find this part for any general quadratic form?
To understand Witt’s theorem, I have been attempting to explicitly decompose some examples of rational quadratic forms into their anisotropic, radical and hyperbolic parts, but I have been struggling. For example, I know that the quadratic form $$x^2 + y^2 - 2z^2$$ has a Witt index of 1. How would I write this as a direct sum of hyperbolic and anisotropic quadratic forms? Is there a general way of doing this for $$\sum_{i=1}^N n_i x_i^2 - \sum_{j=1}^M m_i y_i^2$$? Are there any particular cases that are easier to analyse, e.g. when the sums of the coefficients are equal (as in the first example)?
Any help and/or recommended reading would be appreciated!
 A: The Witt decomposition is very non-unique; there is no unique hyperbolic part unless your form is hyperbolic. To find a maximal hyperbolic subspace, you'll want to find non-radical isotropic vectors and start pairing them up. From here I will just say null to mean non-radical isotropic. Specifically:

*

*Find a null vector $\nu_1$.

*Find a null vector $\eta_1$ such that $B(\nu_1, \eta_1) \ne 0$ where $B(\cdot,\cdot)$ is the bilinear form associated to your quadratic form.

*Repeat from step (1) but restricting yourself to the orthogonal complement of $\{\nu_1, \eta_1\}$.

This process will yield null vectors $\nu_1, \nu_2, \dotsc, \nu_w$ and $\eta_1, \eta_2, \dots, \eta_w$ with $w$ the Witt index and $B(\nu_i, \eta_i) \ne 0$ but $B(\nu_i, \eta_j) = 0$ for $i \ne j$. The spaces $W = \mathrm{span}\{\nu_1,\dotsc,\nu_w\}$ and $W' = \mathrm{span}\{\eta_1,\dotsc,\eta_w\}$ are complementary fully-isotropic subspaces and $W \oplus W'$ is a maximal hyperbolic subspace.
Alternatively, we could follow the following process:

*

*Find $e_1$ and $f_1$ such that $q(e_1) = -q(f_1)$ and $B(e_1, f_1) = 0$ where $q$ is our quadratic form.

*Repeat from step (1) but restricting to the orthogonal complement of $\mathrm{span}\{e_1, f_1\}$.

This process is equivalent since we can take $\nu_1 = e_1 + f_1$ and $\eta_1 = e_1 - f_1$, or similarly $e_1 = \nu_1 + \eta_1$ and $f_1 = \nu_1 - \eta_1$. Both methods have tradeoffs: in the first method, finding null vectors is easy, but finding non-orthogonal null vectors may be difficult; in the second method, finding orthogonal vectors is easy, but finding orthogonal vectors with opposite magnitudes may be difficult if your field doesn't have square roots.
For your example quadratic form
$$
  q(x, y, z) = x^2 + y^2 - 2z^2,\quad B(x_1, y_1, z_1, x_2, y_2, z_2) = x_1x_2 + y_1y_2 - 2z_1z_2
$$
we see that
$$
  e_1 = (1, 1, 0),\quad f_1 = (0, 0, 1).
$$
are orthogonal and have opposite magnitudes. Since you know the Witt index is 1 then you know we're done and that $\mathrm{span}\{e_1,f_1\}$ is a maximal hyperbolic subspace.

Here is a third method: if we find an anisotropic subspace $K$ with codimension $2w + r$ where $r$ is the radical dimension, then $K^\perp = H\oplus R$ where $H$ is hyperbolic and $R$ is the radical. This follows from the Witt decomposition theorem and because $K\cap K^\perp = \{0\}$ for such a subspace. For your example $2w + r = 2$, so every non-isotropic vector gives us a maximal hyperbolic subspace. So every $v = (x, y, z)$ with
$$
  q(v) = x^2 + y^2 - 2z^2 \ne 0
$$
gives $\{v\}^\perp$ as a maximal hyperbolic subspace.
