Let’s say that we’re given the standard basis vectors , and we multiply each of these vectors by an arbitrary matrix :
The first row of contains the result of performing a transformation on the vector , the second row is the result of transforming , and the third row to .
Let be some vector expressed under this coordinate space, which means that it can be represented as a linear combination of the basis:
If we multiply this vector by the matrix :
If we let have the form:
Then can be rewritten as:
is a linear combination of the rows of . If we interpret these row vectors as the basis vectors of some coordinate system expressed/measured in terms of an outer coordinate system, then we have successfully created a structure that encodes a space coordinate transformation (from object space to upright space) in the form of a matrix:
Another way to see this is that encodes in its rows a transformation made to the standard basis vectors .
The following notation means the rotation matrix that transforms the frame to the frame and that is represented in the frame :
If the frame is equal to the frame , then it can be omitted since it’s assumed that the matrix is represented in terms of the frame :
For example, the matrix that transforms from object space to upright space is represented as:
Transforming the vector expressed in object space to upright space is then:
Row Versus Column Vectors
A space coordinate transform operation has the form:
Where encodes in its rows a transformation made to the standard basis vectors, and and are row vectors.
Let’s say that we want to transform a row vector by the matrices , , and in that order. The operation is represented as:
However, it could be possible that is instead a column vector. In that case, must also be a column vector. For to have the correct result, we must pre-multiply by the transpose of the transformation matrix, which is equivalent to transposing both sides of the equation:
Note that:
- The transformation matrices , , and encode in their columns a transformation made to the standard basis vectors, i.e., they have the form:
In Dunn & Parberry’s book, a column vector inside a matrix is written as:
Also, note that in this notation, the arrow that connects the frames involved in the transformation is reversed. For example, the transformation matrix that transforms from object space to upright space is:
In computer graphics,
column vectors should be used
to represent points, differences between points, and the like.