Affine Transformations
Visualize transformation consisting of a linear map followed by a translation.
Affine Transformations
Concept Overview
An affine transformation is a function between vector spaces that preserves straight lines and ratios of distances between points lying on a straight line. Geometrically, an affine transformation is equivalent to a linear transformation (which can rotate, scale, or shear) followed by a translation (which shifts the origin). Unlike linear transformations, affine transformations do not necessarily preserve the origin point (0,0).
Mathematical Definition
A function T: ℝn → ℝn is an affine transformation if it can be written in the form:
c d][x
y]+[tx
ty]=[ax + by + tx
cx + dy + ty]
Key Concepts
Homogeneous Coordinates
Because affine transformations involve a translation vector, they cannot be represented by a single matrix multiplication in standard coordinates. To fix this, we often use homogeneous coordinates, appending a 1 to the vector. This allows an affine transformation in 2D to be represented as a single 3×3 matrix multiplication:
Properties Preserved
- Collinearity: Points that lie on a line before the transformation still lie on a line after.
- Parallelism: Lines that are parallel remain parallel.
- Convexity: The convex hull of a set of points transforms to the convex hull of the transformed points.
- Ratios of lengths: The ratio of distances between points on a line segment is preserved (e.g., the midpoint of a line segment remains the midpoint).
Historical Context
The study of affine geometry began with Leonhard Euler in the 18th century, who introduced the term "affine" (from Latin affinis, "related"). Euler recognized that certain properties of figures are preserved under parallel projection, which motivated the formalization of affine transformations.
Later, in 1872, Felix Klein formulated the Erlangen Program, which characterized geometries by their underlying symmetry groups. In this framework, affine geometry is defined as the study of properties invariant under the group of affine transformations. It acts as an intermediate structure between Euclidean geometry (which preserves angles and distances) and projective geometry (which only preserves incidence and cross-ratios).
Real-world Applications
- Computer Graphics: Homogeneous coordinates and affine transformations are fundamental to 2D and 3D rendering. Objects can be positioned, scaled, rotated, and moved in a virtual scene using a single composition of transformation matrices.
- Computer Vision: Image registration (aligning images from different times or viewpoints) often uses affine models to correct for differences in camera position, scaling, and shear before further processing.
- Robotics: The kinematic equations defining robot arm positions rely heavily on chained affine transformations to track the position and orientation of end-effectors relative to the base.
- Typography and Vector Art: Font rendering engines and vector graphic formats like SVG use affine transformations to render paths and text at any size or orientation without loss of quality.
Related Concepts
- Linear Transformations — the core component of an affine transformation without the translation vector
- Matrix Multiplication — used for composing the linear part of affine maps
- Change of Basis — closely related to the linear aspect of an affine map when changing coordinate systems
Experience it interactively
Adjust parameters, observe in real time, and build deep intuition with Riano’s interactive Affine Transformations module.
Try Affine Transformations on Riano →