I have this question in my homework and neither I nor my colleagues can solve it.
Show that the set $$C = \{x \in \Bbb R^n \mid x^T Ax \leq b\}$$ where $A$ is symmetric and positive semidefinite and $b \geq 0$, is convex.
I personally find it similar to halfspace and was thinking that maybe somehow proving that this is a halfspace we can prove that it is convex too. Do you have any ideas?
Notice that for any $x,y\in\mathbb{R}^n$ we have $(x-y)^TA(x-y):=\langle A(x-y),x-y\rangle\geqslant 0$ where $\langle \cdot,\cdot\rangle$ is the usual inner product in $\mathbb{R}^n$. Let $\alpha\in (0,1)$ and $z:=\alpha x+(1-\alpha)y$ with $x,y\in C$. We want to show that $z\in C$. Note that $$z^TAz=\langle Az,z\rangle=\langle A(\alpha x+(1-\alpha)y),\alpha x+(1-\alpha)y\rangle\\=\alpha^2\langle Ax,x\rangle+\alpha(1-\alpha)(\langle Ax,y\rangle+ \langle Ay,x\rangle)+(1-\alpha)^2\langle Ay,y\rangle$$ Using the observation above that $\langle A(x-y),x-y\rangle\geqslant 0$ which implies $$\langle Ax,x\rangle+\langle Ay,y\rangle\geqslant \langle Ax,y\rangle+\langle Ay,x\rangle$$ yields $$\alpha^2\langle Ax,x\rangle+\alpha(1-\alpha)(\langle Ax,y\rangle+ \langle Ay,x\rangle)+(1-\alpha)^2\langle Ay,y\rangle\\\leqslant \alpha^2\langle Ax,x\rangle+\alpha(1-\alpha)(\langle Ax,x\rangle+\langle Ay,y\rangle)+(1-\alpha)^2\langle Ay,y\rangle\\\leqslant \alpha^2b+\alpha(1-\alpha)(b+b)+(1-\alpha)^2b\\=(\alpha+(1-\alpha))^2b=b$$ hence $z\in C$.