Computer Science I / Matrices and Matrix Operations
Practice question · Multiple choice

Graphics libraries compose a rotation and a translation by multiplying their matrices, then apply the single product to every vertex. Why is that faster than applying the two transformations in turn?

Hints
  1. Count the operations for a million vertices under each approach.
  2. Ask how many times the matrix product itself has to be computed.
Show the answer

A. Because the product is computed once and applied to every vertex.

Why

Two transformations applied separately cost two matrix-vector multiplies per vertex, so a million vertices cost two million; composing first costs one small matrix-matrix product, once. That is why the model-view-projection matrix exists. The results are identical because multiplication is composition, what matters is order, which is the source of a great many graphics bugs.

Read the lesson: Matrices and Matrix Operations →

Practise Matrices and Matrix Operations

The app has 4 more questions on this lesson, and keeps your place in the course. Computer Science I is free to start.

More questions on Matrices and Matrix Operations