<s>[INST] Can you prove this equality? In their book An Introduction to Optimization, on the chapter on gradient algorithms, to prepare for discussing convergence properties of the descent methods, authors Chong and Zak have following:

$f(x) = \frac{1}{2}x^TQx-b^Tx$, where $Q$ is symmetric and $Q>0$.
...
$V(x)=f(x)+\frac{1}{2}(x^*)^TQx^*=\frac{1}{2}(x-x^*)^T Q (x-x^*)$, where $x^*$ is the solution point obtained by solving $Qx=b$, that is, $x^*=Q^{-1}b$

I could not follow the equation $f(x)+\frac{1}{2}(x^*)^TQx^*=\frac{1}{2}(x-x^*)^T Q (x-x^*)$.  Can you prove it?
 [/INST] \begin{align}
V(x)=&f(x)+\frac{1}{2}(x^*)^TQx^* \\
=&\frac12 x^TQx-b^Tx+ \frac{1}{2}(x^*)^TQx^* \\
=&\frac12 x^TQx-(Qx^*)^Tx+ \frac{1}{2}(x^*)^TQx^* \\
=&\frac12 x^TQx-(x^*)^TQx+ \frac{1}{2}(x^*)^TQx^* \quad(\because Q^T=Q)\\
=&\frac12 x^TQx-\frac12(x^*)^TQx-\frac12(x^*)^TQx+ \frac{1}{2}(x^*)^TQx^*\\
=&\frac12 x^TQx-\frac12x^TQx^*-\frac12(x^*)^TQx+ \frac{1}{2}(x^*)^TQx^* \quad(\because Q^T=Q)\\
=& \frac{1}{2}x^T Q (x-x^*) - \frac{1}{2}(x^*)^T Q (x-x^*) \\
=&\frac{1}{2}(x-x^*)^T Q (x-x^*)
\end{align}
</s>