0

If $a,b\in \mathbb R$ are constants, $x \in \mathbb R$ is the unknown variable, then I know how to perform a perfect square: $ax^2+bx=a(x^2+\frac{bx}{a}+\frac{b^2}{4a^2})-\frac{b^2}{4a}=a(x+\frac{b}{2a})^2-\frac{b^2}{4a}$.

Now my question is what if $a,b$ are $n\times n$ constant matrices and $x \in \mathbb R^n$ is a $n\times 1$ unknown vector, $c$ is a constant vector?

How to perform a perfect square for $xAx^{T}+xBc$? Can we get something like $A(x-*)^2 -B*$?

Topoguy
  • 549

1 Answers1

2

If $A$ is a symmetric matrix, we have $$ x^TAx + b^Tx = \left(x + \frac 12 A^{-1}b\right)^TA\left(x + \frac 12 A^{-1}b\right) - \frac 14 b^TA^{-1}b. $$ If $A$ is not a symmetric matrix, note that $x^TAx = x^TSx$, where $S = \frac 12 (A + A^T)$, and apply the above to the expression $x^TSx + b^Tx.$

Ben Grossmann
  • 225,327