CG Optimisation Function I need to prove the following statement:


  Given the unique minimiser $\overline{x}$ of the function $f(x) := \frac{1}{2}&lt;Ax,x&gt; + &lt;b,x&gt; + c$ for some $c \in \mathbb{R}, b \in \mathbb{R}^n$ and a symmetric positive definite matrix $A$. Prove that $f(x) = f(\overline{x}) + \frac{1}{2}\vert\vert x-\overline{x} \vert\vert_A^2$ holds for all $x \in \mathbb{R}^n$


So far I got to this point:
$\begin{align*}
                f(\overline{x}) + \frac{1}{2}\vert\vert{x - \overline{x}}\vert\vert_A^2 &amp;= \frac{1}{2}\overline{x}^TA\overline{x} + \overline{x}^Tb + c + \frac{1}{2}((x-\overline{x})^TA(x-\overline{x})) \\
                &amp;= \frac{1}{2}\overline{x}^TA\overline{x} + \overline{x}^Tb + c + \frac{1}{2}(x^TAx - x^TA\overline{x} - \overline{x}^TAx + \overline{x}^TA\overline{x}) \\
                &amp;= \frac{1}{2}\overline{x}^TA\overline{x} + \overline{x}^Tb + c + \frac{1}{2}x^TAx - x^Tb + \frac{1}{2}\overline{x}^TA\overline{x} \\
                &amp;= \overline{x}^TA\overline{x} + \overline{x}^Tb + c + \frac{1}{2}x^TAx - x^Tb \\
                &amp;= \frac{1}{2}x^TAx - x^Tb + c + 2\overline{x}^Tb
            \end{align*}$

How can I get $&lt;b,x&gt;$ from $2\overline{x}^Tb - x^Tb$?
There is probably an error in your third equality, because you cannot get from $2\overline{x}^Tb - x^Tb$ to $&lt;b,x&gt;$ (since $\overline{x}$ depends on $A$). It goes well until the expression right before that:

$$\overline{x}^TA\overline{x} + \overline{x}^Tb + c + \frac{1}{2}x^TAx - x^TA\overline{x},$$

but I do not see what the next step was that you took. If you plug in the expression for $\overline{x}$ (you can explicitly write the minimizer in terms of $A$ and $b$), you should arrive at the solution.
For the function $f(x) = \frac{1}{2}&lt; Ax,x &gt; + &lt; b,x &gt; + c$ the equality $f(x) = f(\overline{x}) + \frac{1}{2}\vert\vert x - \overline{x}\vert\vert_A^2$ can not hold. It holds only for the function $f(x) = \frac{1}{2} &lt; Ax,x &gt; - &lt; b,x &gt; + c$.