Suppose that $f(x) = x^{T}Qx$ where $Q$ is an $n \times n$ symmetric positive semidefinite matrix. Show that $f(x)$ is convex on the domain $\mathbb{R}^{n}$.
(Hint: It may be wise to prove the following equivalent property: $f(y + \alpha(x-y) ) - \alpha f(x) - (1-\alpha) f(y) \leq 0 $, for all $\alpha \in [0,1]$ and $x,y \in \mathbb{R}^{n}$).
What I have is the following:
$f(y + \alpha(x-y) ) = (y + \alpha(x-y))^{T}Q(y + \alpha(x-y)) = (y + \alpha(x-y))^{T}(Qy + \alpha Q(x-y).$
I am not sure what to do from here. Can someone give me some more hints on how to solve this?
Thank you very much!!!
Note that $(y+\alpha(x-y))'Q(y+\alpha(x-y)=(y(1-\alpha)+\alpha x)'Q(y(1-\alpha)+\alpha x)=(1-\alpha)^2y'Qy+\alpha^{2}x'Qx+2\alpha(1-\alpha)x'Qy$.
Hence $$\begin{aligned} &(y+\alpha(x-y))'Q(y+\alpha(x-y)-\alpha x'Qx-(1-\alpha)y'Qy=\\ &=y'Qy\cdot(1-\alpha)(-\alpha)+x'Qx\cdot\alpha(\alpha-1)+2x'Qy\cdot\alpha(1-\alpha)\\ &=-\alpha(1-\alpha)(y'Qy+x'Qx-2x'Qy)=-\alpha(1-\alpha)(x-y)'Q(x-y)\leq0. \end{aligned}$$