What is the difference between derevative w.r.t a vector and directional derivative? Say we have a scalar-valued function $f: \mathbb R^3 \rightarrow \mathbb R$, such that:  $$f(\mathbf x) = \mathbf x^T\mathbf a$$
$\mathbf x$ and $\mathbf a$ are two vectors.
The derivative of $f$ with respect to $\mathbf x$ is $\nabla f$, but the directional derivative of $f$ in $\mathbf x$ direction is $\nabla f\cdot \mathbf x$ (the dot denotes the dot product).
EDIT 1:
By definition: $\dfrac{\mathrm d f}{\mathrm d \mathbf x} = \nabla f$

Based on this definition, we have: $$\dfrac{\partial f}{\partial \mathbf x} = \mathbf a$$
My question is: why there is a difference between the two ($\dfrac{\mathrm d f}{\mathrm d \mathbf x} = \nabla f$ and the directional derivative in $\mathbf x$ direction)?
Thank you
 A: I think you are confusing the notions of the derivative of $f$ at a point $\mathbf{x} \in \mathbb{R}^3$ and the derivative of $f$ along a vector $\mathbf{v}$.
The gradient of $f$ at $\mathbf{x}$ denoted as $\nabla f(\mathbf{x})$ (sometimes referred to as the derivative of $f$ at $\mathbf{x}$) and the directional derivate of $f$ at $\mathbf{x}$ along a unit vector $\mathbf{v}$, sometimes denoted as $\dfrac{\partial f}{\partial \mathbf{v}}(\mathbf{x})$, are two different but related notions.
$\dfrac{\partial f}{\partial \mathbf{v}}(\mathbf{x})$ is defined as
$$
\lim_{h \rightarrow 0} \frac{f(\mathbf{x} + h \mathbf{v}) - f(\mathbf{x})}{h},
$$
i.e., it is the rate of change of $f$ at $\mathbf{x}$ when walking along the line given by $\mathbf{x} + t \mathbf{v}$, $t \in \mathbb{R}$. One can show the following relation between the gradient and the directional derivative:
$$
\dfrac{\partial f}{\partial \mathbf{v}}(\mathbf{x}) = \nabla f(\mathbf{x}) \cdot \mathbf{v}.
$$
From this it is not hard to see that $\nabla f(\mathbf{x})$ is a vector that has the property that it points in the direction of the steepest ascent of $f$. (Can you see why?)
In your example $\nabla f(\mathbf{x}) = \mathbf{a}$, so the direction of steepest ascent of $f$ is always given by $\mathbf{a}$. If you want to compute the directional derivative along the $x_1$ axis say, then you take the unit vector $\mathbf{e}_1$ and compute $\nabla f(\mathbf{x}) \cdot \mathbf{e}_1 = a_1$.
