What does it *mean* to scale in an arbitrary direction? My graphics text explains rotating along the cardinal axes, then generalizes the math to show how to make a rotation matrix for rotating around an arbitrary vector. That all makes sense and I can both follow the math and picture the operations.

Then the text discusses scaling uniformly and in cardinal directions. Again I can follow everything. But then it goes through the math for "scaling in an arbitrary direction", and although I can follow the vector operations I don't understand what scaling in a non cardinal direction even means. I can start with an object rotated "right side up", and then imagine it getting wider/taller/deeper, but I don't understand what it would mean to scale it in an arbitrary direction.

My first thought was they must just mean scaling each cardinal direction by a different amount, but that can't be right because they don't end up with a diagonal matrix (take the identity matrix, change the first row 1 to 5 and the second row 1 to 3, and now you have a matrix that scales x by 5 and y by 3). Their 2D general scaling matrix is below.
When you scale along the X-axis, the X-coordinate (parallel to the axis) gets stretched, while the Y-coordinate (perpendicular to the axis) remains the same. You can think of scaling along an arbitrary axis as stretching along some diagonal.

Here's a pic of a square being scaled along the main diagonal (the axis pointing to &lt;1, 1> ) by factors of 2 and 0.5.



You can see that the distance along the axis (green line) gets scaled while the perpendicular distance (red line) stays the same.

Mathematically, this is the same as rotating until your chosen axis lies along the X-axis, scaling by X, then rotating back again.