I have a $f(\boldsymbol{x}) = \boldsymbol{x}^{\boldsymbol{T}} \boldsymbol{Q} \boldsymbol{x}$.
$\boldsymbol{Q}$ is an $n \times n$ symmetric positive semidefinite matrix. How can I show that $f(\boldsymbol{x})$ is convex on the domain $R^n$?
Attempt: By definition of convex, for any $x,y\in\mathbb R$, we have $$f(\frac{x+y}2)\leq\frac12(f(x)+f(y))$$ Thus it is sufficient to reduce and prove that $$\frac12(x+y)^TQ(x+y)\leq x^TQx+y^TQy\\ x^TQy+y^TQx\leq x^TQx+y^TQy$$ Namely $$(x-y)^TQ(x-y)\geq0$$
At this point I am stuck on how to use positive semi-definite - assuming my logic is sound up to this point.