Someone answered a question introducing this transformation of the function $f(x)=||A\vec{x}-\vec{b}||^2$ ; but I cannot get the idea why and how. Looks a bit like a binomial expansion, but I can't grasp the transpose multiplication.
Thanks in advance.
Note that for any real vector $v$, $\|v\|^2 = v^Tv$. So, now we have $$ \|Ax - b\|^2 = \\ (Ax - b)^T(Ax - b)=\\ (x^TA^T - b^T)(Ax - b) =\\ x^TA^TAx - x^TA^Tb - b^TAx - b^Tb =\\ x^TA^TAx - x^TA^Tb - b^TAx - \|b\|^2 $$ as desired.