Introduction:
This tutorial goes over the the different transformation matrices used in 3D graphics. Most of the time we use 4x4 matrices for 3D graphics because some transformation matrices require 4 columns, and to compose all the transformations into a single matrix using matrix multiplication, 4x4 matrices are required. Composing transformation matrices into a single matrix and then applying that matrix to all vertices is much more efficient than repeatedly multiplying matrices unnecessarily.

Transformation Matrices:
Translation matrix:
Translation matrices are used to move vectors around. A translation matrix has the form:
[ 1 0 0 Tx 0 1 0 Ty 0 0 1 Tz 0 0 0 1 ]

When applied to a vector, this has the following effect:
[ 1 0 0 Tx 0 1 0 Ty 0 0 1 Tz 0 0 0 1 ] [ Vx Vy Vz 1 ] = [ Vx + Tx Vy + Ty Vz + Tz 1 ]

Scaling matrix:
Scaling matrices are used to change the sizes of vectors. A scaling matrix has the form:
[ Sx 0 0 0 0 Sy 0 0 0 0 Sz 0 0 0 0 1 ]

When applied to a vector, this has the following effect:
[ Sx 0 0 0 0 Sy 0 0 0 0 Sz 0 0 0 0 1 ] [ Vx Vy Vz 1 ] = [ SxVx SyVy SzVz 1 ]
Rotation matrix:
Rotation matrices are used to rotate vectors. In two dimensions, the following matrix can be used to rotate objects:
[ cos(θ) sin(θ) sin(θ) cos(θ) ]

In 3D, rotation matrices can be created using Euler angles, which rotate on the seperate x, y, and z. The problem with Euler angles is that it can create unexpected rotations (gimbal lock) if the programmer is not careful. Quaternions are a more efficient way to create rotations and generate rotation matrices, and are explained more HERE.

Sources: