Example
Use exact quarter-turn matrices to rotate a triangle about the origin.
highlighted = computed this step
Step 1 — Set up
Use column vectors with matrix times vertex.
M=[01−10]
Step 2 — Move vertex A
Multiply the matrix by vertex A.
A′=[01−10][11]=[0⋅1+(−1)⋅11⋅1+0⋅1]=[−11]
Step 3 — Move vertex B
Multiply the matrix by vertex B.
B′=[01−10][31]=[0⋅3+(−1)⋅11⋅3+0⋅1]=[−13]
Step 4 — Move vertex C
Multiply the matrix by vertex C.
C′=[01−10][12]=[0⋅1+(−1)⋅21⋅1+0⋅2]=[−21]
Step 5 — Result
The transformed triangle is complete.
transformed triangle complete
rotate-quarter-turns
Quarter turns use exact integer matrices, so every transformed vertex can be computed exactly.