How to Prove a Function is Affine if Convex and Concave

analysisconvex-analysisconvex-geometry

Suppose $f:\mathbb{R}^n\to \mathbb{R}$ is both convex and concave, how to prove that $f$ is linear? or exactly speaking, $f$ is affine?

I thought for the whole day, but I cannot figure it out.

When I was working on this problem, I met another problem, are all the convex function continuous? If not, is there any counter example?

Actually, I can prove for one dimensional case, in which $f:\mathbb{R}\to \mathbb{R}$. However, I cannot generalize it into n dimensional cases.

By the way, I use definition for convex(concave) like this:
$$f(t\vec{x}+(1-t)\vec{y})\leq(or \geq) tf(\vec{x})+(1-t)f(\vec{y}), \forall t\in[0,1].$$

Thank you so much!

Best Answer

Let $g(x) = f(x) - f(0)$. It suffices to show that $g$ (which is also both convex and concave, and satisfies $g(0)=0$) is linear. Next, note that for $t > 1$, $x = (1/t) (tx) + (1 - 1/t) (0)$.

That should give you a good start...