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.$$
One sees this often enough in linear algebra (or at least, certain applications thereof) that the author presumably saw fit to elide this step.