What is the gradient $\nabla F$ of $F(\vec{x}) = {\lVert A \vec{x} - b \rVert}_2^2$ with $A \in \mathbb{R}^{n \times d}$
My work so far:
$\vec{x} \in \mathbb{R}^d$ and $b \in \mathbb{R}^n$.
\begin{align*} \nabla F &= \text{Vec} \left( \frac{\partial F}{\partial x_1}, \ldots, \frac{\partial F}{\partial x_d} \right) \\ \end{align*}
\begin{align*} \frac{\partial F}{\partial x_i} &= \end{align*}
From here, I'm stuck. How do I calculate that partial derivative?
$\begin{align}D_u(F) (x)&=\lim_{t\to 0}\frac{F(x+tu)-F(x)}{t}\\&=\lim_{t\to 0}\frac{\|A(x+tu)-b\|^2-\|Ax-b\|^2}{t}\\&=\lim_{t\to 0}\frac{\color{red}{\|Ax-b\|^2}+t\langle Ax-b, Au\rangle+t\langle Au, Ax-b\rangle+t^2\|Au\|^2 -\color{red}{{\|Ax-b\|^2}}}{t}\\&=2\langle Ax-b,Au\rangle\\&=\langle 2A^t(Ax-b),u\rangle\\&=\langle\nabla{F},u\rangle\end{align}$
Notations:
$D_u(F) (x) $: the directional derivative of $F$ at $x$ along the direction of the unit vector $u$
$A^t$ : transpose of the matrix $A$
$\langle \cdot, \cdot\rangle$ : inner product
Note:
$\|x\|^2=\langle x, x\rangle$
Polynomials are differentiable.
If $F$ is differentiable at $x$ then the directional derivative of $F$ at $x$ along the direction of any unit vector $u$ exists and satisfy $$D_u(F) (x) =\langle \nabla F, u\rangle$$