IB Math AI HL Affine Transformations — Complete Cheatsheet
Every plane-transformation skill for IB Mathematics Applications & Interpretation HL — the reflection, rotation, enlargement and stretch matrices, transforming a point or a whole shape, the determinant as area scale factor, composing transformations and the full affine map. Hand-built by an IBO-certified Singapore tutor, with a print-ready PDF to download.
Affine transformations turn geometry into arithmetic in IB Mathematics Applications & Interpretation HL. AI treats a transformation less as an abstract map and more as a modelling tool: one $2\times2$ matrix rotates, reflects, enlarges or stretches an entire shape at once — which is exactly what computer graphics, animation and robotics do to every sprite, photo and joint on the screen. Because a calculator is always allowed, the marks live in choosing the right matrix and reading the GDC's output correctly — not in grinding the multiplication by hand.
This cheatsheet condenses the whole of AHL 3.9 — the standard transformation matrices, transforming a point or a whole shape, the determinant as area scale factor, composing transformations (order matters), inverses and the full affine map $x'=Mx+b$ — onto one page, and flags the traps that quietly cost method marks. The print-ready PDF is at the bottom, free to download.
§1 — Transformations as 2×2 matrices AHL 3.9
A linear transformation of the plane sends each point to a new point by one fixed rule, carried out by multiplying the point's position vector by a single $2\times2$ matrix $M$.
Row × column:the new $x$ uses the top row, the new $y$ the bottom row — never entry-by-entry
Reading $M$:column 1 is the image of $\begin{pmatrix}1\\0\end{pmatrix}$, column 2 the image of $\begin{pmatrix}0\\1\end{pmatrix}$
TrapMultiply the rows of the matrix against the column vector, not the columns. Silently transposing $M$ is the classic slip that produces the wrong image.
NoteEvery $2\times2$ matrix fixes the origin ($M\mathbf{0}=\mathbf{0}$), so these are rotations, reflections, enlargements or stretches about $O$. A translation is the one map that is not a matrix multiplication — that is the affine $+\,b$ term in §9.
§2 — Enlargements & stretches AHL 3.9
Scaling maps stretch the plane along the axes. They are diagonal matrices, so their action — and their determinant — is easy to read off.
Enlargement:centre $O$, factor $k$: $\begin{pmatrix}k&0\\0&k\end{pmatrix}$ — multiplies both coordinates by $k$
TrickFor an enlargement just multiply both coordinates by $k$. A negative $k$ also sends the point straight through $O$ — a $180^\circ$ turn as well as a scale.
NoteAn enlargement of factor $k$ scales area by $k^2$, not $k$, because it stretches in both directions at once ($\det=k\cdot k=k^2$).
§3 — Reflections in the axes & y = x AHL 3.9
A reflection flips the plane in a mirror line through the origin. Only the coordinate measured across the mirror changes sign.
Mirror line
Coordinate map
Matrix
$x$-axis
$(x,y)\mapsto(x,-y)$
$\begin{pmatrix}1&0\\0&-1\end{pmatrix}$
$y$-axis
$(x,y)\mapsto(-x,y)$
$\begin{pmatrix}-1&0\\0&1\end{pmatrix}$
$y=x$
$(x,y)\mapsto(y,x)$
$\begin{pmatrix}0&1\\1&0\end{pmatrix}$
$y=-x$
$(x,y)\mapsto(-y,-x)$
$\begin{pmatrix}0&-1\\-1&0\end{pmatrix}$
TrickFor $y=x$ you simply swap the two coordinates; for $y=-x$ swap and negate both. For the axes, only the coordinate across the mirror flips sign.
NoteEvery reflection has $\det=-1$: area is unchanged, but the orientation is reversed (a shape and its mirror image have opposite "handedness").
§4 — Rotations about the origin AHL 3.9
An anticlockwise rotation through angle $\theta$ about $O$ has one master matrix; the quarter-turns are just special cases worth memorising.
Any angle $\theta$:$R_\theta=\begin{pmatrix}\cos\theta&-\sin\theta\\\sin\theta&\cos\theta\end{pmatrix}$ (anticlockwise; use $-\theta$ for clockwise)
Angle (anticlockwise)
Coordinate map
Matrix
$90^\circ$
$(x,y)\mapsto(-y,x)$
$\begin{pmatrix}0&-1\\1&0\end{pmatrix}$
$180^\circ$
$(x,y)\mapsto(-x,-y)$
$\begin{pmatrix}-1&0\\0&-1\end{pmatrix}$
$270^\circ$
$(x,y)\mapsto(y,-x)$
$\begin{pmatrix}0&1\\-1&0\end{pmatrix}$
TrickTrack where $(1,0)$ lands to check your direction and signs: $R_\theta$ sends it to $(\cos\theta,\sin\theta)$, the first column. For $90^\circ$ that is $(0,1)$ — straight up, i.e. anticlockwise.
TrapKeep full GDC accuracy for $\cos\theta$ and $\sin\theta$ right to the end, then round once. Rounding $\theta$ or the entries early snowballs into a visibly wrong image.
§5 — Transforming a whole shape AHL 3.9
To transform a polygon, apply $M$ to every vertex. Stack the vertices as the columns of one matrix and multiply once — the GDC returns all the image vertices together.
All vertices at once:$M\begin{pmatrix}x_1&x_2&x_3\\y_1&y_2&y_3\end{pmatrix}=\begin{pmatrix}x_1'&x_2'&x_3'\\y_1'&y_2'&y_3'\end{pmatrix}$
A triangle reflected in the $y$-axis (the mirror): each vertex $(x,y)\mapsto(-x,y)$. Transform the vertices, then join them up in the same order.
TrickPut every vertex in one $2\times n$ matrix and hit multiply once on the GDC, rather than transforming points one at a time — faster and far less error-prone.
TrapThe origin maps to itself under any $2\times2$ matrix, so a vertex at $O$ stays put. If the shape is supposed to move away from $O$, you need a translation (§9), not just a matrix.
§6 — Area scale factor = |det M| AHL 3.9
The determinant of the transformation matrix is exactly the factor by which every area is multiplied.
Determinant:$\det M=ad-bc$ for $M=\begin{pmatrix}a&b\\c&d\end{pmatrix}$
TrapUse $ad-bc$, never $ad+bc$, and take the modulus: a negative determinant still enlarges area — the sign only tells you the orientation has flipped.
NoteIf $\det M=0$ the matrix squashes every shape flat onto a line (area $0$). It is then singular — there is no inverse and the transformation cannot be undone.
§7 — Composing transformations — order matters AHL 3.9
Doing one transformation and then another is a single transformation, given by the product of their matrices. The catch is the order.
Compose:"$P$ then $Q$" is the matrix $QP$ — the second transformation sits on the left
Area of a composite:$\det(QP)=\det Q\,\det P$, so the separate area factors multiply
Trap"First $P$ then $Q$" reads left-to-right in words but is right-to-left in symbols: $C=QP$. Because $QP\ne PQ$ in general, reversing the product gives a different — wrong — image.
NoteMultiply the separate area factors: an enlargement of factor $k$ contributes $k^2$, a reflection $|{-1}|=1$, a rotation $1$. So a rotate-then-enlarge composition scales area by $k^2$, and the rotation makes no difference to the area.
§8 — Inverses & invariant lines AHL 3.9
To reverse a transformation, apply the inverse matrix; the original point is $M^{-1}$ times the image. A few special directions survive a transformation unturned — the invariant lines — and those are the eigenvectors of $M$.
Inverse (undo it):$M^{-1}=\dfrac{1}{ad-bc}\begin{pmatrix}d&-b\\-c&a\end{pmatrix}$ — swap the diagonal, negate $b,c$, divide by $\det M$
Invariant directions:solve $\det(M-\lambda I)=\lambda^2-(\operatorname{tr}M)\lambda+\det M=0$ for the eigenvalues $\lambda$
TrickCheck an inverse by confirming $M^{-1}M=I$. The $\tfrac{1}{\det M}$ factor is essential — forgetting to divide is the most common error, and if $\det M=0$ no inverse exists.
TrapAn invariant line's direction is an eigenvector; the stretch along it is that eigenvalue $\lambda$. Don't hand back $\det M=\lambda_1\lambda_2$ (the area factor) as the linear scale factor along a line — they are different numbers.
§9 — The full affine map: adding a translation AHL 3.9
An affine transformation is a linear part (the matrix $M$) followed by a translation (the vector $b$). This is the general form behind every real image transform.
Translation alone:$M=I$, so $x'=x+e,\;y'=y+f$ — a pure shift with no rotation or scaling
NoteApply the matrix first (rotate / scale / reflect about $O$), then translate. Iterating a set of these affine maps is how AI models generate fractals — the Barnsley fern is built from four such rules applied over and over.
TrapA pure translation is not a $2\times2$ matrix multiplication — it is the $+\,b$ term. That is precisely why translation is the one map that moves the origin, while every matrix transformation leaves $O$ fixed.
$M^{-1}=\tfrac{1}{\det M}\begin{pmatrix}d&-b\\-c&a\end{pmatrix}$; eigen-directions from $\lambda^2-(\operatorname{tr}M)\lambda+\det M=0$
Divide by $\det M$; $\lambda$ is the linear stretch, $\det M$ the area factor
"Includes a shift / translation"
Use the affine map $x'=Mx+b$
Translation isn't a matrix; it moves $O$
Worked Example — AI HL-Style Composite Transformation
Question (AI HL Paper 2 style — 8 marks)
A mobile-game studio transforms a triangular sprite using matrices. Transformation $A$ is an anticlockwise rotation of $90^\circ$ about the origin; transformation $B$ is an enlargement, centre the origin, scale factor $2$. (a) Write down the matrix representing $A$ and the matrix representing $B$. (b) Find the single matrix $M$ representing transformation $A$ followed by transformation $B$. (c) The sprite is the triangle with vertices $O(0,0)$, $P(4,0)$ and $Q(0,3)$. Find the coordinates of its image under $M$. (d) Find the area of the image triangle.
(b) "$A$ then $B$" is $M=BA$ — the second transformation on the left: $M=\begin{pmatrix}2&0\\0&2\end{pmatrix}\begin{pmatrix}0&-1\\1&0\end{pmatrix}=\begin{pmatrix}0&-2\\2&0\end{pmatrix}$. (M1)(A1)
(c) Stack the vertices as columns and multiply once: $\begin{pmatrix}0&-2\\2&0\end{pmatrix}\begin{pmatrix}0&4&0\\0&0&3\end{pmatrix}=\begin{pmatrix}0&0&-6\\0&8&0\end{pmatrix}$, so the images are $O'(0,0)$, $P'(0,8)$, $Q'(-6,0)$. (M1)(A1)
(d) $\det M=(0)(0)-(-2)(2)=4$. The original area is $\tfrac12(4)(3)=6$, so the image area $=|\det M|\times6=4\times6=\mathbf{24}$ square units. (M1)(A1)
Examiner's note: write "$A$ followed by $B$" as $BA$ — the second map on the left — even though the words read left-to-right; reversing it is the classic slip. Transforming all three vertices in one matrix product is quicker and cleaner on the GDC than three separate multiplications. For the area, use $|\det M|=4$ (the rotation's factor $1$ times the enlargement's $k^2=4$) rather than re-deriving from the image coordinates, and remember the origin is fixed, so $O$ maps to itself.
Common Student Questions
Do I write "$A$ then $B$" as $AB$ or $BA$?
As $BA$. Transformations act on a point from the right, so "do $A$, then $B$" means $B(A\mathbf{x})=(BA)\mathbf{x}$ — the second transformation is written on the left. It looks back-to-front because the words run left-to-right while the matrices run right-to-left. Build the composite as $BA$ and apply it to the point in one step.
Why does area scale by the determinant, and why is an enlargement $k^2$?
Because $|\det M|$ measures how much the matrix stretches the unit square, and every region is scaled by the same factor. An enlargement of scale factor $k$ stretches by $k$ in both directions, so its determinant is $k\times k=k^2$ — that is why area grows by $k^2$ while lengths grow by $k$. Always take the modulus: a negative determinant still enlarges area and simply flips the orientation.
Does the order of two transformations really change the result?
Yes, in general, because matrix multiplication is not commutative ($QP\ne PQ$). For example, a $90^\circ$ rotation then a reflection in the $x$-axis is a reflection in $y=-x$, whereas doing them in the opposite order gives a reflection in $y=x$ — genuinely different images. The one common exception is an enlargement centred at $O$, whose scalar matrix commutes with everything.
How do I build a transformation matrix I can't remember?
Use the fact that the columns of $M$ are the images of the unit vectors. Find where $(1,0)$ goes — that is column 1 — and where $(0,1)$ goes — that is column 2. For an anticlockwise rotation by $\theta$, $(1,0)\to(\cos\theta,\sin\theta)$ and $(0,1)\to(-\sin\theta,\cos\theta)$, which rebuilds $R_\theta$ instantly. A quick sketch of both unit vectors and their images gets you any reflection, rotation or stretch matrix.
Why can't a $2\times2$ matrix carry out a translation?
Because a matrix multiplication always fixes the origin — $M\mathbf{0}=\mathbf{0}$ — so it can rotate, reflect, enlarge or stretch about $O$ but can never shift the whole plane sideways. A translation is added on separately, giving the full affine map $x'=Mx+b$, where the vector $b$ is the shift. That extra $+\,b$ term is the only thing that can move the origin.
What's NOT in this cheatsheet
This page gives you the formulas and traps for free. The full Photon Academy IB Math AI HL library (enrolled students, or the lifetime resource library) adds:
Notes PDF — every transformation matrix, determinant and composition method in full, with worked derivations and the exact GDC keystrokes.
Tutorial booklet — 25+ AI HL-style questions from single-matrix fluency to full composition, area and invariant-line problems.
Tutorial Solutions — mark-scheme-style solutions with M1/A1 annotations for every transformation and area-factor step.
Predicted-paper questions — the exact matrix-transformation and composition question types most likely in the next session.