Let $f: V\to \mathbb{R}$ be a linear function defined on some real vector space $V$.
It is known that, if $U$ is a convex and compact subset of $V$, then $f$ attains its maximum at some extreme point of $U$.
Suppose $U$ is a convex subset of $V$, but not necessarily compact. In this case, it is possible that $f$ does not attain its maximum in $V$. What can be said about the maximum point of $f$ in this case? Is it true that $f$ attains its maximum in a boundary point of $V$?
If $U$ is not compact, either its closure $\bar U$ is bounded, then it is compact and convex (in which case you are right and the maximum will be attained on the boundary if it is not attained in the interior) or $\bar U$ is unbounded. In the latter case it is possible that there is no maximum at all, for example for $f(x)=x$ and $U=\mathbb{R}=V$.