Let's start with the simple motion of moving objects left, right, up, and down on a flat 2D screen. The fancy name for moving objects in these directions is translation. Objects can be translated using both matrix addition and matrix multiplication. If all you plan to do is translate an object, you should definitely use matrix addition, because it is by far faster and easier. However, if you plan to scale and/or rotate your object in the same frame, you have to perform the translation using matrix multiplication instead. Let's tackle the addition method first.

Most people already have an intuitive feel for translation using addition after working with the Cartesian coordinate system. Suppose you had an object at point P(1,2) and you ...

Get Beginning Math and Physics for Game Programmers now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.