This one seems intuitively obvious to me but I don't know how to prove it. Suppose you have a compact manifold $M$ with a function $f$ defined on it. Given two points $x$ and $y$ on the manifold, let $\gamma_{xy}: [0,1]\rightarrow M$ be the geodesic between $x$ and $y$. Then we say a function is convex if, $\forall x, y\in M, \lambda \in [0,1],\,\,\,\, f(\gamma_{xy}(\lambda)) \le (1-\lambda)f(x) + \lambda f(y)$
I can't think of any function on a compact manifold for which this is actually true, and I suspect that there are no convex functions on compact manifolds. Can anyone point me to the relevant proof?
Hint: Every non-constant smooth function on a compact manifold has two critical points.