Sum of two quadratic forms

7.2k Views Asked by At

Suppose I have two quadratic forms $Q_i(x)=(x-a_i)^T A_i(x-a_i)+c_i$, $i=1,2$ where $x,a_i \in \Bbb{R}^n$ and $A_i$ are positive-definite $n\times n$ matrices.

Then $Q(x)=Q_1(x)+Q_2(x)$ is also a quadratic form, $Q(x)=(x-a)^T A(x-a)+c$, with $A=A_1+A_2$ (easy to see by considering just the quadratic terms).

How do I find $a$ and, especially, $c$?

2

There are 2 best solutions below

4
On

$\min_x Q(x)=a$ so, taking the derivative, $$2A_1(a-a_1)+2A_2(a-a_2)=0$$ and

$$a=(A_1+A_2)^{-1}(A_1a_1+A_2a_2)$$

thus

$$c=Q(a)=Q_1(a)+Q_2(a)$$

0
On

We have $$Q_i(x) = x^T A_i x - a_i^T(A_i+A_i^T)x + a_i^T A_i a_i + c_i$$ \begin{align} Q_1(x) + Q_2(x) & = x^T(A_1 + A_2)x - (a_1^T(A_1+A_1^T) + a_2^T(A_2+A_2^T))x\\ & + a_1^T A_1 a_1 + c_1 + a_2^T A_2 a_2 + c_2\\ & = (x-a)^TA(x-a) + c = x^TAx - a^T(A+A^T)x + a^T A a + c \end{align} Comparing coefficients we get \begin{align} A & = A_1 + A_2 \tag{$\star$}\\ a & = (A_1+A_1^T+A_2+A_2^T)^{-1}(a_1^T(A_1+A_1^T) + a_2^T(A_2+A_2^T)) \tag{$\perp$}\\ c & = a_1^T A_1 a_1 + c_1 + a_2^T A_2 a_2 + c_2 - a^T(A_1+A_2)a \tag{$\dagger$}\\ \end{align} where the $a$ in dagger is given by $\perp$.