Exercise 2: Predicting Whether Two Yaw/Roll Pairs Match at Gimbal Lock — Possible Solution ==================================================================== APPLYING THE VERIFIED RULE ------------------------------ This chapter verified that at pitch=90 degrees, the resulting rotation matrix depends ONLY on the difference yaw - roll, never on the individual yaw and roll values themselves. To predict whether two pairs produce the same matrix, it's enough to compute and compare each pair's yaw - roll difference, without needing to build or multiply any matrices at all. COMPUTING BOTH DIFFERENCES ------------------------------ Pair 1: yaw=60, roll=40. yaw - roll = 60 - 40 = 20 Pair 2: yaw=15, roll=-5. yaw - roll = 15 - (-5) = 15 + 5 = 20 PREDICTION ------------------------------ Both pairs have the same yaw - roll difference (20 degrees in both cases), so by this chapter's own verified rule, they would produce EXACTLY THE SAME rotation matrix at pitch=90 degrees - the same conclusion this chapter reached for its own four verified example pairs (30/10, 40/20, 25/5, 100/80), all of which shared yaw-roll=20 and all produced the identical matrix. WHY THIS PREDICTION CAN BE TRUSTED WITHOUT RECOMPUTING ------------------------------ This chapter didn't just observe the yaw-roll pattern empirically - it derived it algebraically, showing that Rz(yaw)*Ry(90)*Rx(roll) simplifies to an expression containing yaw and roll only in the combination (yaw - roll), via the trigonometric identities for cos(yaw-roll) and sin(yaw-roll). Because this is a proven algebraic identity rather than a coincidental numerical match, any two pairs sharing the same yaw-roll value are mathematically guaranteed to produce the same matrix at pitch=90, not just likely to based on the four examples already tested. WHY THIS WORKS AS AN ANSWER ------------------------------ The answer applies the chapter's own verified and algebraically justified rule directly, computes both pairs' relevant difference correctly, and explains why the prediction is a guaranteed consequence of a derived identity rather than an inference from a small number of examples.