# Need help with expanding $(\bf{x-\mu_{i}})^{t}\Sigma^{-1}(\bf{x-\mu_{i}})$

## Homework Statement

I need help with expanding:

$(\bf{x-\mu_{i}})^{t}\Sigma^{-1}(\bf{x-\mu_{i}})$

$\bf{x,\mu_{i}}$ are column vectors.
$\Sigma$ is a square matrix.

Thank you.

## Homework Equations

Can:

$\bf{x}^t\Sigma^{-1}\bf{\mu_{i}}$

be written as?

$\bf{\mu_{i}}^t\Sigma^{-1}\bf{x}$

I've tried to compute this numerically and the answer is no.

## The Attempt at a Solution

$(\bf{x-\mu_{i}})^{t}\Sigma^{-1}(\bf{x-\mu_{i}}) = \bf{x}^t\Sigma^{-1}\bf{x}+ \bf{\mu_{i}}^t\Sigma^{-1}\bf{\mu_{i}}- \bf{x}^t\Sigma^{-1}\bf{\mu_{i}}- \bf{\mu_{i}}^t\Sigma^{-1}\bf{x}$

## The Attempt at a Solution

Related Precalculus Mathematics Homework Help News on Phys.org
Ray Vickson
Homework Helper
Dearly Missed

## Homework Statement

I need help with expanding:

$(\bf{x-\mu_{i}})^{t}\Sigma^{-1}(\bf{x-\mu_{i}})$

$\bf{x,\mu_{i}}$ are column vectors.
$\Sigma$ is a square matrix.

Thank you.

## Homework Equations

Can:

$\bf{x}^t\Sigma^{-1}\bf{\mu_{i}}$

be written as?

$\bf{\mu_{i}}^t\Sigma^{-1}\bf{x}$

I've tried to compute this numerically and the answer is no.

## The Attempt at a Solution

$(\bf{x-\mu_{i}})^{t}\Sigma^{-1}(\bf{x-\mu_{i}}) = \bf{x}^t\Sigma^{-1}\bf{x}+ \bf{\mu_{i}}^t\Sigma^{-1}\bf{\mu_{i}}- \bf{x}^t\Sigma^{-1}\bf{\mu_{i}}- \bf{\mu_{i}}^t\Sigma^{-1}\bf{x}$

## The Attempt at a Solution

I don't understand your problem. The result in (3) is correct. If *you* derived that result, then you have obtained the desired result. On the other hand, if you mean that somebody else has given you the result in (3) and you don't know how they got it, that is a different question. So, what, exactly are you asking?

RGV

Mark44
Mentor

BTW, $\Sigma$ is a horrible name for a matrix for the reason that it is used primarily to mean summation.

Ray Vickson
Homework Helper
Dearly Missed

BTW, $\Sigma$ is a horrible name for a matrix for the reason that it is used primarily to mean summation.
I agree with you. Nevertheless, it is often used in Statistics and Econometrics, etc., to denote the variance-covariance matrix of a multidimensional random variable.

RGV

Homework Helper

## Homework Statement

Can:

$\bf{x}^t\Sigma^{-1}\bf{\mu_{i}}$

be written as?

$\bf{\mu_{i}}^t\Sigma^{-1}\bf{x}$

I've tried to compute this numerically and the answer is no.
The answer is yes IF the matrix $$\Sigma$$ is symmetric. Since
$$\bf{\mu_i}^t \Sigma^{-1} \bf{x}$$

is a scalar, it equals its transpose, so
$$\bf{\mu_i}^t \Sigma^{-1} \bf{x} = \left(\bf{\mu_i}^t \Sigma^{-1} \bf{x}\right)^t = \bf{x}^t \Sigma^{-1} \bf{\mu_i}$$

Did the example you used have sigma symmetric? (If it is a variance-covariance matrix, it has to be symmetric).

Ray Vickson
Homework Helper
Dearly Missed

The way (3) is written, it is valid even if the matrix is not symmetric: the terms x^T A m and m^T A x are written separately.

RGV

Hi all, thanks for the replies. The goal was to get:

$(\bf{x-\mu_{i}})^{t}\Sigma^{-1}(\bf{x-\mu_{i}}) = \bf{x}^t\Sigma^{-1}\bf{x}+ \bf{\mu_{i}}^t\Sigma^{-1}\bf{\mu_{i}}- 2\bf{x}^t\Sigma^{-1}\bf{\mu_{i}}$

Hence,
$\bf{\mu_i}^t \Sigma^{-1} \bf{x} = \bf{x}^t \Sigma^{-1} \bf{\mu_i}$

Was what I needed. Thanks.

Thanks for the help. I wrote the long proof.

If $m_{12}=m_{21}, m_{13}=m_{31},m_{32}=m_{23},$

$\bf{x} = \left[ \begin{array}{ccc} x_1 \\ x_2 \\ x_3 \end{array} \right]$

$\bf{y} = \left[ \begin{array}{ccc} y_1 \\ y_2 \\ y_3 \end{array} \right]$

$\bf{M} = \left[ \begin{array}{ccc} m_{11} & m_{12} & m_{13} \\ m_{21} & m_{22} & m_{23} \\ m_{31} & m_{32} & m_{33} \end{array} \right]$

then

$\bf{y^tMx}=$
$\begin{array}{ccc} x_1y_1m_{11}+ (x_1y_2+x_2y_1)m_{12}+ (x_1y_3 + x_3y_1)m_{13}+ x_2y_2m_{22}+ (x_2y_3 + x_3y_2)m_{23}+ x_3y_3m_{33} \end{array}$

$\bf{x^tMy}=$
$\begin{array}{ccc} \begin{array}{ccc} (x_1m_{11}+x_2m_{21}+x_3m_{31})y_1 + (x_1m_{12}+x_2m_{22}+x_3m_{32})y_2 + (x_1m_{13}+x_2m_{23}+x_3m_{33})y_3 \end{array} \\= \begin{array}{ccc} x_1y_1m_{11}+ (x_2y_1+ x_1y_2)m_{12}+ (x_3y_1+ x_1y_3)m_{13}+ x_2y_2m_{22}+ (x_3y_2+ x_2y_3)m_{23}+ x_3y_3m_{33} \end{array} \end{array}$
$=\bf{y^tMx}$

Last edited: