# Derivative of a vector valued function

Let $f(\vec{x})=|\vec{x}|^2 \vec{x}$ be a function from $\mathbb{R}^n$ to $\mathbb{R}^n$. How does one differentiate such a function? I want to use the "abstract definition" and consider the $|\cdot|^2$ to be the dot product, and look at the sums of the squares of the components, but this seems unwieldy. What's the right approach here?

-

## 1 Answer

Suppose you want to calculate $grad f(\vec{a})$. Use the "Taylor expansion",

$f(\vec{a} + \vec{h}) = \langle \vec{a} + \vec{h}, \vec{a} + \vec{h} \rangle (\vec{a} + \vec{h}) = \| \vec{a} \|^2 \vec{a} + \langle \vec{a}, \vec{a} \rangle \vec{h} + 2 \langle \vec{a}, \vec{h} \rangle \vec{a} + O(\| \vec{h} \|^2) = f(\vec{a}) + \langle \vec{a}, \vec{a} \rangle \vec{h} + 2 \langle \vec{a}, \vec{h} \rangle \vec{a} + O(\| \vec{h} \|^2)$

The derivative means the linear term, thus in this case, it is the linear transformation that sends $\vec{h}$ to $\|\vec{a} \|^2 \vec{h} + 2 \langle \vec{a}, \vec{h} \rangle \vec{a}$.

-
Can you explain this Taylor expansion? This seems to come out of nowhere. This is what is lacking in my approach, such an understanding of the f(a+h) equality. – Wouter Zeldenthuis Nov 8 '12 at 2:26
I just expanded the inner product and the bracket. – user27126 Nov 8 '12 at 2:28