Let $\ell_1,\dots,\ell_{m+n}$ be linear functionals over a finite vector space $V$. Suppose that $$Q(x)=\ell_1(x)^2+\dots+\ell_m(x)^2-\ell_{m+1}(x)^2-\dots-\ell_{m+n}(x)^2$$ is a quadratic form with signature $(a,b,c)$. Show that $a\leq m$ and $b\leq n$.
By Sylvester's law, we know that there are (independent) linear functionals $f_1,\dots,f_{a+b}$ such that $$Q(x)=f_1(x)^2+\dots+f_a(x)^2-f_{a+1}(x)^2-\dots-f_{a+b}(x)^2.$$ So somehow we need to show that this representation is "minimal". I'm not really sure how to proceed from here.
I have tried to represent each functional in the form $\ell_i(v)=u_i\cdot v$ for some vector $u_i$, but this hasn't really helped.
Let $d=\dim V$ and $K=\displaystyle\bigcap_{i=1}^m\ker\ell_i$.
Then $Q(x)\leq0$ for $x\in K$, so $\dim K\leq d-a$. Now let $T:V\to\mathbb R^m$ be the linear map $$T(x)=(\ell_1(x),\ell_2(x),\dots,\ell_m(x)).$$ As $\dim\operatorname{im}T\leq m$, by rank-nullity $\dim\ker T\geq d-m$. But $K=\ker T$, so it follows that $$d-a\geq d-m\implies a\leq m.$$ Similarly, considering $\displaystyle\bigcap_{i=m+1}^{m+n}\ker\ell_i$ would imply that $b\leq n$.