I have to prove that given a matrix $A \in \mathbb{R}_{m\times n}$ and $b \in \mathbb{R}^n$.
Suppose that the system $Ax=b$ is solvable, x is solution of $Ax=b$ If and only if x is solution of $A^TAx=A^Tb$.
It's easy to show that if x is solution of $Ax=b$ them it is also solution if $A^tAx=A^Tb$, but I can't figure out why I have the other direction even if $A$ doesn't have full rank (that partícular case is easy to solve).
Let $S_1=\{x:Ax=b\}$ and $S_2=\{x:A^TAx=A^Tb\}$. Now $S_1 \subseteq S_2$ trivally. To show the otherway around, note that $A^Tx=A^Tb$, has one of the solution as $x_0=(A^TA)^{\dagger}A^Tb$. Now $Ax_0 = A(A^TA)^{\dagger}A^Tb$. Now note that $A(A^TA)^{\dagger}A^T$ is the projection operator on the column space of A. To see that, let $A=\tilde{U}\tilde{\Sigma}\tilde{V}^T$ be the compact svd of $A$, so $A(A^TA)^{\dagger}A^T=\tilde{U}\tilde{\Sigma}\tilde{V}^T(\tilde{V}\tilde{\Sigma}^2\tilde{V}^T)^{\dagger}\tilde{V}\tilde{\Sigma}\tilde{U}^T=\tilde{U}\tilde{\Sigma}\tilde{V}^T\tilde{V}\tilde{\Sigma}^{-2}\tilde{V}^T\tilde{V}\tilde{\Sigma}\tilde{U}^T=\tilde{U}\tilde{U}^T=P_{range(A)}$. Now as $Ax=b$ has a solution, it means $b \in range(A)$, so $Ax_0 = A(A^TA)^{\dagger}A^Tb = P_{range(A)}b=b$ and so $x_0$ is also solution of $Ax=b$, which proves $S_2 \subseteq S_1$ and hence $S_1=S_2$ when b lies in the range space of $A$. An easy way to see this through dimensionality argument. Note that we already have $S_1 \subseteq S_2$. Now because $A$ and $A^TA$ have the same null space(easy exercise), we have $dim(S_1) = dim(S_2)$ and so combining this with $S_1 \subseteq S_2$ we have $S_1=S_2$.