Every time a game character turns to face a new direction, or a logo on a design tool gets dragged bigger, something underneath is applying a transformation matrix — a small grid of numbers that describes exactly how to move every point in a shape, applied the same way to each point at once.

Scaling is the more intuitive of the two to start with: to make something twice as wide and twice as tall, multiply every point's coordinates by 2. A scaling matrix just packages that instruction — "multiply x by this number, multiply y by that number" — into a small grid so it can be combined with other transformations using the same matrix-multiplication rule covered in this site's "what a matrix actually is" article, instead of writing separate, one-off code for every kind of resize.

Rotation is less obvious but follows the same pattern. Rotating a point around the origin by some angle has a fixed formula involving that angle's sine and cosine — the trigonometry doesn't need to be memorized to get the idea, only trusted as "a formula that computes where a point ends up after spinning by a given angle." A rotation matrix packages that formula the same way a scaling matrix packages "multiply by this number": as a small grid that, once built for a given angle, can be applied to any point to rotate it by exactly that amount.

The genuinely useful part is that these matrices combine. Rotating an object and then scaling it can be done as two separate steps, or the rotation and scaling matrices can be combined into a single matrix first, which then does both at once to every point — this is exactly why a game engine can move, rotate, and resize a complex 3D model made of thousands of points every single frame without recalculating the whole shape by hand: it applies one combined matrix to every point, and the matrix itself already encodes "rotate this much, then scale by this much."

This is also why professional design and 3D tools show rotation and scale as separate handles or fields even though they get applied together — under the hood, each is its own small matrix, computed independently and then combined, exactly the way this article built them up: scaling as one simple recipe, rotation as a second simple recipe, and matrix multiplication as the general-purpose way to chain any number of these recipes into one.

A point, before and after a 90° rotation around the origin
Before: (3, 0)   -- 3 steps right, 0 up
After:  (0, 3)   -- the same point, now 3 steps up instead of right

A 90° rotation matrix applied to (3, 0) always produces (0, 3) — the formula is fixed, so the same matrix rotates every point in a shape the same way.

0-110
A 90° rotation matrix — apply it to any point to rotate that point 90° around the origin.