# Quadratic Forms in Non-Linear Optimization

This is a rather trivial question but I am having a great deal of trouble:

Let $f(x) = (1/2)xQx-xb$

and $E(x) = (1/2)(x-x^*)Q(x-x^*)$

then $E(x) = f(x) + (1/2)x^*Qx^*$

where $x,x^*,b$ are vectors and $Q$ is a symmetric positive definite matrix.

Question: Why is this equivalence true?

-
It appears that you have many typos, e.g. it should be $\mathbf{x}^*\mathbf{Q}\mathbf{x}$ instead of $\mathbf{x}\mathbf{Q}\mathbf{x}$ if $\mathbf{x}$ is a column vector. You should indicate the dimensionality of your vectors and whether they are real or complex. Also is $\mathbf{x}^*$ the conjugate transpose of $\mathbf{x}$ or is it another vector? – Lord Soth Apr 12 '13 at 23:44
My mistake, where necessary mentally replace x with x transpose and x* with x* transpose. x* is meant to be a separate vector, the notation due to the fact that in context it is the local minimizer. – user72333 Apr 12 '13 at 23:49

Your notations are very confusing. Presumably your $x^\ast$ just denotes a vector, but not the conjugate transpose of $x$ (which is usually denoted as $x^\ast$ or $x^H$). So, to avoid confusion, I will change your $x^\ast$ into $x_0$. And I assume that $f$ and $E$ are defined as follows: \begin{align*} f(x) &= \frac12x^HQx-x^Hb,\\ E(x) &= \frac12(x-x_0)^HQ(x-x_0). \end{align*} Now the question is why $$E(x) = f(x) + \frac12x_0^HQx_0.\tag{1}$$ The short answer is: no, this is not necessarily true. However, you may note that $$E(x)=\frac12(x-x_0)^HQ(x-x_0)=f(x) + x^Hb - x^HQx_0 + \frac12x_0^HQx_0.$$ So, when $Qx_0=b$, equality holds in $(1)$. The $x_0$ then is the solution to the least-square problem $\min_{u\in\mathbb{R}^n}f(u)$.