This appendix serves as a cheat sheet for linear algebra. The subject is presented as a set of tools, their properties, and what you can use them for. If you’re interested in the theory behind all this, you can pick up any introductory linear algebra textbook.

The focus here is exclusively on 2D and 3D algebra, as that’s what’s required in this book.


A point represents a position within a coordinate system.

We represent a point as a sequence of numbers between parentheses—for example, (4, 3). We refer to points using capital letters, such as P or Q.

Each of the numbers in the point’s sequence is called a coordinate. The number ...

Get Computer Graphics from Scratch now with O’Reilly online learning.

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