In a book I am reading is the following exercise:
Let $f(x) = \frac{1}{2}x^TQx+c^Tx+\gamma$ with $Q \in \mathbb{R}^{n \times n}$ symmetric and positive definite and $c \in \mathbb{R}^n$ and $\gamma \in \mathbb{R}$. Let further $x^*$ be the global minimum of $f$. Then holds:
$$\frac{1}{2}(x-x^*)^TQ(x-x^*) = f(x) - f(x^*)$$
for all $x \in \mathbb{R}^n$.
I tried to simply multiply the left side and compare it to the right one, but it did not work out:
$$\frac{1}{2}(x-x^*)^TQ(x-x^*) = f(x) - f(x^*)$$
$$\Longleftrightarrow \frac{1}{2}x^TQx-\frac{1}{2}x^TQx^*-\frac{1}{2}x^{*^T}Qx+\frac{1}{2}x^{*^T}Qx^* = \frac{1}{2}x^TQx + c^Tx- \frac{1}{2}x^{*^T}Qx^{*} - c^Tx^*$$ $$\Longleftrightarrow -\frac{1}{2}x^TQx^*-\frac{1}{2}x^{*^T}Qx+\frac{1}{2}x^{*^T}Qx^* = c^Tx- \frac{1}{2}x^{*^T}Qx^{*} - c^Tx^*$$ $$\Longleftrightarrow -\frac{1}{2}x^TQx^*-\frac{1}{2}x^{*^T}Qx+x^{*^T}Qx^* = c^Tx-c^Tx^*$$
I think we might need to use that $Q$ is symmetric and positive definite. Could you give me a hint?
Hint:
You might want to use the property that $x^*$ satisfies $Qx^*+c=0$ and also use the trick that we can add and subtract the same constant.
Edit:
\begin{align} &\frac12 x^TQx-\frac12 x^{*T}Qx-\frac12 x^{*T}Qx+\frac12x^{*T}Qx^*\\ &=\frac12x^TQx+c^Tx+\frac12x^{*T}Qx^* \\ &=\frac12x^TQx+c^Tx-\frac12x^{*T}Qx^*+x^{*T}Qx^* \\ &=\frac12x^TQx+c^Tx-\frac12x^{*T}Qx^*-c^Tx^* \\ \end{align}