Given $$\min\limits_x \|x\|_2^2$$ $$\text{s.t.} Ax = b$$ show $x^* = A^T(AA^T)^{-1}b$ where $A \in \mathbb{R}^{m \times n}, m < n$
This is projection $x$ onto the hyperplane $Ax - b = 0$
Multiplying $A^T$ on both sides
$A^TAx - A^Tb = 0$
So we have $\langle A^TAx - A^Tb, x \rangle = 0$
$(A^TAx - A^Tb)^Tx = 0$
$(x^TA^TA - b^TA)x = 0$
$x^TA^TAx = b^TAx = x^TA^Tb$
So $A^TAx = A^Tb$ (circular)
$x = (A^TA)^{-1}A^Tb$ (Wrong)
How can you do this correctly?
You need the hypothesis that $A$ has rank $m$ so that $AA^T$ is invertible.
Since $x^*=A^T(AA^T)^{-1}b$ we have $Ax^*=b$, so for every $x$ such that $Ax=b$ we have $x-x^*\in {\rm ker}A$ and clearly $x^*\in {\rm Im}A^T$, but it is well-known that ${\rm Im}A^T=({\rm ker}A)^\bot$. Thus, by Pythagoras theorem $$\Vert x\Vert^2=\Vert x-x^*\Vert^2+\Vert x^*\Vert^2\ge \Vert x^*\Vert^2$$ with equality if and only if $x=x^*$.