Linear Algebra · Theory · M10
M10-T2 — SO(3) and Its Lie Algebra
Every small 3D rotation is a vector: the axis times the angle. The skew-symmetric matrix of that vector is the Lie algebra of SO(3).
SO(3) has nine matrix entries but three degrees of freedom. Its tangent space at the identity has exactly three dimensions and a concrete description: skew-symmetric matrices, which are in one-to-one correspondence with ordinary 3D vectors through the hat map. The rotation vector (axis times angle) and the angular velocity are both elements of this algebra, and its bracket is the cross product.
Learning objectives
After this lesson, you should be able to:
- Write the hat map and show that [a]ₓb = a × b and that algebra elements are skew-symmetric matrices.
- Interpret ω = θn as a rotation vector and as an angular velocity, and read the Lie bracket as the cross product.
- Derive that the derivative of a rotation matrix satisfies Ṙ = [ωworld]ₓR = R[ωbody]ₓ.
- Explain how many parameters, and which, a small rotation needs.
Introduction and motivation
A gyroscope reports three numbers: the angular velocity of the body. To update an orientation matrix R the filter needs to turn those three numbers into a small rotation and multiply: R ← R exp([ω]ₓ Δt). That recipe is the Lie algebra of SO(3) in action. It also explains why a rotation error has three components rather than nine, and why attitude covariance is a 3 × 3 matrix even when the attitude is stored as a quaternion.
The intuition
Differentiate RᵀR = I along a path through the identity: Xᵀ + X = 0, so the tangent matrices are skew-symmetric, and a 3 × 3 skew-symmetric matrix has three free entries: a 3-vector. That vector points along the axis about which a small rotation happens, and its length is the rate (or the angle). Multiplying the skew matrix by a position vector gives the velocity of that point on a rotating body: exactly the familiar ω × r.
Interactive figure. A wireframe box rotated by a rotation vector. The rotation vector is drawn as an arrow along the axis; its length is the angle in radians. The readout gives the rotation matrix, the angle and axis, and the logarithm check. This figure needs JavaScript to be interactive.
Geometric and physical interpretation
Geometric view. Near the identity, every rotation is exp([ω]ₓ) for a small vector ω: an angle ‖ω‖ about the axis ω/‖ω‖. The space of such ω is ℝ³, a flat 3-dimensional chart of the curved group. Physical view. For a rotating body, a point at position r has velocity ω × r = [ω]ₓ r. The angular velocity can be written in the world frame or the body frame; the two are related by ω_world = Rω_body.
The mathematics
- [ω]ₓ
- the skew-symmetric (“hat”) matrix of ω ∈ ℝ³; also written ω^ or hat(ω).
- (·)∨
- the inverse map (“vee”) from skew matrices back to vectors.
- so(3)
- the Lie algebra of SO(3): all 3 × 3 skew-symmetric matrices.
- ω = θ n
- a rotation vector: unit axis n, angle θ.
The hat map
[ω]ₓ = [ 0 −ω₃ ω₂ ; ω₃ 0 −ω₁ ; −ω₂ ω₁ 0 ], [ω]ₓ v = ω × v
What it means. The matrix has the three entries of ω, with signs. Applying it to v gives the cross product, so the matrix encodes “rotate about ω”.
The Lie algebra and its bracket
so(3) = { [ω]ₓ : ω ∈ ℝ³ }, [ [a]ₓ, [b]ₓ ] = [a]ₓ[b]ₓ − [b]ₓ[a]ₓ = [ a × b ]ₓWhat it means. The set is closed under the commutator, which equals the hat of the cross product: the failure of rotations to commute at second order is measured by a × b.
Angular velocity
Ṙ = [ωw]ₓ R = R [ωb]ₓ, ωw = R ωb
What it means. The velocity of the matrix R is an algebra element multiplied on the left (world angular velocity) or on the right (body angular velocity), the two forms being related by R.
so(3) = skew-symmetric 3×3 matrices ≅ ℝ³ via the hat map; [ω]ₓv = ω × v; bracket = cross product; Ṙ = [ωw]ₓR = R[ωb]ₓ.
Step-by-step derivation: why skew-symmetric, the bracket and Ṙ
- Tangent matrices are skew. Let
R(t)be a smooth path in SO(3) withR(0) = Iand tangentX = Ṙ(0). DifferentiatingR(t)ᵀR(t) = Iat t = 0 givesXᵀ + X = 0: X is skew-symmetric. - Dimension. A 3 × 3 skew-symmetric matrix has zero diagonal and
x₁₂ = −x₂₁etc., so three independent entries: dim so(3) = 3 = dim SO(3), as the rotation counting of Module 7 required. Every skew matrix has the form[ω]ₓ. - Cross product. By expansion,
[ω]ₓv = (−ω₃v₂ + ω₂v₃, ω₃v₁ − ω₁v₃, −ω₂v₁ + ω₁v₂) = ω × v, so it has the kinematic meaningv̇ = ω × vfor a point rotating about the axis ω. - Bracket. Using the identity
a × (b × v) − b × (a × v) = (a × b) × v(Jacobi identity for the cross product) we get([a]ₓ[b]ₓ − [b]ₓ[a]ₓ)v = [a × b]ₓvfor all v, hence[[a]ₓ, [b]ₓ] = [a × b]ₓ. - Powers of the hat matrix. For a unit axis n,
[n]ₓ² = nnᵀ − Iand[n]ₓ³ = −[n]ₓ. This closed pattern is what makes the exponential have a finite closed form (Rodrigues, next lesson). - Rate of rotation. A moving body with rotation
R(t)hasṘ Rᵀskew-symmetric (differentiateRRᵀ = I:ṘRᵀ + RṘᵀ = 0). Define[ω_w]ₓ = ṘRᵀ, the world angular velocity, soṘ = [ω_w]ₓR. LikewiseRᵀṘis skew, defining the body angular velocity:Ṙ = R[ω_b]ₓ. - Relation between the two. From
[ω_w]ₓR = R[ω_b]ₓwe get[ω_w]ₓ = R[ω_b]ₓRᵀ = [Rω_b]ₓ(rotation of a cross product), soω_w = Rω_b. A gyroscope measuresω_b; to integrate it, multiply on the right:R(t + Δt) ≈ R(t) exp([ω_b Δt]ₓ). - Covariance of attitude. Small attitude errors are rotation vectors δ ∈ ℝ³, so an attitude covariance is a 3 × 3 matrix, even for a quaternion (4 numbers) or matrix (9 numbers) state: the covariance lives in the tangent space (Module 9 meets Module 10).
A caution on notation. Texts write the hat as ω^, [ω]ₓ or S(ω) and the inverse as vee. Check the sign convention of the cross-product matrix (some define the skew matrix of the transpose); the safe test is [ω]ₓv = ω × v.
A worked example: hats, brackets and angular velocity
- Hat.
ω = (1, 2, 3):[ω]ₓ = [[0, −3, 2], [3, 0, −1], [−2, 1, 0]]; its transpose is its negative ✓. - Cross product by matrix.
b = (−1, 0, 2):[ω]ₓb = (−3·0 + 2·2, 3·(−1) − 1·2, −2·(−1) + 0) = (4, −5, 2) = ω × b✓. - Cube of the hat.
θ² = 14and[ω]ₓ³ = −14 [ω]ₓ(the patternK³ = −θ²K). - Bracket.
a = (1, 0, 0),b = (0, 1, 0):[a]ₓ[b]ₓ − [b]ₓ[a]ₓ = [a × b]ₓ = [e₃]ₓ, the matrix with entries ∓1 in the upper left: the commutator of rotations about x and y is a rotation about z. - A rotation vector.
ω = (0, 0, π/2)givesexp([ω]ₓ) = Rz(90°);ω = (0.3, −0.2, 0.5)has angle‖ω‖ = 0.616rad (35.3°) andexp([ω]ₓ) = [[0.860, −0.498, −0.115], [0.440, 0.835, −0.330], [0.260, 0.233, 0.937]]. - Angular velocity. For
R = Rz(90°)and a world angular velocityω_w = (1, 0, 0), the body-frame rate isω_b = Rᵀω_w = (0, −1, 0), and[ω_w]ₓR = R[ω_b]ₓ✓ (both give the same Ṙ). - Gyro integration. A gyro reads
ω_b = (0, 0, 1)rad/s for 0.1 s:ΔR = exp([ω_b Δt]ₓ) = Rz(5.73°)andR ← R ΔR(post-multiplication, body rates).
Robotics application
UAV attitude estimation. Gyro integration, the attitude error state and its 3 × 3 covariance all use so(3); see attitude representation and rotation matrices, quaternion-based orientation and the error-state Kalman filter.
SLAM. A relative rotation between scans is measured, and its error expressed as a rotation vector δ with a 3 × 3 covariance; see rotation matrices, quaternions and poses and pose graphs.
IMU preintegration. Preintegrated rotation increments are products of exp([ω Δt]ₓ) over many samples; see IMU preintegration.
Manipulators and mobile robots. Angular velocities of links, wheel-based yaw rates and the angular part of the Jacobian (Module 8) are algebra elements; the angular rows of the 6 × n Jacobian are the world angular velocity ω_w as a function of joint rates.
Engineering implications and limitations
Practical rules
- Know the frame of your angular velocity. A gyro gives body rates: use
R exp(ω_b Δt). World rates giveexp(ω_w Δt) R. Mixing them is a common attitude bug. - Test the hat sign. Check [ω]ₓv = ω × v with a numeric example in your code base.
- Use 3-vectors for errors and covariances. Do not carry a 4 × 4 covariance for a unit quaternion or a 9 × 9 for a matrix: keep 3 × 3 in the tangent space.
- Re-orthonormalise after products. Even though exp gives exact rotations in exact arithmetic, repeated products drift in floating point.
- Use closed forms with small-angle guards. The Rodrigues coefficients sin θ/θ and (1 − cos θ)/θ² need series expansions near θ = 0 (next lessons).
Limits
The rotation vector is a chart: it is unique and smooth only for ‖ω‖ < π. At exactly π the axis can be flipped (n and −n give the same rotation), and beyond π the vector wraps. Tangent-space algorithms must stay in the neighbourhood of the current estimate.
Common misconceptions
“A rotation vector is a point in space that gets rotated.”
It encodes a rotation: its direction is the axis and its length the angle.
“The skew-symmetric matrix is the rotation.”
It is an infinitesimal rotation (angular velocity). Only exp([ω]ₓ) is a rotation.
“Angular velocity in the world and body frames are the same vector.”
They are related by ωw = Rω_b; the numbers differ unless R = I (or R about the axis of ω).
“Rotations in 3D commute for small angles.”
Only to first order. The commutator is [a × b]ₓ, small (second order) but non-zero.
Engineering takeaways
- so(3) = skew-symmetric 3 × 3 matrices ≅ ℝ³; [ω]ₓv = ω × v.
- A rotation vector ω = θn encodes axis and angle; exp([ω]ₓ) is the rotation.
- The Lie bracket on so(3) is the cross product: [[a]ₓ, [b]ₓ] = [a × b]ₓ.
- Ṙ = [ωw]ₓR = R[ωb]ₓ with ωw = Rω_b; gyro integration is R ← R exp([ωb Δt]ₓ).
- Attitude errors and covariances are three-dimensional, living in the tangent space.
References and further reading
Primary papers and authoritative documentation.
- Solà, Deray and Atchuthan, A micro Lie theory for state estimation in robotics: A micro Lie theory for state estimation in robotics: so(3), rotation vectors and the hat operator
- Solà, Quaternion kinematics for the error-state Kalman filter: Quaternion kinematics for the error-state Kalman filter: rotation vectors and angular velocity
- Modern Robotics (Lynch and Park), free preprint: chapter 3.2.3, angular velocity and exponential coordinates
- Barfoot, State Estimation for Robotics (author-hosted first edition, free to read): chapter 7, rotation Lie algebra
Knowledge check
Three conceptual questions. Write an answer, then reveal the explanation. Your answers stay in your browser.
Question 1
Write [ω]ₓ for ω = (2, 0, −1) and compute [ω]ₓ(1, 1, 1).
Explanation
[ω]ₓ = [[0, −ω₃, ω₂], [ω₃, 0, −ω₁], [−ω₂, ω₁, 0]] = [[0, 1, 0], [−1, 0, −2], [0, 2, 0]]. Applied to (1, 1, 1): (1, −3, 2) = ω × (1, 1, 1) ✓.
Question 2
A gyro reads (0.02, 0, 0.1) rad/s for 0.5 s. What is the rotation vector of the increment and its angle?
Explanation
δ = ω Δt = (0.01, 0, 0.05) rad, angle ‖δ‖ = √(0.0001 + 0.0025) = 0.051 rad (2.9°). The update is R ← R exp([δ]ₓ), post-multiplied because the rates are in the body frame.
Question 3
Why is the covariance of the attitude error 3 × 3 even if the attitude is stored as a unit quaternion with four components?
Explanation
A rotation has only three degrees of freedom. The error is a small rotation vector δ ∈ ℝ³ in the tangent space, so its covariance is 3 × 3. A 4 × 4 covariance would include the redundant, constrained direction (unit norm) and be singular.
What’s next
Rigid motions combine rotation and translation, and their velocities, twists, combine angular and linear velocity. The next lesson builds the Lie algebra of SE(3) and shows that a constant twist traces a screw motion.
Related content
Nothing below is required to finish this lesson.
- BeforeM10-T1: Introduction to Lie Groups and Lie Algebras
Say what a Lie group and its Lie algebra are, using rotations in the plane as the first example.
- BeforeM7-T4: SO(3)
State what makes a matrix a rotation (orthogonal, determinant +1) and why such matrices form a group.
Get notified when the next lesson and new labs are released.
One email per new lesson or lab.