In computer graphics, matrices are used to calculate object transforms such as translation, that is, movement, scaling in the X, Y, and Z axes, and rotation around the X, Y, and Z axes. We will also be changing the position of objects from one coordinate system to an other, which is known as space transforms. We will see how matrices work and how they help to simplify the mathematics we have to use.
Matrices have rows and columns. A matrix with m number of rows and n number of columns is said to be a matrix of size m × n. Each element of a matrix is represented as indices ij, where i specifies the row number and j represents the column number.
So, a matrix, M, of size 3 × 2 is represented as follows:
Here, matrix M has three rows and two columns and each element is represented as m11, m12, and so on until m32, which is the size of the matrix.
In 3D graphics...