# Derivative of $f(x)=\|Ax\|_2^2$

I'm trying to find the derivative of $f(x)=\|Ax\|_2^2$ where $A$ is some matrix and $\|u\|_2$ is the euclidean norm of $u$, $\|u\|_2 = \sqrt{u_1^2+u_2^2+\cdots+u_n^2}$

I know how to do this by expanding the terms, using a lot of $\sum$ signs etc, but I am trying to avoid all that by using the definition.

$$f'(x) = \lim_{t \to 0} \frac{f(x+th)-f(x)}{t} = \lim_{t \to 0} \frac{\|Ax+Ath\|_2^2-\|Ax\|_2^2}{t}=\lim_{t \to 0} \frac{(\|Ax+Ath\|_2+\|Ax\|_2)(\|Ax+Ath\|_2-\|Ax\|_2)}{t}$$

And I'm stuck here, don't know how to proceed.

Is there a way of doing this without actually writing each norm as a sum and writing $Ax$ explicitly etc?

• When you write a lim_{t\to0} b rather than a\lim_{t\to0} b in a "displayed" (as opposed to "inline") setting, then you see $\displaystyle a lim_{t\to0} b$ rather than $\displaystyle a\lim_{t\to0} b$. The three differences are (1) $\lim$ is not italicized; (2) proper spacing between $a$ and $\lim$ and between $\lim$ and $b$; and (3) the position of the subscript. That last one doesn't apply to inline settings. The latter form is standard and I changed it. – Michael Hardy May 13 '14 at 20:00

$$f(x)=\langle Ax,Ax\rangle =\varphi\circ\psi(x)$$ where $$\varphi(u,v)=\langle u,v\rangle$$ is a bilinear map and $$\psi(x)=(Ax,Ax)$$ is a linear map, hence by the chain rule we have $$Df(x)h=D\varphi(\psi(x))D\psi(x)h=D\varphi(\psi(x))(Ah,Ah)=\langle Ax,Ah\rangle+\langle Ah,Ax\rangle\\=2\langle Ax,Ah\rangle$$