# Derivation of a vector equation

I am reading a derivation of conditional multivariate distribution, I have checked many time the following equation, I think it is wrong. $u$ and $v$ are any vectors, and $A$ is symmetric matrix.

The source is from a online webpage: http://fourier.eng.hmc.edu/e161/lectures/gaussianprocess/node7.html $$\begin{eqnarray} &&u^TAu-2u^TAv+v^TAv=u^T Au-u^TAv-u^TAv+v^TAv \nonumber \\ &=&u^TA(u-v)-(u-v)^TAv=u^TA(u-v)-v^TA(u-v) \nonumber \\ &=&(u-v)^TA(u-v)=(v-u)^TA(v-u) \nonumber \end{eqnarray}$$

Would any one confirm me this is wrong?

-
It's correct, the quantity on the far left equals the quantity on the far right of the equalities. Is there any step in particular you don't understand? –  Olivier Bégassat Jul 9 '12 at 21:07
@Olivier Bégassat: Agree. The only non-trivial step is that $xAy = (xAy)^T$ since both LHS and RHS are one-dimensional. –  gt6989b Jul 9 '12 at 23:18
@gt6989b, thank you! This is exactly what I neglected, indeed they are scalars, transpose only change the expression, not the number. –  Flying pig Jul 10 '12 at 5:25