$a)$ Prove that a hyperplane in $\mathbb{R}^n$ is convex. Recall that a hyperplane is a set of the form $\{x\in\mathbb{R}:a^Tx= b\}$ for some vector $a$ and scalar $b$.
$b)$ Prove that a halfspace in $\mathbb{R}^n$ is convex. Recall that a halfspace is a set of the form $\{x\in\mathbb{R}:a^Tx\ge b\}$ for some vector $a$ and scalar $b$.
$a)$
Proof.
Let $S:=\{x\in\mathbb{R}:a^Tx= b\},x_0,x_1\in S$, we have
$$a^Tx_0=a^Tx_1=b$$
$\text{WTS }x_3:=tx_0+(1-t)x_1\in S$ where $t\in[0,1]\cap\mathbb{R}$
Since $a^T$ is a linear tranformation
$$a^T(x_3)=ta^Tx_0+a^Tx_1-ta^Tx_1=b$$
And
$$a^T(x_3)=b\rightarrow x_3\in S$$
Which proves any convex combination of any two points in $S$ is also in $S$ $\tag*{$\square$}$
$\color{lightgrey}{\text{The proof for $b)$ is almost same as $a)$}}$
$b)$
Proof.
Let $S:=\{x\in\mathbb{R}:a^Tx\ge b\},x_0,x_1\in S$, we have
$$a^Tx_0\ge b \wedge a^Tx_1\ge b$$
$\text{WTS }x_3:=tx_0+(1-t)x_1\in S$ where $t\in[0,1]\cap\mathbb{R}$
Since $a^T$ is a linear tranformation
$$a^T(x_3)=ta^Tx_0+a^Tx_1-ta^Tx_1\ge b$$
And
$$a^T(x_3)\ge b\rightarrow x_3\in S$$
Which proves any convex combination of any two points in $S$ is also in $S$ $\tag*{$\square$}$
Is my proofs correct, any suggestion would be appreciated.