Optimality condition for a convex, unconstrained problem

Consider the unconstrained optimization problem

\[ \min_x \: f_0(x) , \]

where \(f_0 : \mathbf{R}^n \rightarrow \mathbf{R}\) is convex and differentiable.

The optimality condition

\[ \forall \: y \in \mathbf{X}  :  \nabla f_0(x) ^T (y-x) \ge 0 . \]

where the feasible set \(\mathbf{X}\) is now the whole space \(\mathbf{R}^n\), reduces to

\[ \nabla f_0(x) = 0. \]

Example: