Learning path

Full curriculum

Full curriculum

Unit content

Homogeneous coordinates for affine transformations

Homogeneous coordinates represent an $n$-dimensional point using $n+1$ numbers so translations can be expressed by matrix multiplication.

In two dimensions, the point $(x,y)$ is represented as

$$\begin{bmatrix}x\y\1\end{bmatrix},$$

while a displacement vector uses final coordinate $0$:

$$\begin{bmatrix}v_x\v_y\0\end{bmatrix}.$$

An affine transformation then becomes

$$ \begin{bmatrix} A & \mathbf{t}\ \mathbf{0}^T & 1 \end{bmatrix} \begin{bmatrix} \mathbf{x}\1 \end{bmatrix}. $$

The same construction gives $4\times4$ transformation matrices in 3D.

Because translation, rotation, scaling and shear now share one matrix representation, transformations can be composed by multiplication and applied as one combined transform.

The extra coordinate also prepares the way for perspective projection, where homogeneous points may later need to be divided by their final coordinate.