Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|cite|improve this question
up vote 1 down vote accepted

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}$.

share|cite|improve this answer
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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.