Let $U \subset \mathbb{R}^n$ be an [open set](/page/Open%20Set), let $a \in U$, and let $f: U \to \mathbb{R}$ be differentiable at $a$. Suppose that $a$ is a local maximum or a local minimum of $f$ on $U$. Then, for every vector $v \in \mathbb{R}^n$, the [directional derivative](/page/Directional%20Derivative) of $f$ at $a$ in the direction $v$ exists and satisfies