Lesson 2 of 4 · Direction and invariant checks
Test direction, not just length
18 minute lesson · 3 checks along the way
Your goal for this lessonEvaluate signed-axis transforms and show why magnitude alone cannot verify direction.
In this lesson 3 sections · 3 checks
Read & understand
A useful invariant is not a complete test
The squared magnitude of (1, 2, 3) is 1² + 2² + 3² = 14. Its required output (−2, 1, 3) also has squared magnitude 14. A coordinate rotation preserves length, so checking magnitude is a useful consistency test. It cannot tell us whether the components point in the agreed body direction. Many different orientations preserve exactly the same length.
Consider a decoder that accidentally uses the reverse transformation. It maps (x, y, z) to (y, −x, z), producing (2, −1, 3) for our input. Its squared magnitude is still 14, but its x and y signs disagree with the required output. Even a decoder that simply copies (1, 2, 3) passes the magnitude check. The acceptance criterion must compare labelled components with an independently established expectation.
Check 1 of 3
10 pointsUse the reading above. You can try again without losing points.
Read & understand
A round trip can repeat the same misunderstanding
The correct inverse maps body components (a, b, c) back to sensor components (b, −a, c). Applying it to the correct output (−2, 1, 3) recovers (1, 2, 3). This is a valuable implementation check: the two transformations should undo each other. For this orthogonal matrix, the inverse is its transpose, obtained by exchanging rows and columns.
Now let the forward implementation use the wrong reverse map and let its companion inverse undo that same wrong map. The round trip still recovers the original input. Both teams can demonstrate reversible software while agreeing on the wrong physical orientation. A reference direction or independently checked mounting definition is needed to connect reversible arithmetic with the intended interface; copying expectations from the decoder would reproduce its mistake.
Check 2 of 3
10 pointsUse the reading above. You can try again without losing points.
Read & understand
A reflection can look numerically tidy
Another faulty decoder maps (x, y, z) to (−y, x, −z). Our input becomes (−2, 1, −3), again with squared magnitude 14. This map reverses handedness: the cross product of its transformed positive x and positive y directions points along positive body z, but its transformed positive z points along negative body z. It cannot represent a pure rotation between the declared right-handed frames.
The intended matrix has determinant +1; the reflection has determinant −1. A determinant check can reject that reflection, but it still cannot select the intended rotation among all proper rotations. Use these checks together for different purposes: magnitude checks length preservation, handedness rejects mirror mappings, and known-direction comparisons test the actual mounting agreement. None of these classroom checks certifies a spacecraft or establishes its flight performance.
Equal length can hide wrong direction
Original fictional comparison. All outputs have squared magnitude 14. Determinant +1 alone does not distinguish the required rotation from another proper rotation.
Open full-size diagram in a new tab: Equal length can hide wrong directionRead diagram data as a table
| Mapping | Output | Squared magnitude | Determinant | Matches intended direction |
|---|---|---|---|---|
| Required | (-2, 1, 3) | 14 | +1 | Yes |
| Identity | (1, 2, 3) | 14 | +1 | No |
| Reverse | (2, -1, 3) | 14 | +1 | No |
| Reflected z | (-2, 1, -3) | 14 | -1 | No |
Original fictional comparison. All outputs have squared magnitude 14. Determinant +1 alone does not distinguish the required rotation from another proper rotation.
Check 3 of 3
10 pointsUse the reading above. You can try again without losing points.
Put it together
Your lesson progress
Each check connects to a part of the story. Complete all 3 to earn your 25-point lesson bonus.
Explore further · Optional
Go to the source
Explore the evidence behind this lesson. These optional readings and videos open in a new tab.
- Read: JPL NAIF: reference framesGeneral frame-convention reference; from/to frames and transformations. Fictional signed-axis maps below are not SPICE kernels or mission specifications.
- Read: NASA: interface managementGeneral comparison: agreed interface documentation, controlled changes and integration verification. Not a TSC-Pathfinder-specific requirement.