# Why does local minimality imply all partial derivatives to be $0$? [closed]

Suppose I have a continuous function $h : \mathbb{R}^n \rightarrow \mathbb{R}$, and suppose $\mathbf{z}$ is a local minimum.

Why does it then imply that $\nabla h (\mathbf{z}) = \mathbf{0}$?

ps I apologize for the confusion. I forgot to mention that $\nabla h$ is well defined on $\mathbb{R}^n$.

## closed as off-topic by Guy Fsone, Namaste, Hans Lundmark, jgon, kimchi loverJan 11 '18 at 23:44

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – Guy Fsone, Namaste, Hans Lundmark, jgon, kimchi lover
If this question can be reworded to fit the rules in the help center, please edit the question.

• Relative Extrema are related to critical points. The critical point is where the gradient equals $0$. – Biggs Jan 11 '18 at 18:25
• Note that $z=\sqrt{x^2+y^2}$ has a local minimum at $(0,0)$. But what is the gradient here? – Emilio Novati Jan 11 '18 at 18:27

Just fix $e_i (0,0....1,0...0)$ a unit vector and define $g: (-1,1) ~~t\mapsto g(t) = h(z+te)$ then $t=0$ is a local minimum of the function $g$ is some small neighborhood of $t=0$.

Hence, $$0=g'(0)= \nabla h(z)\cdot e_i ~~~$$

That is for all $e_i$ we have $$\nabla h(z)\cdot e_i =\frac{\partial h}{\partial x_i}(z)=0$$

• All we know is that $h$ is continuous, so this doesn't work. – zhw. Jan 11 '18 at 19:01
• @zhw. can we talk about partial derivate of continuous functions?. The differentiability is implicitly assumed here. Please read the title – Guy Fsone Jan 11 '18 at 19:23
• @zhw. what is the gradient of continuous functions? thanks very much for your down vote – Guy Fsone Jan 11 '18 at 19:28
• No, the title does not imply that differentiability is assumed, as noted by others here. Even if we assume the partial derivatives exist, your proof for a an arbitrary unit vector $e$ is incorrect, as those directional derivatives may not exist. – zhw. Jan 11 '18 at 19:59
• @zhw. hahah funny why dont you take $e=e_i$ this what what I meant – Guy Fsone Jan 11 '18 at 20:09

Due to Emilio Novati's counterexample, let's first assume that the partial derivatives of $h$ exist in $\mathbf{z}$.

If we had that $\nabla h (\mathbf{z}) \neq \mathbf{0}$, then at least one of the partial derivatives would be non-zero, which means that function $h$ is increasing/decreasing in $\mathbf{z}$ with respect to that variable (if it's increasing, just let the variable vary the other way around, so it becomes decreasing), and thus as it is decreasing in $\mathbf{z}$, you cannot find a neighborhood in $\mathbf{z}$ where all $f(\mathbf{a})\geq f(\mathbf{z})$.