I am trying to prove the following: If a function $f$ is concave and convex, then it is affine.

Since $f$ is convex we have $f(\lambda x +(1-\lambda)y) \leq \lambda f(x) + (1-\lambda)f(y))$ and $f(\lambda x +(1-\lambda)y) \geq \lambda f(x) + (1-\lambda)f(y)) $. Thus we know $f(\lambda x +(1-\lambda)y) = \lambda f(x) + (1-\lambda)f(y))$. This shows that $f$ is linear and hence it is affine.

Is this proof right? Could anyone tell me if there is another way to prove this? Thanks!

## Best Answer

You need to show that $f(\lambda x + (1-\lambda ) y) = \lambda f(x) + (1-\lambda ) f(y)$ for all $\lambda$.

You have shown that this is true for $\lambda \in [0,1]$.

Assume $x \ne y$ (otherwise there is nothing to prove).

Suppose $\lambda >1$ and let $p=\lambda x + (1-\lambda ) y$.

Write $x = t p +(1-t) y$ and show that $\lambda = {1 \over t}$. In particular, $t \in [0,1]$ and so $f(x) = t f(p) + (1-t) f(y)$. Hence $f(x) = {1 \over \lambda} f(p) + (1-{1 \over \lambda}) f(y)$ which gives $f(\lambda x + (1-\lambda ) y) = \lambda f(x) + (1-\lambda ) f(y)$.

The same sort of analysis applies for $\lambda <0$ (except we start with $y = sx + (1-s) p$).