Robotics
← Roadmap/Foundations

Rigid-Body Motion & Transforms

Rotations, quaternions, SE(3) — where things are in space.

Progress0/5 questions

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

Cheatsheet

Symbols used below

RR3×33\times3 rotation matrix (in SO(3)SO(3))
tttranslation vector
TT4×44\times4 homogeneous transform (in SE(3)SE(3))
q=(w,v)q = (w, \vec{v})unit quaternion, scalar ww + vector part v\vec{v}
qq^*quaternion conjugate: (w,v)(w, -\vec{v})
k^,θ\hat{k}, \thetaunit rotation axis and angle

Homogeneous transform

T=[Rt01]T = \begin{bmatrix} R & t \\ 0 & 1 \end{bmatrix}, so a point in frame BB maps to frame AA by Ap=ATBBp^A p = {}^AT_B \, {}^Bp (with pp padded with a 1).

Composing frames is now just matrix multiplication: ATC=ATBBTC^AT_C = {}^AT_B \, {}^BT_C. Inverting is cheap: T1=[RRt01]T^{-1} = \begin{bmatrix} R^\top & -R^\top t \\ 0 & 1 \end{bmatrix}.

Rodrigues' rotation formula

Rotation by angle θ\theta about unit axis k^\hat{k}:

R=I+sinθ[k^]×+(1cosθ)[k^]×2R = I + \sin\theta\,[\hat{k}]_\times + (1-\cos\theta)\,[\hat{k}]_\times^2

where [k^]×[\hat{k}]_\times is the skew-symmetric matrix with [k^]×v=k^×v[\hat{k}]_\times v = \hat{k} \times v. This is the bridge from axis-angle to a full rotation matrix.

Quaternion rotation

To rotate a point pp, write it as a pure quaternion (0,p)(0, p) and sandwich it: p=qpqp' = q\,p\,q^{*} (unit qq makes q1=qq^{-1} = q^*).

Composing rotations is quaternion multiplication: qAC=qABqBCq_{AC} = q_{AB}\,q_{BC} — cheaper and more numerically stable to renormalize than a rotation matrix.

Quaternion to rotation matrix

For unit quaternion (w,x,y,z)(w,x,y,z):

R=[12(y2+z2)2(xywz)2(xz+wy)2(xy+wz)12(x2+z2)2(yzwx)2(xzwy)2(yz+wx)12(x2+y2)]R = \begin{bmatrix} 1-2(y^2+z^2) & 2(xy-wz) & 2(xz+wy) \\ 2(xy+wz) & 1-2(x^2+z^2) & 2(yz-wx) \\ 2(xz-wy) & 2(yz+wx) & 1-2(x^2+y^2) \end{bmatrix}

Used whenever a downstream computation (e.g. transforming a batch of points) wants an explicit matrix instead of quaternion algebra.

Exponential & log map

so(3)so(3) elements are skew-symmetric matrices [ω]×[\omega]_\times; the matrix exponential exp([ω]×)=R\exp([\omega]_\times) = R 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 RR. The SE(3)SE(3) 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.

{A}{B}tpT = [R t; 0 1]ᴬp = ᴬT_B ᴮp
A 4×4 homogeneous transform packs rotation R and translation t into one matrix, so composing coordinate frames is just matrix multiplication: ᴬp = ᴬT_B · ᴮp.
 Rotation matrixEuler anglesAxis-angleUnit quaternion
Parameters9 (6 constraints)33 (axis 2 + angle 1, or 4 with redundant unit axis)4 (1 unit constraint)
SingularitiesNoneGimbal lockNone (axis undefined at θ=0\theta=0)None
CompositionMatrix multiplyAwkward, order-dependentNot closed-form directlyQuaternion multiply
InterpolationNot directly (must renormalize)Poor, coordinate-dependentGood (slerp-like)Good — SLERP

Application focus

Select an application above.

Practice questions (5)