Proof that real quadratic forms are always diagonalisable I'm having some trouble understanding Theorem 1 in Chapter 8 of Lax's book on Linear Algebra.  This chapter is "spectral theory of self-adjoint mappings of a Euclidean space".  The theorem is that

Given a real quadratic form $$q(y) = \sum_{i,j} h_{ij} y_i y_j$$
it is possible to change variables as in $Ly=z$ s.t. in terms of the new variabls, $z, q$ is diagonal, i.e. of the form
$$q \left( L^{-1} z \right) = \sum_{1}^{n}d_iz_i^2 \tag{11}\label{11}$$


The proof is as follows.
The proof is entirely elementary and constructive.  Suppose that one of the diagonal elements of $q$ is non-zero, say $h_{11}\ne0$.  We then group together all terms containing $y_1$
$$q(y)=h_{11}y_1^2+\sum_{2}^{n}h_{1j}y_1y_j+\sum_{2}^{n}h_{ij}y_iy_j$$
Since $H$ is symmetric, $h_{j1}=h_{1j}$, and so we can write
$$h_{11}\left(y_1+h_{11}^{-1}\sum_{2}^{n}h_{1j}y_j\right)^2-h_{11}^{-1}\left(\sum_{2}^{n}h_{1j}y_j\right)^2$$
Set
$$y_1+h_{11}^{-1}\sum_{2}^{n}h_{1j}y_j=z_1\tag{12}$$
We can then write
$$q(y)=h_{11}z_1^2+q_2(y)\tag{13}\label{13}$$
where $q_2$ depends only on $y_2,\dots,y_n$.
If all diagonal terms of $q$ are zero but there is some non-zero off-diagonal term, say $h_{12}=h_{21}\ne0$, then we introduce $y_1+y_2$ and $y_1-y_2$ as new variables, which produces a non-zero diagonal term.  If all diagonal and off-diagonal terms are zero, then $q(y)\equiv0$ and there is nothing to prove.
We now apply induction on the number of variables $n$.  Using (13) shows that if the quadratic function $q_2$ in $(n-1)$ variables can be written in form (11), then so can $q$ itself.  Since $y_2,\dots,y_n$ are related by an invertible matrix to $z_2,\dots,z_n$, it follows from (12) that the full set $y$ is related to $z$ by an invertible matrix.
This proof seems to skip the step of showing that the matrix is actually invertible.  As far as I can tell, this method gives an upper triangular matrix $L$.  However it doesn't seem to show or give a reason why $L$ is immediately invertible.  I think I'm able to follow the reasoning up to (and including) the induction, but it's the last few sentences about invertibility that I'm confused about.

The answer is quite simple.  Since $y_i$ and $z_i$ are "coordinates", they can be treated as constant.  Since $q_2$ does not include any terms with $y_1$, this mapping is injective and so the matrix representing this mapping is invertible.
