How do I prove $\{ x : Ax=b \}$ is convex?

5.3k Views Asked by At

I have a constraint $Ax=b$, where $A$ is $m\times n$, b is $m\times1$. I am wondering how should I prove that $\{ x \in \mathbb{R}^n \mid Ax=b \}$ is convex.

Attempt:

$\{x \in \mathbb{R}^n \mid Ax=b\}$ is convex because:

$Ax_1=b, Ax_2=b \; \Rightarrow \; A(tx_1 +(1−t)x_2) = tAx_1 +(1−t)Ax_2 = (t+1−t)b = b$.