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.