Given the least square problem $min ||Ax-y||_{2}^{2}$ for a matrix $A \in \mathbb{R}^{m\times n}$ and vector $y \in \mathbb{R}^m$.
Show that the objective function $f(x) = ||Ax-y||_{2}^{2}$ is convex and calculate the gradient of f.
How do I solve this? Please help.
Note that $f(x) = (Ax - b)^T (Ax-b)$. $$ \nabla f = 2A^TAx - 2A^Tb \\ \nabla^2 f = 2A^TA $$ $\nabla^2 f$ is semi-definite.