2
$\begingroup$

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!

$\endgroup$
1
  • $\begingroup$ It looks like whoever wrote that answer had in mind combining the cross terms, which one can do when $\Sigma$ is symmetric, but wrote something else. $\endgroup$
    – amd
    Jan 8, 2019 at 19:35

2 Answers 2

2
$\begingroup$

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}$$

$\endgroup$
2
  • $\begingroup$ Okay thank you! I was just wanting to double check. I was so confused for a while $\endgroup$ Jan 8, 2019 at 18:20
  • $\begingroup$ Good luck!..... $\endgroup$ Jan 8, 2019 at 18:26
1
$\begingroup$

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.

$\endgroup$
1
  • $\begingroup$ Thanks for the reply! This is really helpful $\endgroup$ Jan 8, 2019 at 18:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.