The 4x4 identity matrix has zeros everywhere except along its diagonal wherein lies ones. As a review, computer graphics typically pre multiplies a 4x1 column matrix which represents a point, by the 4x4 transformation matrix to produce a transformed 1x4 matrix. Except when doing perspective transformation, the fourth element of the column point vector is unity and the first three elements are the x, y and z coordinates of the point. The translation matrix has x, y, and z translation values as the first three values of the fourth column. Non-uniform scale is the identity matrix with Sx, Sy, and Sz as the first three elements along the diagonal.
Shearing is merely a rotation followed by a non-uniform scale.
Alternatively, a 3x3 rotation matrix and a translation vector can be used to control the object to world space transformation. In some books, row point matrices are postmultiplied by 4x4 transformation matrices which is the transpose of the 4x4 matric described above. Each point produced by the Perspective Matrix multiplication has a non-unit fourth component which represents the perspective transform. When doing animation, an object's points will have to be iteratively transformed over time. However, incremental transformation of world-space points usually leads to the accumulation of roundoff errors.