# What does $d_{\textbf{a}} f$ mean?

I have a question regarding the differential $d_{\textbf a} f$.

Suppose we have the function $f(x,y)= xy$, and the vectors $\textbf a = (1,1)$ and $\textbf u = (2,1)$. Then, if I understand this correctly, $$d_{\textbf a} f(\textbf u) = \nabla f(\textbf a) \cdot \textbf u = (1,1)\cdot (2,1) = 2+1 = 3,$$ where $\nabla f(\textbf a) = (\partial f/\partial x, \partial f/\partial y)$. But what if my assignment is to calculate $d_{\textbf a} f$? I don't know what it means. Do they want me to calculate $d_{\textbf a} f(x,y) = (1,1)\cdot (x,y) = x+y$, or something else?

Edit: Note that it is not the directional derivative that I'm asking about.

-
What is $v$ supposed to be in the above equation? Since $d_a$ would normally refer to the directional derivative, please also give more information about the context. – Alexander Thumm May 30 '11 at 18:28
I think the OP means $\mathbf{u}$ rather than $\mathbf{v}$ in the displayed equation. – Jesse Madnick May 30 '11 at 18:28
There's a minor point that I'm curious about: does your book refer to $\mathbf{a} = (1,1)$ as a "point" or a "vector"? The distinction doesn't really matter mathematically, but sometimes it helps psychologically. – Jesse Madnick May 30 '11 at 18:30
What I mean is that we usually think of taking the gradient $\nabla f$ at a point $a = (1,1)$, and then taking the dot product of that with the vector $\mathbf{u} = (2,1)$. Similarly, the differential $d_af$ is regarded as being at the point $a$. – Jesse Madnick May 30 '11 at 18:31
As you mentioned in a previous post, the notation is $$D_\mathbf{v}f(a) = \nabla f(a)\cdot \mathbf{v} = d_af(\mathbf{v}),$$ where $D_\mathbf{v}f(a)$ is the directional derivative in the direction of the vector $\mathbf{v}$ evaluated at the point $a$. – Jesse Madnick May 30 '11 at 18:33

Essentially, you have worked out everything already, but there seems to be a bit of confusion about the definitions, so let me try to set this straight.

The differential of $f$ at the point $\mathbf{a} \in \mathbb{R}^2$ is the row matrix $$d_{\mathbf{a}}f = \begin{pmatrix} \frac{\partial}{\partial x} f(\mathbf{a}) & \frac{\partial}{\partial y}f (\mathbf{a}) \end{pmatrix}.$$

Now if you write $d_{\mathbf{a}}f (\mathbf{u})$ for $\mathbf{u} = \begin{pmatrix} u_1 \\\ u_2 \end{pmatrix} \in \mathbb{R}^2$ you're meaning the matrix product $$d_{\mathbf{a}}f (\mathbf{u}) = \begin{pmatrix} \frac{\partial}{\partial x} f(\mathbf{a}) & \frac{\partial}{\partial y}f (\mathbf{a}) \end{pmatrix} \cdot \begin{pmatrix} u_1 \\\ u_2 \end{pmatrix} = \frac{\partial}{\partial x} f(\mathbf{a}) \cdot u_1 + \frac{\partial}{\partial y}f (\mathbf{a}) \cdot u_2 .$$

On the other hand, $\nabla f (\mathbf{a})$ is the column vector $$\nabla f (\mathbf{a}) = \begin{pmatrix} \frac{\partial}{\partial x} f(\mathbf{a}) \\\ \frac{\partial}{\partial y}f (\mathbf{a}) \end{pmatrix}$$ and when you're writing $\nabla f (\mathbf{a}) \cdot \mathbf{u}$ you're meaning the scalar product $$\nabla f( \mathbf{a}) \cdot u = \begin{pmatrix} \frac{\partial}{\partial x} f(\mathbf{a}) \\\ \frac{\partial}{\partial y}f (\mathbf{a}) \end{pmatrix} \cdot \begin{pmatrix} u_1 \\\ u_2 \end{pmatrix} = \frac{\partial}{\partial x} f(\mathbf{a}) \cdot u_1 + \frac{\partial}{\partial y}f (\mathbf{a}) \cdot u_2 .$$

So we see that for $f(x,y) = xy$ $$d_{\mathbf{a}}f = \begin{pmatrix} y & x \end{pmatrix} \qquad \text{while} \qquad \nabla f (\mathbf{a}) = \begin{pmatrix} y \\\ x \end{pmatrix}.$$

Now the confused reaction was due to the fact that the notation used here for the derivative of $f$ at the point $\mathbf{a}$ is often used as the directional derivative, and as you rightly pointed out in a comment, we have the relations $$D_{\mathbf{u}} f (\mathbf{a}) : = d_{\mathbf{a}} f (\mathbf{u}) = \nabla f(\mathbf{a}) \cdot \mathbf{u},$$ and everything should be fine now, no?

Since you made the computations yourself already, I'll not repeat them here.

-
I'm having a little trouble with understanding the difference in using matrices and matrix product vs. vectors and scalar product. Since the results are the same, I guess must be because of some underlying theoretical difference between $\nabla f(\textbf a)$ and $d_{\textbf a} f$? Also, I came over this definition: $df=\frac{\partial f}{\partial x}(\textbf a) \cdot dx + \frac{\partial f}{\partial y}(\textbf a) \cdot dy$. How does this fit in with the rest of it? – please delete me May 30 '11 at 21:37
@Eivind: Okay, I see. As I mentioned in my comment to Jesse's answer, $d_{\mathbf{a}}f$ is a linear map $d_{\mathbf{a}}f : \mathbb{R}^2 \to \mathbb{R}$. Now from linear algebra you might know that every linear map $\phi: \mathbb{R}^2 \to \mathbb{R}$ is of the form $\phi(v) = \langle x_\phi, v \rangle$ for a unique vector. The vector corresponding to $d_{\mathbf{a}}f$ is $\nabla f(\mathbf{a})$, that is $d_{\mathbf{a}}f(\mathbf{u}) = \langle \nabla f (\mathbf{a}), \mathbf{u} \rangle$. Note that the formulae for the matrix product and the scalar product are similar, but they mean rather ... – t.b. May 30 '11 at 21:43
... different things! – t.b. May 30 '11 at 21:43
Let $\mathbf{u} = \begin{pmatrix} u_1 \\\ u_2 \end{pmatrix}$. The map $dx$ is a linear form and $dx (\mathbf{u}) = u_1$ and analogously $dy(\mathbf{u}) = u_2$, thus writing $d_{\mathbf{a}}f = \frac{\partial}{\partial x}f(\mathbf{a)} dx + \frac{\partial}{\partial y}f(\mathbf{a)} dy$ means when evaluating at $\mathbf{u}$ that $d_{\mathbf{a}}f (\mathbf{u}) = \frac{\partial}{\partial x}f(\mathbf{a)} dx (\mathbf{u}) + \frac{\partial}{\partial y}f(\mathbf{a)} dy (\mathbf{u}) = \frac{\partial}{\partial x}f(\mathbf{a)} u_1 + \frac{\partial}{\partial y}f(\mathbf{a)} u_2$ again, so it's the same thing. – t.b. May 30 '11 at 21:49
@Theo I like your explanation here but have a follow-up. Without invoking, say, the Jacobian and its role in characterizing the derivative, is there an even more elementary way to show that the differential is a row vector and the gradient is a column vector? Said differently, from first principles, how can one know that the differntial is, in fact a row vector and the gradient is a column vector? – ItsNotObvious May 30 '11 at 23:44

In the case of functions $f\colon \mathbb{R}^n \to \mathbb{R}$, like $f(x,y) = xy$ as you have, the differential $d_af$ is the same thing as the gradient $\nabla f(a)$.

-
No, it's not the same thing. One is a linear map $d_af: \mathbb{R}^n \to \mathbb{R}$ (hence a row matrix once you choose a basis), the other is a vector $\nabla f(a) \in \mathbb{R}^n$). They're related by $(d_af)(v) = \langle \nabla f(a), v \rangle$. But: The linear map is invariantly defined (independently of a basis), the gradient is only defined when a scalar product is around (the standard one once you've chosen a basis). – t.b. May 30 '11 at 18:29
@Theo: Yes, you're right of course, but I was trying to keep it simple. – Jesse Madnick May 30 '11 at 18:42