Simple question like the title asked, Is there always a direction in which the directional derivative of a function is zero? At origin, wouldn't directional derivative always be 0?

  • $\begingroup$ Hello and welcome to math.stackexchange! Nice question. The answer is YES, as soon as there is more than one independent variable and the function is differentiable. Any direction that is perpendicular to the gradient will do. But this has nothing to do with the origin $\endgroup$ Feb 19, 2017 at 18:55
  • $\begingroup$ Could you give me some examples? Thanks. $\endgroup$ Feb 19, 2017 at 18:56
  • $\begingroup$ Let $f(x,y)$ then $\nabla_v f(0) = v_x \frac{\partial f}{\partial x}(0)+ v_y\frac{\partial f}{\partial y}(0) $ and so $v_x = -\frac{\partial f}{\partial y}(0) ,v_y = \frac{\partial f}{\partial x}(0) $ is a direction such that $\nabla_v f(0) =0$ $\endgroup$
    – reuns
    Feb 19, 2017 at 19:36
  • $\begingroup$ @user3613025, what are you asking for examples of? Examples of directional derivatives of differentiable functions? Examples of perpendicular functions? etc. $\endgroup$
    – Mark S.
    Feb 19, 2017 at 22:22

1 Answer 1


Nice functions?: Yes

If a function $f$ is nice enough that it is differentiable at a point $\mathbf{x}$, the directional derivative in the direction of $\mathbf{v}$ (at least if $\mathbf{v}$ is a unit vector), is given by the dot product of the gradient and $\mathbf{v}$: $\nabla_{\mathbf{v}}f(\mathbf{x})=\nabla f(\mathbf{x})\bullet \mathbf{v}$. If you are working in at least two dimensions, you can do as Hans Engler suggested and take $\mathbf{v}$ in a direction perpendicular to $\nabla f(\mathbf{x})$ to force $\nabla f(\mathbf{x})\bullet \mathbf{v}=0$.

So for differentiable functions, the answer is yes.

All functions?: No

However, in general, the answer is no.


Consider the function $$f\left(x,y\right)=\begin{cases}\dfrac{xy^{2}}{x^{2}+y^{4}}+x+y & \text{ where defined }\\0 & \text{ at }(0,0)\end{cases}$$ This function is not differentiable at $(0,0)$, but all directional derivatives exist at that point. It turns out that none of those directions give a directional derivative of $0$.


The derivative in the direction of $\langle\pm1,0\rangle$ is $\displaystyle{\lim_{h\to0}}\dfrac{f(\pm h,0)-f(0,0)}{h}=\displaystyle{\lim_{h\to0}}\dfrac{\pm h}{h}=\pm 1$.

Now consider all other directions, unit vectors $\left\langle a,b\right\rangle$, where $a\ne0$. The directional derivative is ${\displaystyle \lim_{h\to0}}\dfrac{f\left(h\left\langle a,b\right\rangle \right)-f\left(0,0\right)}{h}={\displaystyle \lim_{h\to0}}\dfrac{ab^{2}}{a^{2}+h^{2}b^{4}}+a+b=\dfrac{b^{2}}{a}+a+b=\dfrac{a^2+ab+b^2}{a}$. If $ab=0$ then since $a\ne0$ we have $b=0$, so this directional derivative is $a=\pm1$. If $ab>0$ then $a^2+ab+b^2>0$ and if $ab<0$ then $a^2+ab+b^2=(a+b)^2-ab>0$. In all cases, the directional derivative can't be $0$.


To get a sense for this visually, the graph of $f$ is graph of f

The parabolic crease is why it's not continuous or differentiable at $(0,0)$.

You can see slices of it at various angles to investigate the directional derivatives:

images of slices


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .