A function is convex and concave, show that it has the form $f(x)=ax+b$ A function is convex and concave, it is called affine function. That is the function:
$$f(tx+(1-t)y)=tf(x)+(1-t)f(y),\, \, t\in (0,1) $$  
Force $y=0$(suppose $0$ is in the domain of $f(x)$), we obtain:
$$f(tx)-f(0)=tf(x)-tf(0)=t[f(x)-f(0)]$$
So 
$$F(x):=f(x)-f(0)$$ is linear, but we have a constraint here: $t\in(0,1)$. 
How can we expand this to arbitrary $t$, and assert it is really linear?
Thanks.

First show it's homogenous. That is, $F(ax) = aF(x)$ for any $a\in\mathbb{R},x\in\mathbb{R}^n$. If $a \in (0,1)$, we have:
$$
F(ax) = F(ax + (1-a)0) = aF(x) + (1-a)F(0)=aF(x)
$$
If $a\ge 1$, he have:
$$
F(x) = F((1/a)ax + (1-1/a)0) = (1/a)F(ax) + (1-1/a)F(0)=F(ax)/a
$$
If $a<0$, we use the above cases combined with the fact that $F(-x)=-F(x)$ since
$$
0 = F(0) = F((1/2)x +(1/2)(-x))=(1/2)F(x)+(1/2)F(-x).
$$
Lastly, to show linearity, we use homogeneity:
$$
\begin{align}
F(x+y) &= F((1/2)(2x) +(1/2)(2y))\\
&= (1/2)F(2x) +(1/2)F(2y)\\
&=(1/2)(2F(x)) +(1/2)(2F(y))\\
&=F(x) +F(y)
\end{align}
$$
