Prerequisites
Upto now we have used 3x3 matrices to represent rotations.
If you are not familiar with this subject you may like to look at the following pages first:
Combined Rotation and Translation using multivectors.
also see this message from Fred.
Further Reading
You may be interested in other means to represent orientation and rotational quantities such as: