Rigid-Body Motion & Transforms
Rotations, quaternions, SE(3) — where things are in space.
Prerequisites
Why it matters in robotics
Spatial reasoning — expressing a point or pose in different frames, composing transforms, and converting between rotation representations — runs through all of robotics. A robot needs to describe orientation without ambiguity or sudden failure, and needs a single transform that bundles rotation and translation together so a pose in one frame can be moved cleanly into another. Getting frames wrong silently breaks perception, planning, and control, which is why coordinate-frame discipline is fundamental.
What to study
- ✓Rotation representations and their tradeoffs: rotation matrices (SO(3)), Euler angles and gimbal lock, axis-angle, and unit quaternions
- ✓Homogeneous transformation matrices and the SE(3) group: composing rotation + translation, frame conventions, and inverting a transform
- ✓Quaternion algebra: unit-quaternion rotation, multiplication/composition, conjugate as inverse, and quaternion-to-matrix conversion
- ✓Exponential coordinates and twists: so(3)/se(3), the matrix exponential and log map, and screw-axis interpretation of rigid-body motion
Where to study
- ▶Visualizing quaternions — an explorable video series (Ben Eater + 3Blue1Brown)↗VideoBen Eater & Grant Sanderson· ~1 hr
- ▶Linear transformations and matrices | Essence of Linear Algebra, Ch. 3↗Video3Blue1Brown· ~11 min
- ⌨scipy.spatial.transform.Rotation (convert between quaternions, matrices, Euler, axis-angle)↗Code / projectSciPy· ~45 min
Cheatsheet
Symbols used below
Homogeneous transform
, so a point in frame maps to frame by (with padded with a 1).
Composing frames is now just matrix multiplication: . Inverting is cheap: .
Rodrigues' rotation formula
Rotation by angle about unit axis :
where is the skew-symmetric matrix with . This is the bridge from axis-angle to a full rotation matrix.
Quaternion rotation
To rotate a point , write it as a pure quaternion and sandwich it: (unit makes ).
Composing rotations is quaternion multiplication: — cheaper and more numerically stable to renormalize than a rotation matrix.
Quaternion to rotation matrix
For unit quaternion :
Used whenever a downstream computation (e.g. transforming a batch of points) wants an explicit matrix instead of quaternion algebra.
Exponential & log map
elements are skew-symmetric matrices ; the matrix exponential maps an axis-angle vector to a rotation (Rodrigues' formula is exactly this exponential in closed form).
The log map inverts it, recovering axis and angle from . The version does the same for a full rigid-body motion (a "twist"/screw axis), giving a minimal, singularity-aware way to represent and interpolate poses.
| Rotation matrix | Euler angles | Axis-angle | Unit quaternion | |
|---|---|---|---|---|
| Parameters | 9 (6 constraints) | 3 | 3 (axis 2 + angle 1, or 4 with redundant unit axis) | 4 (1 unit constraint) |
| Singularities | None | Gimbal lock | None (axis undefined at ) | None |
| Composition | Matrix multiply | Awkward, order-dependent | Not closed-form directly | Quaternion multiply |
| Interpolation | Not directly (must renormalize) | Poor, coordinate-dependent | Good (slerp-like) | Good — SLERP |