The question goes as follows:

Let $V = \mathbb R^{2n}$ be a vector space, and $q:V\to \mathbb R$ a real quadratic form. Let $\xi \in T_2^{sym}(V)$ be a bilinear functional for which $q(v) = \xi (v,v)$. Let us assume that $\xi$ is nondegenerate.

Prove that $q$ has a signature $0$ iff there exists a basis $[e]$ such that $$q(v) =\sum_{i=0}^n x_iy_i$$ where $[v]^{[e]} = (x_1,y_1,...x_n,y_n)$.

I couldn't figure how to prove any of the directions of the "iff". This were my thoughts:

Since $q(v) = \xi (v,v)$, we get that $\xi$ is the polarization of $q$, and since $\xi$ is nondegenerate we get that the rank of $q$ must be $2n$, or equaly $n_{-} + n_{+} = 2n$.

Now, for the first direction we assume that the signature is $0$, therefore $n_- = n_+ = n$, but I don't know how to continue from there.

For the second direction, we get that in the basis $[e]$ we have the matrix representing $q$ as having $\frac{1}{2}$ on every even entry above and below the main diagonal (and all the rest are $0$s), but I don't know how to continue from here as well.

Would appreciate your help on this question, preferably hints to the direction and comments on my approach.

Thanks!

There is less to this than may appear. All that is going on is $$\left( \begin{array}{rr} 1 & 1 \\ - \frac{1}{2} & \frac{1}{2} \end{array} \right) \left( \begin{array}{rr} 0 & 1 \\ 1 & 0 \end{array} \right) \left( \begin{array}{rr} 1 & - \frac{1}{2} \\ 1 & \frac{1}{2} \end{array} \right) = \left( \begin{array}{rr} 2 & 0 \\ 0 & - \frac{1}{2} \end{array} \right)$$
If you really want diagonal entries $1,-1$ you can then multiply on left and right by $$\left( \begin{array}{rr} \frac{1}{\sqrt 2} & 0 \\ & \sqrt 2 \end{array} \right),$$ this matrix being its own transpose.
Other direction, you can construct a matrix $P$ of nonzero determinant such that $$P^T C P = F,$$ where we are given $$C = \left( \begin{array}{rr} a & 0 \\ 0 & - b \end{array} \right)$$ with real $a,b > 0,$ while $$F = \left( \begin{array}{rr} 0 & 1 \\ 1 & 0 \end{array} \right)$$