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?
We have
$$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$$