# Transposed Matrix Properties

Today I derived, geometrically, the following:

(A * B)^{T} = C \\ C = B^{T} * A^{T}
\label{eq1}

Listed on the wikipedia page without much a description (property number 3), this property hid from me for a good 24 hours and confused me. I had been working on creating an optimized implementation to find the closest points between two OBBs. After consulting Ericson’s orange book to make sure my hand derivation would lead to optimized code I realized I was doing an extra matrix multiplication. Ericson’s book doesn’t always lay out all the prerequisite information up front, so sometimes hard work and time is required to derive more exotic mathematic rules and properties.

Given two OBBs with orientations of A and B respectively, it is helpful to represent B in the reference frame of A in order to reduce necessary computations. This gives a new transformation called C and is calculated as:

A^{T} * B = C
\label{eq2}

The next series of tests can be performed in similar fashion by representing A in B’s reference frame. Naively, I tried to perform:

B^{T} * A
\label{eq3}

However, it can be shown that C in \eqref{eq2} transposed is equivalent to \eqref{eq3} given \eqref{eq1}. Geometrically this also makes sense, and is easier to understand if you have some intuition about rotation matrices. Luckily a rotation matrix is in and of itself pretty intuitive. If C brings B to A’s frame, then clearly the reverse mapping would go from A’s frame to B. In matrix land in order to reverse a transformation you also have to reverse the matrix concatenation order.

I found on stack overflow a nice way to imagine this in plain english: if I put on socks and then shoes, to reverse the operation I must first take off my shoes and then take off my socks.

Share