# Convexity of affine function.

Can someone help me with a proof that affine function preserves convexity?

Given that $f$ is convex, $A$ is in $\mathbb{R}^{M\times N}$ and $b$ is in $\mathbb{R}^m$ then show that $g(x) = f(Ax+b)$ is convex as well?

Have you tried anything yet? Any starting Idea? We are not here to do your homework, but help you out. I have yet to do this proof, however I guess it can be done by simply using the definitions of convexity and using that $Ax+b$ is a affine transformation. –  CBenni Jan 29 '13 at 8:52
Let me add a hint: The function $g(x)=Ax+b$ satisfies $g(tx+(1-t)y)=tg(x)+(1-t)g(y)$ for all $t\in\mathbb{R}$ and $x$, $y\in\mathbb{R}^n$. This is the standard definition of affinity, in fact. –  Harald Hanche-Olsen Jan 29 '13 at 10:19