# Trouble deriving the Harris Corner Detection

I just started studying a small paper about the Harris Corner Detection. The problem is I don't understand how step 7 is derived from step 6. In step 7 the expression is expanded in a way that we get a structure tensor $C$ for $x$ and $y$. If one would multiply the three matrices again, I see that we would end up with 6 again (and that it's correct). However I do not see given step 6 how one can derive step 7.

-

$$\big(a^Tb\big)^2 = \big(a^Tb\big)\big(a^Tb\big) = \big(b^Ta\big)\big(a^Tb\big) = b^T\big(aa^T\big)b.$$
Didn't know this identity: $$\big(a^Tb\big)\big(a^Tb\big) = \big(b^Ta\big)\big(a^Tb\big)$$ thanks! –  Nils Feb 7 '11 at 10:16
@Nils: It's merely the fact that the dot product is commutative: $a^Tb = \sum a_i b_i = b^Ta$. –  Rahul Feb 7 '11 at 10:57