Gradient of $\lVert A(X) - b\rVert^2$ with $A$ a linear operator Let $X\in\mathbb{R}^{p\times m}$, $b\in\mathbb{R}^{k}$ and let $A:\mathbb{R}^{p\times m}\to\mathbb{R}^k$ be a linear operator. I need to compute the gradient with respect to $X$ of
$f(X) = \lVert A(X) - b\rVert ^2$ and my claim is that $\nabla f(X) = 2\cdot A^T(A(X) - b)$, there $A^T$ is the transposed operator of $A$. However, I cannot prove it in a simple way that does not involve Fréchet derivatives. Is there a simple way to prove it (if my claim is correct)?

Hint: Note that $\|z\|^2=z^Tz $  for column vector $z$ and use matrix derivative rules.
