The teacher gave this exercise:
Find $D_f(a)$ when $f: \mathbb R^n \to \mathbb R$, $f(x)=<x,\xi>^2$ where $\xi \in \mathbb R^n$.
What I did:
I wrote it as $$f(x)= (\sum_{i=1}^{n}x_i \xi_i)^2$$
and so $$\frac{df}{dx_j} = 2\xi_j(\sum_{i=1}^{n}x_i \xi_i)$$
What the teacher did (please explain, I don't understand what he did):
"we will find $D_f(a)$ using how it acts in direction $h$":
$$f(x)= (\sum_{i=1}^{n}x_i \xi_i)^2$$
So:
$$D_f(a)h=\frac{d}{dt}|_{t=0}f(a+th) = ...=2(\sum_{i=1}^n a_i \xi_i)(\sum_{i=1}^nh_i \xi_i)$$
And so it follows that:
$D_f(a)h=<a,\xi><h,\xi>$
QED
Could someone explain what he did? as this is not even similar to my answer
You computed the gradient $\nabla f(x)=\left({\partial f(x)\over\partial x_1},\ldots,{\partial f(x)\over\partial x_n}\right)$ and obtained $$\nabla f(x)=2\langle x,\xi\rangle\>\xi\ .$$ Now the "official" $df(x)$ is a linear functional, and the gradient $\nabla f(x)$ is the vector that represents this functional via the scalar product. This means that $$df(x).h=\bigl\langle\nabla f(x), h\bigr\rangle=2\langle x,\xi\rangle\>\langle\xi,h\rangle\ .$$ Therefore the teacher obtained the same as you did, but he came to an end, whereas your answer is somehow "dangling".