If $C\subset\mathbb{R}^m$ is a convex set, $A$ is an $m\times n$-matrix and $b\in\mathbb{R}^m$, how do I prove that the set $S=\{x\in\mathbb{R}^m|Ax+b\in C\}$ is convex?
I know that the definition of convexity is that all combinations $\lambda x+(1-\lambda)y$ (with $\lambda\in[0,1]$) is in $S$ for pairs $x,y\in S$, but I don't see how to prove this for my $S$.
It's actually pretty simple. Suppose we have two points $x_1,x_2\in S$, and define $$y_1=Ax_1+b, \quad y_2=Ax_2+b.$$ According to the definition of $S$, it must be the case that $y_1,y_2\in S$.
Now consider the convex combination $x_3 = \lambda x_1 + (1-\lambda) x_2$, $\lambda\in[0,1]$, and define $y_3=Ax_3+b$. Then $$\begin{aligned} y_3 = Ax_3+b &= A(\lambda x_1 + (1-\lambda) x_2) + b \\ &= \lambda A x_1 + (1-\lambda) A x_2 + (\lambda + (1-\lambda)) b \\ &= \lambda ( A x_1 + b ) + (1-\lambda) ( A x_2 + b ) \\ &= \lambda y_1 + (1-\lambda) y_2. \end{aligned}$$ Since $y_3$ is a convex combination of $y_1,y_2$, it is the case that $y_3\in C$, and therefore $x_3\in S$.