Module 2 — Vectors and coordinate transformations
EDU-MAT-201 · Module 2 of 4 · Estimated effort: 2 hours including practice
Before you begin: Complete Module 1 or demonstrate its evidence criteria. Use the course environment and downloads.
Outcomes
Apply a two-dimensional rotation; identify coordinate conventions; verify a geometric invariant and diagnose a sign error.
Explain and demonstrate
A vector records magnitude and direction relative to a coordinate system. The ordered pair (2, 1) is meaningful only after declaring what x and y represent, their units and the direction of positive axes. In this lesson x points right, y points up and positive rotation is counterclockwise. These conventions differ from many image grids, where row values increase downward.
A 90-degree counterclockwise rotation maps (x, y) to (−y, x). Applying it to (2, 1) gives (−1, 2). The squared length before rotation is 2² + 1² = 5; afterwards it is (−1)² + 2² = 5. Length preservation is an invariant of this rotation. It provides a check independent of the exact expected coordinate pair, although it cannot detect every wrong transformation: a reflection also preserves length.
Worked example: independent checks
| Input | Correct rotated point | Squared length | Check purpose |
|---|---|---|---|
| (1, 0) | (0, 1) | 1 | Confirms rotation direction |
| (0, 1) | (−1, 0) | 1 | Confirms sign and axis exchange |
| (2, 1) | (−1, 2) | 5 | Checks a non-axis example |
| (0, 0) | (0, 0) | 0 | Checks the origin |
Two successive quarter-turns produce (−x, −y); four return the original point. This composition check reveals how repeated operations relate to a larger transformation. Translation is different: adding an offset changes position, while a direction vector does not receive the same translation treatment in geometric models.
Lab — teach a transformation through evidence
Setup: Use graph paper or the supplied lab.py; keep all quantities dimensionless for this fixture.
- Plot (2, 1), predict its rotated location and draw both position vectors.
- Run
python lab.py vectors. Expect(-1, 2) squared length: 5. - Apply
rotatefour times to each point in the table. Check that the original point returns. - Replace the mapping with
(y, x)in a copy. Show that the length check and the (1, 0) example both pass, but the (0, 1) example fails. Use both basis vectors to distinguish the reflection from the intended rotation. - Write a two-minute explanation of why one invariant is insufficient. Include the two basis-vector tests.
Expected observations: The swap-only function reflects across y = x; it is not a quarter-turn rotation. Recovery: Restore (-point[1], point[0]) and rerun the checks.
Evidence: Annotated plots, the convention statement, test results and the explanation. Cleanup: Keep corrected code and label the faulty example as a teaching counterexample.
Common pitfalls and teaching decisions
Mixing degrees and radians creates numerical errors in later trigonometric code. A correct formula under one axis convention can look reversed under another. Ask learners to annotate axes before calculating. Offer an equivalent coordinate table for learners who cannot interpret the plotted arrows.
Retrieval and reflection
Why can a length-preserving result still be wrong?
Reflection preserves length too. Verify orientation and known points as well as length.
What should be declared before comparing two coordinate implementations?
Axis directions, units, origin and angle convention. Resolve these assumptions before diagnosing a formula defect.
Official references
OpenStax Precalculus: rotation of axes · Python mathematics functions. This lesson rotates a vector in fixed axes; the source also discusses rotating axes, which is a distinct convention to compare deliberately.