Hierarchy of 2D transformations
Each class of 2D transformation preserves a strictly smaller set of geometric properties than the one below it.| Class | DOF | Preserved | Matrix form |
|---|---|---|---|
| Translation | 2 | Distances, angles | |
| Euclidean (rigid) | 3 | Distances, angles | |
| Similarity | 4 | Angles, ratios of lengths | |
| Affine | 6 | Parallelism, area ratios | |
| Projective (homography) | 8 | Cross-ratio, collinearity |
Translation
Rotation by angle
The full rigid-body matrix in homogeneous form:Affine transformation
Parallel lines remain parallel under affine maps; angles and lengths in general do not.Projective (homography)
defined up to scale (8 degrees of freedom). Straight lines map to straight lines, but parallelism is not preserved.3D transformations
In 3D the same hierarchy applies. A rigid-body transformation uses a rotation matrix and a translation vector :Rotation matrices and the Rodrigues formula
Any 3D rotation can be parameterised by an axis (unit vector) and an angle . The Rodrigues rotation formula gives: where is the skew-symmetric cross-product matrix: In MATLAB, the compact Rodrigues vector encodes both axis and angle in 3 numbers, and the conversion is available viarodrig2R / R2rodrig.
3D-to-2D perspective projection
The full camera projection matrix maps a 3D world point to a 2D image point : where is the intrinsic matrix (see Camera Calibration):MATLAB examples
Python examples
3D transformations (Colab)
Notebook covering rotation matrices, the Rodrigues formula, and 3D-to-2D perspective projection in Python.
Video lecture
Lecture: 2D transformations and homographies (2021)
Recorded class covering the full hierarchy of 2D transformations and their homogeneous matrix representations.
Key properties at a glance
Composing transformations
Composing transformations
Because every transformation is a matrix, composing two transformations is just matrix multiplication: . The order matters — matrix multiplication is not commutative in general.
Inverting a rigid-body transformation
Inverting a rigid-body transformation
For a rigid-body matrix the inverse is , since rotation matrices are orthogonal (). This is much cheaper than a general matrix inversion.
Degrees of freedom count
Degrees of freedom count
Translation: 2 (tx, ty). Euclidean: 3 (+angle). Similarity: 4 (+scale). Affine: 6 (full 2×2 matrix + translation). Projective: 8 (3×3 matrix up to scale). In 3D, rigid-body has 6 DOF (3 rotation + 3 translation).
What is preserved under each transformation?
What is preserved under each transformation?
Euclidean: distances and angles. Similarity: angles and length ratios. Affine: parallelism, ratios of collinear lengths, area ratios. Projective: cross-ratio of four collinear points, and collinearity.
