3.4.2 · D5Rocket Flight Mechanics
Question bank — Transformation between frames — direction cosine matrices
Before we start, three words we will lean on, defined in plain language:
Related maps you may want open while working: Euler angles — yaw pitch roll, Orthogonal matrices and rotation groups SO(3), Reference frames in rocketry — inertial, body, wind, Quaternions and attitude representation.
The three single-axis matrices (kept here for reference)
Every question below leans on these building blocks, so let us write them out once with explicit row/column positions. Each rotates the frame by angle about one axis. The rows are numbered from top to bottom; the columns from left to right. "Slot " means row , column .
\mathbf C_2(\theta)=\begin{pmatrix}\cos\theta & 0 & -\sin\theta\\ 0&1&0\\ \sin\theta & 0 & \cos\theta\end{pmatrix},\quad \mathbf C_3(\theta)=\begin{pmatrix}\cos\theta & \sin\theta & 0\\ -\sin\theta & \cos\theta & 0\\ 0&0&1\end{pmatrix}$$ ![[deepdives/dd-physics-3.4.02-d5-s01.png]] > [!intuition] Where the $-\sin\theta$ lives — look at the figure > In $\mathbf C_1$ and $\mathbf C_3$ the $-\sin\theta$ sits **below** the diagonal (the *lower* off-diagonal slot). In $\mathbf C_2$ it jumps **above** the diagonal, into slot $(1,3)$ — the *upper* off-diagonal — because axis-2 uses the cyclic order $3\!\to\!1$ instead of $1\!\to\!2$. This is the single trap that catches most people; the figure highlights the odd-one-out in coral. > [!mnemonic] "Inner indices kiss, outer indices survive" — unpacked > When you multiply $\mathbf C^{CB}\,\mathbf C^{BA}$, line the superscripts up: $\;C\underbrace{B}_{\text{inner}}\;\underbrace{B}_{\text{inner}}A$. The two $B$'s stand **next to each other in the middle** — those are the *inner* indices. They must be equal, and they cancel ("kiss"). The two that sit at the **outer edges**, $C$ and $A$, are the *outer* indices; they survive into the answer $\mathbf C^{CA}$. So $\mathbf C^{CB}\mathbf C^{BA}=\mathbf C^{CA}$ works only when the inner frames match — otherwise you are trying to feed a $B$-machine a vector that is not in frame $B$. --- ## Why the rightmost matrix acts first (step-by-step) The rule "first physical rotation goes rightmost" is not folklore — it falls out of how matrices apply to vectors. Follow a 3-2-1 sequence acting on a fixed vector $\mathbf v$: $$\mathbf v^{B}=\underbrace{\mathbf C_1(\phi)\,\mathbf C_2(\theta)\,\mathbf C_3(\psi)}_{\mathbf C^{BA}}\;\mathbf v^{A}$$ Matrix multiplication is applied *from the inside out* — the matrix touching the vector acts first: $$\mathbf C_1(\phi)\,\mathbf C_2(\theta)\,\big[\mathbf C_3(\psi)\,\mathbf v^{A}\big]$$ 1. **WHAT:** $\mathbf C_3(\psi)$ hits $\mathbf v^{A}$ first, expressing it after the yaw. **WHY:** it is the rightmost, i.e. innermost, factor. **LOOKS LIKE:** the axes swing about $z$ by $\psi$ (figure, frame 1). 2. **WHAT:** $\mathbf C_2(\theta)$ then acts on that intermediate result (pitch about the *new* $y$). **WHY:** the parentheses close inward-out. **LOOKS LIKE:** frame 2 of the figure. 3. **WHAT:** finally $\mathbf C_1(\phi)$ applies roll about the newest $x$. **LOOKS LIKE:** frame 3. ![[deepdives/dd-physics-3.4.02-d5-s02.png]] Because rotations do **not** commute, swapping the order changes the destination — the figure below shows yaw-then-pitch landing an arrow in a *different* place than pitch-then-yaw, so the two orderings genuinely give different matrices. ![[deepdives/dd-physics-3.4.02-d5-s03.png]] --- ## True or false — justify A DCM changes the length of the vector it acts on. ::: **False.** A DCM is orthogonal ($\mathbf C\mathbf C^\top=\mathbf I$), so it preserves dot products and therefore lengths — it only re-expresses the same arrow in new axes, like renaming "forward" without moving the toy car. $\mathbf C^{BA}$ and $\mathbf C^{AB}$ are equal because they describe the same pair of frames. ::: **False.** They are *transposes* of each other ($\mathbf C^{AB}=(\mathbf C^{BA})^\top$); one maps $A\to B$ and the other runs backwards $B\to A$. They are equal only in the trivial case where the frames coincide (the identity). Every $3\times3$ matrix whose columns are unit length is a valid DCM. ::: **False.** Unit columns is not enough — the columns must also be ==mutually perpendicular== *and* the determinant must be $+1$. Otherwise you have a skewed or reflected frame, not a right-handed rotation. The determinant of any DCM can be $+1$ or $-1$ depending on the rotation angle. ::: **False.** It is always exactly $+1$. Both frames are right-handed, and a right-handed→right-handed map preserves orientation; a $-1$ would mean a mirror flip, which no physical rotation can produce. Rotating by yaw then pitch gives the same DCM as pitch then yaw. ::: **False.** Rotations do not commute, so $\mathbf C_2\mathbf C_3\neq\mathbf C_3\mathbf C_2$ (see the non-commutativity figure above). Turning your head left-then-down points you somewhere different from down-then-left. For a passive rotation, the numbers of a fixed vector rotate opposite to the way the axes turn. ::: **True.** If the axes swing $+\theta$, the vector *appears* to lean $-\theta$ relative to them — that is exactly why the $-\sin\theta$ appears in the lower off-diagonal of $\mathbf C_3(\theta)$. If two DCMs are each orthogonal, their product is also orthogonal. ::: **True.** $(\mathbf C_2\mathbf C_1)(\mathbf C_2\mathbf C_1)^\top=\mathbf C_2\mathbf C_1\mathbf C_1^\top\mathbf C_2^\top=\mathbf I$. Chaining two rotations is again a rotation — this is why composition works and stays inside [[Orthogonal matrices and rotation groups SO(3)|SO(3)]]. The transpose of a DCM and its inverse are different matrices. ::: **False.** For an orthogonal matrix the inverse *is* the transpose, so "undoing" a frame change costs no division — just flip the table over. A diagonal entry of a DCM can be greater than $1$. ::: **False.** Every entry is a cosine of some angle, and cosine is bounded in $[-1,1]$. An entry above $1$ signals a computational error. The rows of $\mathbf C^{BA}$ are the $B$-axes written in $A$-coordinates. ::: **True.** Row $i$ collects $\hat b_i\cdot\hat a_1,\hat b_i\cdot\hat a_2,\hat b_i\cdot\hat a_3$ — precisely the components of $\hat b_i$ expressed along the $A$ axes. --- ## Spot the error "Data is in frame $A$, so I apply $\mathbf C^{AB}$ to get frame $B$." ::: **Wrong direction.** $\mathbf C^{AB}$ eats a $B$-vector and outputs $A$. Read superscripts as *output←input*; to send $A\to B$ you need $\mathbf C^{BA}$, whose inner index $A$ must kiss your data's frame. "For a 3-2-1 sequence the roll matrix multiplies the vector first: $\mathbf C^{BA}=\mathbf C_3\mathbf C_2\mathbf C_1(\phi)$." ::: **Order reversed.** The *first* physical rotation must sit *rightmost* (it hits the vector first, as the step figure shows). Correct is $\mathbf C^{BA}=\mathbf C_1(\phi)\mathbf C_2(\theta)\mathbf C_3(\psi)$ — yaw $\psi$ acts first. "$\mathbf C_2(\theta)$ has $-\sin\theta$ in its lower-left slot $(3,1)$, just like $\mathbf C_1$ and $\mathbf C_3$." ::: **Wrong slot.** Look at the reference matrix: $\mathbf C_2$'s minus sign sits in the ==upper== off-diagonal, slot $(1,3)$, because axis-2 uses the cyclic order $3\!\to\!1$. Slot $(3,1)$ actually holds $+\sin\theta$. Always derive from $C_{ij}=\hat b_i\cdot\hat a_j$ rather than copying a pattern. "To combine $\mathbf C^{CB}$ and $\mathbf C^{BA}$, add them: $\mathbf C^{CA}=\mathbf C^{CB}+\mathbf C^{BA}$." ::: **Wrong operation.** Composition of rotations is *multiplication*, not addition: $\mathbf C^{CA}=\mathbf C^{CB}\mathbf C^{BA}$. The inner $B$ indices kiss and cancel, leaving the outer $C\leftarrow A$. "The DCM is symmetric, so I don't care about multiplication order when transposing." ::: **False premise.** A general DCM is *not* symmetric ($\mathbf C\neq\mathbf C^\top$ unless it is the identity or a $180°$ rotation). Its transpose reverses the frame direction and generally gives a different matrix. "$\det\mathbf C=-1$, so this is still a valid attitude, just an odd one." ::: **Not a rotation.** $\det=-1$ is a reflection — it flips handedness. Recheck for a swapped column, a sign slip, or a left-handed axis definition; a physical attitude always gives $\det=+1$. --- ## Why questions Why is entry $C^{BA}_{ij}$ a *cosine* specifically and not some other function of the angle? ::: Because a component is a *projection*, and projecting $\hat a_j$ onto $\hat b_i$ is the dot product $\hat b_i\cdot\hat a_j=\lVert\hat b_i\rVert\lVert\hat a_j\rVert\cos\theta_{ij}=\cos\theta_{ij}$ (both are unit vectors). Cosine is exactly the "how much of one direction lies along another" measure. Why does dotting the vector with $\hat b_i$ *extract* only the $i$-th $B$-component? ::: Because the $B$-frame is orthonormal: $\hat b_i\cdot\hat b_i=1$ and $\hat b_i\cdot\hat b_k=0$ for $k\neq i$. So the dot product kills every term except the one along $\hat b_i$, leaving that single number. Why can we invert a DCM by transposing instead of running a full matrix inversion? ::: Because its rows are orthonormal, giving $\mathbf C\mathbf C^\top=\mathbf I$, which *defines* $\mathbf C^\top$ as the inverse. Undoing a pure rotation just means turning the axes back, and the transpose already encodes that reversed table. Why must the determinant be $+1$ and never any other value? ::: A DCM maps a right-handed frame to a right-handed frame, preserving orientation and volume; orthogonality forces $|\det|=1$, and orientation-preservation picks the sign $+1$. This is the "special" in [[Orthogonal matrices and rotation groups SO(3)|SO(3)]]. Why do rocket engineers store attitude as a DCM (or [[Quaternions and attitude representation|quaternion]]) instead of just three Euler angles? ::: Because Euler angles suffer *gimbal lock* — at a pitch of $\pm90°$ two axes align and one angle becomes undefined. The DCM's nine numbers never lose a degree of freedom, so [[Angular velocity and the kinematic equations|attitude propagation]] stays well-defined everywhere. Why does the same physical thrust arrow have different components in the body and inertial frames? ::: Because components are *measurements against axes*, and the two frames' axes point differently. The arrow ([[Thrust vectoring and force resolution|thrust]]) is unchanged; only the coordinate labels differ, related through $\mathbf F^I=\mathbf C^{IB}\mathbf F^{body}$. Why, in the product $\mathbf C^{CB}\mathbf C^{BA}$, must the two inner $B$'s match? ::: Because the right matrix outputs a $B$-vector and the left matrix expects a $B$-vector as input. If those inner frames disagree, you are feeding one machine the wrong-frame numbers — the "inner indices kiss" rule is precisely this compatibility check. --- ## Edge cases What DCM corresponds to zero rotation (the two frames coincide)? ::: The identity matrix $\mathbf I$. Every axis is aligned with its partner, so each diagonal cosine is $\cos 0°=1$ and every off-diagonal is $\cos 90°=0$. What does $\mathbf C_3(180°)$ look like, and is it symmetric? ::: Setting $\theta=180°$ gives $\cos180°=-1$ and $\sin180°=0$, so $\mathbf C_3(180°)=\begin{pmatrix}-1&0&0\\0&-1&0\\0&0&1\end{pmatrix}$. Since both off-diagonals vanish, this special case *is* symmetric — a rare instance where $\mathbf C=\mathbf C^\top$. At a pitch of $\theta=90°$, what happens to the DCM and why is that dangerous for Euler angles? ::: The DCM itself stays perfectly valid (still orthogonal, $\det=+1$). But the *Euler-angle recovery* breaks: yaw and roll axes align, so those angles trade off and become ambiguous — classic [[Euler angles — yaw pitch roll|gimbal lock]]. If you accidentally used a left-handed frame, what tells you immediately from the matrix? ::: The determinant comes out $-1$ instead of $+1$. That flip flags a reflection hiding in your axis definition — the frame is not right-handed. What is $\mathbf C^{BA}$ when $B$ is $A$ rotated by a full $360°$? ::: The identity again. A full turn brings every axis back onto itself, so all direction cosines return to their $0°$/$90°$ values — the matrix cannot "remember" that a rotation happened. For a vector lying exactly along the rotation axis, how do its components change under that single-axis DCM? ::: They do not change at all. The rotation axis is fixed pointwise, so a vector along it (e.g. $(0,0,v_3)$ under $\mathbf C_3$) keeps identical components in both frames. > [!recall]- One-line summary to keep > A DCM is a lossless *translation table of directions*: it re-labels a fixed arrow, never resizes it. Inner indices kiss (must match, cancel), outer survive; inverse = transpose; determinant $= +1$ always.