Skip to the lesson
FixTheRobot Explore Robotics / Linear Algebra / M10 Lie Groups and Advanced Robotics Mathematics / M10-T2

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).

  • Lesson 2 of 8
  • Module 10: Lie Groups and Advanced Robotics Mathematics
  • Lie groups and manifolds
  • About 8 minutes to read

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.

The hat map and the cross productA vector in three dimensions is turned into a skew-symmetric matrix by the hat map. Multiplying the matrix by a second vector gives the cross product of the two vectors. The Lie bracket of two such matrices is the matrix of the cross product of the vectors.[ω]ₓ = [ 0 −ω₃ ω₂ ][ ω₃ 0 −ω₁ ][ −ω₂ ω₁ 0 ] skew-symmetric: [ω]ₓᵀ = −[ω]ₓ cross product: [a]ₓ b = a × b bracket: [ [a]ₓ, [b]ₓ ] = [a × b]ₓ so(3)3-dimensionalω = θ nangle × axisrotation vector exp([ω]ₓ) = R: a rotation by angle |ω| about the axis ω/|ω|
The hat map identifies 3-vectors with skew-symmetric matrices; matrix multiplication becomes the cross product.

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.

The three sliders on top set a rotation vector ω = θn: the golden arrow is the axis and the box is rotated by the angle ‖ω‖ about it. The readout shows exp([ω]ₓ) and the angle and axis it contains. Set ω along a single axis to recover the familiar elementary rotations.

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 Ṙ

  1. Tangent matrices are skew. Let R(t) be a smooth path in SO(3) with R(0) = I and tangent X = Ṙ(0). Differentiating R(t)ᵀR(t) = I at t = 0 gives Xᵀ + X = 0: X is skew-symmetric.
  2. 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 [ω]ₓ.
  3. Cross product. By expansion, [ω]ₓv = (−ω₃v₂ + ω₂v₃, ω₃v₁ − ω₁v₃, −ω₂v₁ + ω₁v₂) = ω × v, so it has the kinematic meaning v̇ = ω × v for a point rotating about the axis ω.
  4. 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]ₓv for all v, hence [[a]ₓ, [b]ₓ] = [a × b]ₓ.
  5. Powers of the hat matrix. For a unit axis n, [n]ₓ² = nnᵀ − I and [n]ₓ³ = −[n]ₓ. This closed pattern is what makes the exponential have a finite closed form (Rodrigues, next lesson).
  6. Rate of rotation. A moving body with rotation R(t) has Ṙ Rᵀ skew-symmetric (differentiate RRᵀ = I: ṘRᵀ + RṘᵀ = 0). Define [ω_w]ₓ = ṘRᵀ, the world angular velocity, so Ṙ = [ω_w]ₓR. Likewise RᵀṘ is skew, defining the body angular velocity: Ṙ = R[ω_b]ₓ.
  7. 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]ₓ).
  8. 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. θ² = 14 and [ω]ₓ³ = −14 [ω]ₓ (the pattern K³ = −θ²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) gives exp([ω]ₓ) = Rz(90°); ω = (0.3, −0.2, 0.5) has angle ‖ω‖ = 0.616 rad (35.3°) and exp([ω]ₓ) = [[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°) and R ← 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 give exp(ω_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

  1. so(3) = skew-symmetric 3 × 3 matrices ≅ ℝ³; [ω]ₓv = ω × v.
  2. A rotation vector ω = θn encodes axis and angle; exp([ω]ₓ) is the rotation.
  3. The Lie bracket on so(3) is the cross product: [[a]ₓ, [b]ₓ] = [a × b]ₓ.
  4. Ṙ = [ωw]ₓR = R[ωb]ₓ with ωw = Rω_b; gyro integration is R ← R exp([ωb Δt]ₓ).
  5. Attitude errors and covariances are three-dimensional, living in the tangent space.

References and further reading

Primary papers and authoritative documentation.

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.

Next lesson

M10-T3 — SE(3) and Twists

Describe rigid-body velocity as a twist and the Lie algebra of SE(3).

Nothing below is required to finish this lesson.