Chapter 3. Geometrical Transformations

To understand perspective projection, which we will discuss in Chapter 5, we need to be familiar with 3D rotations. These and other transformations will be discussed in this chapter. They are closely related to matrix multiplication, which is the subject we start with.

MATRIX MULTIPLICATION

A matrix (plural matrices) is a rectangular array of numbers enclosed in brackets (or parentheses). For example,

MATRIX MULTIPLICATION

is a 2 × 4 matrix: it consists of two rows and four columns. If a matrix consists of only one row, we call it a row matrix or row vector. In the same way, we use the term column matrix or column vector for a matrix that has only one column.

If A and B are matrices and the number of columns of A is equal to the number of rows of B, we can compute the matrix product AB. This product is another matrix, which has as many rows as A and as many columns as B. We will discuss this in detail for a particular case with regard to the dimensions of A and B: we will use a 2 × 3 matrix A and a 3 × 4 matrix B. Then the product $C = AB exists and is a 2 × 4 matrix. It will be clear that the matrix product AB can be computed for A and B of other dimensions in a similar way, provided the number of columns of A is equal to the number of rows of B.

Writing

MATRIX MULTIPLICATION

and similar expressions ...

Get Computer Graphics for Java Programmers, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.