I have come across a tricky linear algebra problem. We want to prove that a quadratic form $q$ on a finite dimensional real vector space $V$ can be expressed as $q(v) = f_1(v)f_2(v) \iff r + |\sigma| \leq 2$, $\forall$ vectors $v \in V$, where $f_1, f_2 \in V^*$ are linear functionals in the dual space, $r$ is the rank of $q$, and $\sigma$ is the signature of $q$.
I have been thinking about this one for a while and simply have no idea how to approach it. A useful starting point is Sylvester's law, which states that the dimension of the maximal positive definite and negative definite subspaces is independent of choice of basis. For the $\Rightarrow$ direction I've tried considering the dimension of the subspace on which $q(v)$ is zero. This subspace is $\ker{f_1} + \ker{f_2}$, since if either $f_1(v), f_2(v) = 0$, we'll have $q(v) = 0$. The dimension of this is $\dim{\ker{f_1} + \ker{f_2}} = \dim{\ker{f_1}} + \dim{\ker{f_2}} - \dim{\ker{f_1} \cap \ker{f_2}} = n - r$. The subspace on which $q$ is positive definite is the subspace where $f_1, f_2$ have the same sign. The subspace on which $q$ is negative definite is where $f_1, f_2$ have different signs. But I didn't know where to take these ideas after this.
For $\Leftarrow$ I have no idea how to approach using the bound to pull out linear functionals.
I do not know how to think about this problem so I would appreciate some guidance here.
$r + |\sigma| \leq 2$ covers four cases
Equip $V$ with a positive-definite inner product $\langle,\rangle$. Then $f_1, f_2$ can be written as $$f_1(v) = \langle a,v\rangle, \quad f_2(v) = \langle b,v\rangle$$ for some $a, b\in V$. If $W=\operatorname{span}\{a,b\}$ then $q(v)=0$ for $v\perp W$. So $q$ is supported on $W$ and has rank $\le 2$. If $v\in W$ then $$q(v) = \|a\|\|b\|\|v\|^2\cos(\theta_{av})\cos(\theta_{bv})$$ where $\theta_{av}$ is the angle between $v$ and $a$ $$\cos(\theta_{av}) = \frac{\langle a,v\rangle}{\|a\|\|v\|}$$ and similarly $\theta_{bv}$ the angle between $v$ and $b$.
This shows one direction that $q$ as a product of linear forms is one of the four cases. For the other direction, If you have a symmetric bilinear form that's one of these cases, there's an orthonormal basis that diagonlizes it - and you can derive $a$, $b$ from the basis vectors. The most complicated case $r=2$ for example in standard coordinates in a plane we have $q(x,y) = cx^2-dy^2$ with $c>0, d<0$ this factors as $q(x,y) = (\sqrt{c}x+\sqrt{d}y)(\sqrt{c}x-\sqrt{d}y)$.