HuntsvilleEngineers mark
HE Reference Shelf — huntsvilleengineers.com
The Reference Shelf · Geometry & Mechanics

Coordinate transformations

The bookkeeping that lets you take a load, a measurement, or an orientation described in one frame and restate it correctly in another.

Also known as: change of frame · frame transformation · change of basis · basis transformation · similarity transformation

The formula

Rotate a vector in 2D by angle θ:

[x']   [cos θ  -sin θ] [x]
[y'] = [sin θ   cos θ] [y]

Reads: the new components are the old ones spun through θ. Positive θ is counterclockwise.

The three elemental 3D rotations (about x, y, z):

Rx(θ) = [1    0       0    ]   Ry(θ) = [ cos θ  0  sin θ]   Rz(θ) = [cos θ  -sin θ  0]
        [0  cos θ  -sin θ  ]           [   0    1    0  ]           [sin θ   cos θ  0]
        [0  sin θ   cos θ  ]           [-sin θ  0  cos θ]           [  0       0    1]

Reads: each spins the other two axes and leaves its own axis alone.

Full rigid-body move (rotate, then shift) in homogeneous form:

[p_world]   [R   t] [p_body]
[   1   ] = [0   1] [   1  ]

Reads: p_world = R·p_body + t. R handles orientation, t handles position. Stacking them into a 4×4 lets you chain frames by plain matrix multiplication.

Key identity for any rotation matrix:

R⁻¹ = Rᵀ          det(R) = +1

Reads: to go the other direction, transpose — don't invert numerically. That's the whole trick that makes frame math cheap.

Where you meet it

  • A vibration test on the shaker at Redstone. The accelerometer is bonded to the fixture at some cockeyed angle because that's where it fit. Your control spec is in the article's axes, not the sensor's. You measure in sensor frame, rotate into article frame, and only then compare to the profile. Get the rotation backward and you'll chase a resonance that isn't there.

  • An IMU on a UAV. The gyro and accelerometers report in body frame — nose, right wing, belly. The autopilot wants north-east-down. The direction cosine matrix built from yaw, pitch, and roll carries every reading from body to world, updated hundreds of times a second.

  • A load review board for a bracket. Loads arrive from the systems group in vehicle coordinates. Your FE model is built in part coordinates because that's how the CAD came in. Before anything means anything, one set gets transformed into the other. A sign error here shows up as a bracket that passes on paper and cracks on the stand.

  • A theodolite or laser-tracker survey of a large assembly. Each instrument setup has its own local frame. Tying the survey together is nothing but a chain of coordinate transformations back to a common datum.

How it works

A coordinate transformation does not move the physical thing. The bolt is where it is. What changes is the frame you describe it from. That single sentence prevents most of the sign errors people make.

The distinction that trips everyone up is active versus passive, also called alibi versus alias. An active (alibi) rotation actually spins the vector and keeps the axes still. A passive (alias) rotation keeps the vector still and spins the axes underneath it — you're renaming the same arrow in new coordinates. The two are related by a transpose. Numerically: an active +90° spin about z sends (1, 0, 0) to (0, 1, 0); the passive version of the same +90° frame rotation sends the components to (0, −1, 0). Same angle, opposite-looking answer. If your transformed data comes out flipped, you almost certainly used the active matrix where the passive one belonged, or vice versa.

Rotation matrices live in a set called SO(3): orthogonal, determinant +1. Orthogonal means the columns are perpendicular unit vectors — the transform preserves lengths and angles, so a 5 g reading stays 5 g in any frame. Determinant +1 means it's a proper rotation, not a mirror. Because the matrix is orthogonal, R⁻¹ = Rᵀ, so reversing a frame change is free: you transpose. Never run a general matrix inverse on a rotation; it's slower and it invites round-off that quietly de-orthogonalizes the matrix over thousands of updates.

Order matters, and this is the gotcha that survives every code review. Rotations do not commute. Yaw-then-pitch is a different orientation than pitch-then-yaw. In matrix terms Rx·Rz ≠ Rz·Rx, and composition applies right to left, so R = Rz·Ry·Rx means "roll first, then pitch, then yaw." Pick a convention — the aerospace default is yaw-pitch-roll, a Tait-Bryan sequence — write it on the wall, and never mix it inside one project. A worked case: yaw 45°, pitch 30°, roll 0° carries the body nose vector (1, 0, 0) to world components (0.6124, 0.6124, −0.5), still unit length, pitched up 30° and swung 45° in heading — in NED the third component is the down-component, so the −0.5 is −sin 30°, nose above the horizon.

The limit of validity is the singularity. Any three-angle scheme — Euler or Tait-Bryan — has an orientation where two axes line up and you lose a degree of freedom. For yaw-pitch-roll that's pitch = ±90°: the Ry matrix collapses and yaw and roll become the same knob. This is gimbal lock, the reason Apollo's guidance had a "don't go there" cone and the reason production attitude code carries orientation as a quaternion or the full 9-number direction cosine matrix and only converts to angles for the display. Quaternions never gimbal-lock and compose faster; the price is they're harder to read off by eye.

Two more habits worth keeping. Translations don't commute with rotations either — rotate-then-shift is not shift-then-rotate — which is exactly why the homogeneous 4×4 exists: it bakes the order into one matrix so the chain is unambiguous. And a full frame change on a matrix quantity (an inertia tensor, a stress tensor) is not R·M but the similarity transform M' = R·M·Rᵀ. Forget the trailing transpose and your transformed inertia tensor stops being symmetric, which is the tell that you did it wrong.

History

The backbone is Euler's. In 1775 Leonhard Euler presented to the St. Petersburg Academy the theorem that any rotation of a rigid body about a fixed point — no matter how you tumble it — is equivalent to a single rotation about one axis through that point [1][2]. That single-axis fact is why every orientation, however arrived at, can be boiled down to one axis and one angle. Euler had already introduced, around 1767, the three-angle scheme now bearing his name for pinning down a body's orientation against a fixed frame [3].

The aerospace flavor — yaw, pitch, roll — is the Tait-Bryan convention, named for the Scottish physicist Peter Guthrie Tait (1831–1901) and the English applied mathematician George Bryan (1864–1928), the latter one of the early formalizers of aircraft stability [3]. It differs from proper Euler angles only in that all three rotations are about distinct axes.

Running underneath is a quieter thread. In 1840 Olinde Rodrigues published a four-parameter description of rotations and, crucially, the rule for composing two of them [4]. Three years later, on October 16, 1843, William Rowan Hamilton — stuck on how to multiply triples — worked out that you need four numbers, not three, and famously knifed i² = j² = k² = ijk = −1 into the stone of a Dublin bridge [4]. Those are quaternions. It took the aerospace and graphics worlds another century-plus to notice that Hamilton's four numbers were the clean, singularity-free way to carry attitude through a computer — the same Euler-Rodrigues parameters, now doing shift work in every flight controller and game engine.

Related tools

  • /tools/convert-angle
  • /tools/moment-of-inertia-shapes
  • /tools/projectile-range
  • /tools/orbital-velocity-period
  • /tools/hohmann-transfer

Sources

  1. https://en.wikipedia.org/wiki/Euler%27s_rotation_theorem
  2. https://sites.utexas.edu/near/files/2022/07/Rotations.pdf
  3. https://en.wikipedia.org/wiki/Euler_angles
  4. https://en.wikipedia.org/wiki/Quaternion

Written by HE in our own words from the cited sources — engineering judgment included, your stamp still required. All entries →

★ The Reference Shelf

Reading is free. The shelf is for cardholders.

Your library card is an email address: pin it to your shelf, print the card, take the FE/PE quick-reference pack, read the Huntsville history. The shelf remembers what you reach for.

Already on the list? Enter with your subscribed email →