What I'm failing to understand is how do matrices relate to 3D graphics. What is a matrix representing? I think I get the idea of a vertex, as that can be used to represent a point on a shape, like a 3d model.
Suppose figuring out where a world point (in a game map, for example) should show up on screen (in pixels) looked like a bit like this function call sequence (this is simplified):
screenPoint = perspective(move(rotate(move(worldPoint))))
Think of a camera moving around the world; in virtual reality, this is exactly equivalent to the camera staying put and the world moving around instead. That's more or less how 3D graphics works. You have a virtual box that logically lives behind your screen, with the same x and y coordinates as your screen resolution, and z coordinates handled by a Z buffer that's used to determine what overlaps what. A big chunk of the matrix work is about moving, rotating and squishing the whole virtual world until the bit you want to look at fits into the virtual box that lives behind the screen.Each function (perspective, move (aka translate), rotate, scale, etc.) can be expressed in the form of multiplication by a matrix. See [1], for example. That turns it into something like this:
screenPoint = perspectiveMatrix * moveMatrix * rotateMatrix * moveMatrix * worldPoint
But because matrix multiplication is associative, we can calculate a single matrix to do all the work: transformMatrix = perspectiveMatrix * moveMatrix * rotateMatrix * moveMatrix
screenPoint = transformMatrix * worldPoint
And this is much more efficient because there's fewer calculations that need to be performed per point.