As with 2D transforms, any 3D transformation matrix can be decomposed using SVD into a rotation, scale, and another rotation.
Any symmetric 3D matrix has an eigenvalue decomposition into rotation, scale, and inverse-rotation.
Finally, a 3D rotation can be decomposed into a product of 3D shear matrices.
Rotate about z-axis:
Rotate about x-axis:
Rotate about y-axis:
The inverse of an orthogonal matrix is awalys its transpose.
So if there is a rotate matrice of 3D object, .
For example,
Then we have:
So we get:
Here is a way to scale object along the direction (1, 1, 0). Rotate the vector(1, 1, 0) to the standard asix firstly, scale it along Y axis and rotate it back finally.
The whole process can be written .
is equivalent to in this scene.