gr8guy, matrices that preserve certain properties of a set of vectors or points are called affine transformations. Things like, as you say, rotation, scaling, and translating a vector don’t change the colinearity of points (three points in a straight line will remain in a straight line) or the ratios of distances (a point midway between two points will remain midway between the two points). These properties, in turn, lead to angular invariance and so on. (I didn’t get this off the top of my head, I Googled “affine transformation” and reminded myself. I’ll stop with the pedantry and let you, gentle reader, do the same if you’re interested.)
zoid, sorry if I implied otherwise. You’re a few months ahead of me in book-larnin’; I don’t know what that says about my calibre. (Insert Dr. Evil quote here.) Incidentally, if I screwed up any of those affine qualities, I’d be happily corrected.
Here’s something interesting, moejuck: in two dimensions (and therefore with 2x2 matrices), rotation and scaling are represented as multiplications, but translation is represented as addition. In other words, to take the point [x, y] and rotate it about the origin, I can multiply by a rotation matrix as Chronos so ably demonstrated. Similarly, I can multiply by a scaling matrix to change [x, y] to, say, [ax, by]. But to move [x, y] I need to add to it (getting [x+a, y+b]. This is a pain in the butt because for multiplicative transformations, several transforms can be multiplied together to create an overall transform (think, say, a rotation by 90 degrees, a scaling by a, and another rotation by 90 degrees being represented in a single 2x2 matrix). Additive transforms throw a wrench in the plans.
What did the mathematicians do about this? They moved to 3x3 matrices. It turns out that additive transforms can be represented as multiplicative transforms if a dimension is added to the mix. This means that computer graphics, which is generally 3D, uses 4x4 matrices to represent all transformations.
So now we have the general form of R as a 4x4 rotation matrix, T as a 4x4 translation matrix, and S as a 4x4 scaling transformation matrix, and we can transform the point A=[x, y, z, 1] (note the fourth dimension added, always a 1 for reasons I won’t go into here) as we please with:
A’ = T2 * R3 * T1 * S1 * R2 * R1 * A
…or any arbitrary sequence of (affine) transformations, generally premultiplied in the graphics world. (I’ve numbered the transforms “backwards” because the transform closest to the point affects it first.)
If this stuff really interests you, you might even check out a book on computer graphics; many of them go into the matrix transformations used in creating a scene based on individual elements and the rotations, transformations, and scalings that are used to put them where they belong. That’s how I learned all this stuff.