# Does a convex function defined on a closed domain always attain its global minimum?

Let $f:X \to \Bbb R$ be a convex function where $X \subseteq \Bbb R$ is a closed set. Does $f$ always attain a global minimum in $X$? If not, anyone can help give a counterexample?

• Hint: there's a standard theorem about minimization of continuous functions on a closed set. – Brian Borchers Apr 5 '17 at 1:41
• @BrianBorchers: This theorem is typically stated with compact sets. – gerw Apr 5 '17 at 14:44

Counterexample. Let $f:\mathbb{R}\rightarrow\mathbb{R}$ defined by $f(x)=e^x$. We know that $\mathbb{R}$ is closed, but $f$ clearly doesn't have minumum.