
An affine space of dimension is a set of points, say together with an associated vector space of dimension . It is equipped with two operations:
- Point subtraction: (gives a vector)
- Point translation: (moves a point by a vector)
- Represent points at infinity (when ) — useful for parallel lines in perspective projections.
- Encode various transformations (e.g., perspective camera models, 3D projection) as linear matrix operations as shown next.
Transformations in homogeneous coordinates
In this section we show common 2D transformations using homogeneous representations.Rigid Transformation
A rigid transformation preserves lengths and angles — it includes rotation and translation, but no scaling or shearing. Matrix form:- : rotation angle
- : translation
Similarity Transformation
A similarity transformation includes rotation, translation, and uniform scaling. It preserves shape but not necessarily size. Where is the scaling factor.Affine Transformation
Affine transformations include translation, rotation, scaling, shearing, and combinations. They preserve parallelism of lines but not necessarily lengths or angles. This is the most general linear 2D transformation with translation.Example
We implement below various transformations using homogeneous coordinates:

