Given a quadratic homogeneous polynomial $f$ in $\mathbb{C}[x_0, \ldots, x_n],$ there is a unique symmetric matrix $A$ such that $f(v) = v^TAv.$ I recently learned that $f$ is non-degenerate ($A$ is non-singular) iff $f$ is equivalent to a quadratic form $x_0^2 + \ldots + x_k^2$ and $k = n.$
I managed to prove this, but I have trouble seeing that any degenerate quadratic form is equivalent to such a $x_0^2 + \ldots + x_k^2$. I suspect that the $k$ has something to do with the rank of $A$. Part of my confusion is this: $x_0^2 + \ldots + x_k^2 = v^TI_{k + 1}v$, where $I_{k + 1}$ is a diagonal matrix with the first $k + 1$ diagonal entires 1 and the rest 0. I have to prove that there is a $B$ such that $v^TB^TI_{k + 1}Bv = v^T A v.$ That is, a $B$ such that $B^TI_{k + 1}B = A.$ However, the product on the left has 0-column for the last $n - k - 1$. $A$ may be singular without such 0-columns.
Also, is it true that $f$ is irreducible iff $k \geq 2?$ I have tried to factor $f = (a_0x_0 + \ldots + a_nx_n)(b_0x_0 + \ldots b_nx_n)$ and tried to look at its symmetric matrix, but could not get anywhere. Any guidance is appreciated.