Gradient of squared euclidean norm

144 Views Asked by At

For a given: $A \in \mathbb{R}^{m \times n}$

I am trying to calculate the gradient of:

$$f(x) := \frac{1}{2}\left\|{A^T x}\right\|_2^2 - b^Tx.$$

Therefore I wrote $f$ like this:

$$f(x) = \frac{1}{2}\sum_{i=1}^m\left(\left(A_{.,i}x\right)^2 - b_i^T x_i\right),$$

where $A_{.,i}$ denotes column $i$ of matrix $A$. After this I only get completely wrong results. Can anybody tell me how to continue or where I got wrong?

Thanks in advance!!