Showing Left Side to Right Side.

#1
Let \(\mathbf x\) is a \((p\times 1)\) vector, \(\mathbf\mu_1\) is a \((p\times 1)\) vector, \(\mathbf\mu_2\) is a \((p\times 1)\) vector, and \(\Sigma\) is a \((p\times p)\) matrix.

Now I have to show

\(-\frac{1}{2}(\mathbf x-\mathbf\mu_1)'\Sigma^{-1}(\mathbf x-\mathbf\mu_1)+\frac{1}{2}(\mathbf x-\mathbf\mu_2)'\Sigma^{-1}(\mathbf x-\mathbf\mu_2)\)
\(= (\mathbf\mu_1-\mathbf\mu_2)'\Sigma^{-1}\mathbf x-\frac{1}{2}(\mathbf\mu_1-\mathbf\mu_2)'\Sigma^{-1}(\mathbf\mu_1+\mathbf\mu_2)\)

After few lines I got
\(-\frac{1}{2}(\mathbf x-\mathbf\mu_1)'\Sigma^{-1}(\mathbf x-\mathbf\mu_1)+\frac{1}{2}(\mathbf x-\mathbf\mu_2)'\Sigma^{-1}(\mathbf x-\mathbf\mu_2)\)

\(=\frac{1}{2}\mathbf x'\Sigma^{-1}\mathbf\mu_1 + \frac{1}{2}\mathbf\mu_1' \Sigma^{-1}\mathbf x-\frac{1}{2}\mathbf x'\Sigma^{-1}\mathbf\mu_2 - \frac{1}{2}\mathbf\mu_2' \Sigma^{-1}\mathbf x-\frac{1}{2}\mathbf\mu_1' \Sigma^{-1} \mathbf\mu_1 + \frac{1}{2}\mathbf\mu_2' \Sigma^{-1} \mathbf\mu_2\)

Then I have stumbled to reach the final line

\((\mathbf\mu_1-\mathbf\mu_2)'\Sigma^{-1}\mathbf x-\frac{1}{2}(\mathbf\mu_1-\mathbf\mu_2)'\Sigma^{-1}(\mathbf\mu_1+\mathbf\mu_2).\)