Matrix quadratic form expansion question

2k Views Asked by At

I'm trying to do a question and within it, I need to expand a matrix quadratic form:

$\frac{1}{2}(\vec{y} - \vec{x})^{T} \Sigma (\vec{y} - \vec{x})$

In my working out, I think that the following is correct:

$$ \begin{align} \frac{1}{2}(\vec{y} - \vec{x})^{T} \Sigma (\vec{y} - \vec{x}) & = \frac{1}{2}(\vec{y}^{T} - \vec{x}^{T}) \Sigma (\vec{y} - \vec{x}) \\ & = \frac{1}{2} \vec{y}^{T}\Sigma\vec{y} - \frac{1}{2} \vec{y}^{T}\Sigma\vec{x} - \frac{1}{2} \vec{x}^{T}\Sigma\vec{y} + \frac{1}{2}\vec{x}^{T}\Sigma\vec{x} \end{align} $$

However, in the answers, it says that the answer is

$\frac{1}{2}(\vec{y} - \vec{x})^{T} \Sigma (\vec{y} - \vec{x}) = \frac{1}{2} \vec{y}^{T}\Sigma\vec{y} - \vec{y}^{T}\Sigma\vec{x} - \vec{x}^{T}\Sigma\vec{y} + \frac{1}{2}\vec{x}^{T}\Sigma\vec{x}$

so the middle two cross product terms do not have a half multiplied to them. Can anyone explain this? Or are the answers wrong?

Thanks in advance!

2

There are 2 best solutions below

2
On BEST ANSWER

Your answer is correct. Also if $\Sigma$ is a symmetric matrix you can simplify the expression as $$\frac{1}{2}(\vec{y} - \vec{x})^{T} \Sigma (\vec{y} - \vec{x}) = \frac{1}{2} \vec{y}^{T}\Sigma\vec{y} - \vec{y}^{T}\Sigma\vec{x} + \frac{1}{2}\vec{x}^{T}\Sigma\vec{x}$$since $$\vec{x}^{T}\Sigma\vec{y}=\vec{y}^{T}\Sigma\vec{x}$$

1
On

Seems to me like the from your Book (?) is wrong and yours is correct.

A good way to do a sanity check for such results is to look at the one-dimensional case. If you then further set $\Sigma = 1$, the expression you are trying to expand is $\frac12(y - x)(y-x) = \frac12(y^2 - 2 x y + x^2) = \frac12 y^2 - \frac12 y x - \frac12 x y + \frac12 x^2$, as you calculated. Note that this is not equal to $\frac12y^2 - 2 x y + \frac12 x^2$ (for example, set $x = y = 1$), the result you Book (?) implies.