As discussed in user25658's answer to this question, when one wants to compute
$$ \beta = \mathbb{E}(x^Tx)^{-1} \mathbb{E}(x^TY) $$
but $\mathbb{E}(x^Tx)$ is not invertible, $\beta$ is not uniquely identified. A characterization of all possible values of $\beta$ is given by
$$\beta= \mathbb{E}(x^Tx)^g\mathbb{E}(x^Ty)$$
where $\mathbb{E}(x^Tx)^g$ is the generalized inverse of $\mathbb{E}(x^Tx)$.
In Hansen, Econometrics, pg 34, section 2.18 (as of today's version on Hansen's webiste) it is written that $x^T\beta = x^T \mathbb{E}(x^Tx)^g\mathbb{E}(x^Ty) $ is however uniquely identified.
This result is not completely counterintuitive to me. I understand that that this is matrix multiplication and that the fact that for every $x$ there may be multiple $\beta(x)$, say $\beta(x)_1 \neq \beta(x)_2$, does not imply $x^T\beta(x)_1 \neq x^T\beta(x)_2$.
Nevertheless, I have been unsuccessful in trying to prove the claim. Could someone help me with that?