Differentiate the squared dot product I am new to Mathematics stack exchange community and has no experience in asking question so please bear with me. I am watching deep learning course from Coursera and encounter a question during the video.
$$\left|\frac d{d\vec x}(\vec x\cdot\vec x)^2\right|=?$$
$$\vec x=\begin{bmatrix}x_1\\x_2\end{bmatrix}=\begin{bmatrix}3\\4\end{bmatrix}$$
I am not sure how to perform dot product on 2 vectors since they are 2x1 and 2x1 dimension. Please guide me! Thanks
Note:
After some try and error, I got the answer, but I don't understand the solution.


By definition, the derivative of a scalar $f(x,y)$ with respect to a vector $(x,y)$ is the following vector $$\left(\frac{\partial f}{\partial x},\frac{\partial f}{\partial y}\right).$$
We have $$f(x_1,x_2)=(\vec x \cdot \vec x)^2 =\left(x_1^2+x_2^2\right)^2.$$
So the derivative in question is the vector $$(4(x_1^2+x_2^2)x_1,4(x_1^2+x_2^2)x_2).$$
At $(3,4)$, this is $$(300,400).$$ 
EDIT
Taking the absolute value:
$$|(300,400)|=\sqrt{300^2+400^2}=100\times5=500.$$
