Let’s say that we’re given the standard basis vectors i=[1,0,0],;j=[0,1,0],;k=[0,0,1], and we multiply each of these vectors by an arbitrary matrix M:

 iM=[100][m11m12m13m21m22m23m31m32m33]=[m11m12m13]  jM=[010][m11m12m13m21m22m23m31m32m33]=[m21m22m23]  kM=[001][m11m12m13m21m22m23m31m32m33]=[m31m32m33] 

The first row of M contains the result of performing a transformation on the vector i, the second row is the result of transforming j, and the third row to k.

Let v be some vector expressed under this coordinate space, which means that it can be represented as a linear combination of the basis:

v=vxi+vyj+vzk

If we multiply this vector by the matrix M:

v=vM=(vxi+vyj+vzk)M=vx(iM)+vy(jM)+vz(kM)(1)=vx[m11m12m13]+vy[m21m22m23]+vz[m31m32m33]

If we let M have the form:

M=[pqr]

Then (1) can be rewritten as:

v=vM=vxp+vyq+vzr

vM is a linear combination of the rows of M. 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:

v=vM=[vxvyvz][pqr]=vxp+vyq+vzr

Another way to see this is that M encodes in its rows a transformation made to the standard basis vectors i,j,k.

The following notation means the rotation matrix that transforms the frame a to the frame b and that is represented in the frame c:

cMab

If the frame c is equal to the frame b, then it can be omitted since it’s assumed that the matrix is represented in terms of the frame b:

Mab

For example, the matrix that transforms from object space to upright space is represented as:

Mobjectupright

Transforming the vector vobject expressed in object space to upright space is then:

vupright=vobjectMobjectupright

Row Versus Column Vectors

A space coordinate transform operation has the form:

v=vM

Where M encodes in its rows a transformation made to the standard basis vectors, and v and v are row vectors.

Let’s say that we want to transform a row vector by the matrices A, B, and C in that order. The operation is represented as:

v=vABC

However, it could be possible that v is instead a column vector. In that case, v must also be a column vector. For v to have the correct result, we must pre-multiply v by the transpose of the transformation matrix, which is equivalent to transposing both sides of the equation:

v=vABCvT=(vABC)Ttransposing both sidesvT=CTBTATvTbecause of the matrix transpose properties

Note that:

  • The transformation matrices AT, BT, and CT encode in their columns a transformation made to the standard basis vectors, i.e., they have the form:
M=[p3×1q3×1r3×1]where p=[pxpypz]q=[qxqyqz] and r=[rxryrz]

In Dunn & Parberry’s book, a column vector inside a matrix is written as:

M=[p||q||r||]

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:

Muprightobject

In computer graphics, column vectors should be used to represent points, differences between points, and the like.