Artificial intelligent assistant

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?

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.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 1ceae10d5ddcb025df73c4ef704fe8b3