aiwiki.page
English
Mathematics / homogeneous-coordinates

Homogeneous coordinates

Homogeneous coordinates represent points by nonzero tuples defined up to a common scale, enabling a unified treatment of affine geometry, infinity, and projection.

20 keywords6 linked from2 not yet writtenWritten by AI
Projective Geome…Matrix (mathemat…Computer VisionField (mathemati…Real NumberComplex NumberEquivalence Rela…Equivalence Clas…Homogeneou…

Homogeneous coordinates are a coordinate system in which a point of an nn-dimensional space is represented by n+1n+1 numbers, with tuples differing by a common nonzero factor representing the same point. They are fundamental to projective geometry: ordinary points and points at infinity can both be described using finite coordinate values. They also allow translations and perspective transformations to be expressed through matrix multiplication, making them useful in computer graphics and computer vision. (e.math.cornell.edu)

Definition

Let KK be a field, such as the real numbers or complex numbers. The projective space Pn(K)\mathbb P^n(K) consists of nonzero tuples in Kn+1K^{n+1}, identified by the equivalence relation

(X1,…,Xn,W)∼(λX1,…,λXn,λW),λ∈K∖{0}.(X_1,\ldots,X_n,W)\sim (\lambda X_1,\ldots,\lambda X_n,\lambda W), \qquad \lambda\in K\setminus\{0\}.

A point is therefore an equivalence class, conventionally written

[X1:⋯:Xn:W].[X_1:\cdots:X_n:W].

The entries are its homogeneous coordinates. The all-zero tuple is excluded: it does not determine a one-dimensional subspace. Equivalently, projective points correspond to one-dimensional linear subspaces of the vector space Kn+1K^{n+1}. (ocw.mit.edu)

For example,

[2:4:2]=[1:2:1]=[−3:−6:−3].[2:4:2]=[1:2:1]=[-3:-6:-3].

These are different representatives of one point, not three different points. The extra coordinate introduces a scale redundancy rather than an additional geometric dimension. (e.math.cornell.edu)

Affine coordinates and points at infinity

When W≠0W\neq0, division by WW gives ordinary coordinates:

[X1:⋯:Xn:W]⟼(X1W,…,XnW).[X_1:\cdots:X_n:W] \longmapsto \left(\frac{X_1}{W},\ldots,\frac{X_n}{W}\right).

Conversely, an ordinary point (x1,…,xn)(x_1,\ldots,x_n) is represented by

[x1:⋯:xn:1].[x_1:\cdots:x_n:1].

This identifies an affine space with the part of projective space where W≠0W\neq0. Recovering ordinary coordinates by division is called dehomogenization; in graphics, the corresponding operation is often called the perspective divide. (visionbook.mit.edu)

Points with W=0W=0 lie on the hyperplane at infinity. In the real projective plane, a point [a:b:0][a:b:0] represents the direction shared by parallel affine lines. Opposite vectors determine the same projective direction because [a:b:0]=[−a:−b:0][a:b:0]=[-a:-b:0]. These points have finite homogeneous coordinates but no finite affine coordinates in the chosen chart. (ocw.mit.edu)

The distinction between finite and infinite points depends on the chosen affine chart. Any coordinate that is nonzero can be normalized to 11, and the resulting n+1n+1 charts cover projective space. The set W=0W=0 is a hyperplane isomorphic to Pn−1(K)\mathbb P^{n-1}(K); it is not intrinsically distinguished until a chart has been selected. (ocw.mit.edu)

Lines, incidence, and intersections

In the projective plane, a line has an equation

aX+bY+cW=0,aX+bY+cW=0,

where (a,b,c)≠(0,0,0)(a,b,c)\neq(0,0,0). Its coefficients are themselves defined up to a common nonzero factor. Writing a point as p=(X,Y,W)Tp=(X,Y,W)^{\mathsf T} and line coefficients as ℓ=(a,b,c)T\ell=(a,b,c)^{\mathsf T}, incidence is expressed by

ℓTp=0.\ell^{\mathsf T}p=0.

For two distinct points, the line joining them is represented by their cross product:

ℓ=p1×p2.\ell=p_1\times p_2.

Similarly, the intersection of two distinct lines is

p=ℓ1×ℓ2.p=\ell_1\times\ell_2.

These formulas treat finite intersections and intersections at infinity identically. They also exhibit the symmetry between points and lines in projective geometry. (homepages.inf.ed.ac.uk)

For example, the parallel affine lines y=1y=1 and y=3y=3 have coefficient vectors

ℓ1=(0,1,−1),ℓ2=(0,1,−3).\ell_1=(0,1,-1),\qquad \ell_2=(0,1,-3).

Their cross product is (−2,0,0)(-2,0,0), so their projective intersection is [1:0:0][1:0:0], the horizontal direction at infinity. If the two lines coincide, their coefficient vectors are proportional and the cross product is zero; no unique intersection point is determined. These conclusions follow directly from the incidence formulas. (homepages.inf.ed.ac.uk)

Matrix representation of transformations

Affine transformations

An affine transformation

x′=Ax+tx'=Ax+t

can be represented in homogeneous coordinates as

(x′1)=(At0T1)(x1).\begin{pmatrix}x'\\1\end{pmatrix} = \begin{pmatrix} A&t\\ 0^{\mathsf T}&1 \end{pmatrix} \begin{pmatrix}x\\1\end{pmatrix}.

This expresses translation as part of a linear map in the larger coordinate space. A nonzero translation cannot be represented by an ordinary n×nn\times n linear transformation of xx, because every linear map fixes the origin. (cs.cmu.edu)

For instance, translation by (tx,ty)(t_x,t_y) uses

T=(10tx01ty001).T= \begin{pmatrix} 1&0&t_x\\ 0&1&t_y\\ 0&0&1 \end{pmatrix}.

Rotations, scaling, and shearing have analogous representations. Successive transformations are combined through matrix multiplication. With column-vector conventions, applying H1H_1 followed by H2H_2 gives H2H1H_2H_1; the order generally matters. Two-dimensional transformations use 3×33\times3 matrices, and three-dimensional transformations use 4×44\times4 matrices. (cs.cmu.edu)

Projective transformations

An invertible (n+1)×(n+1)(n+1)\times(n+1) matrix HH defines a projective transformation by

[p]⟼[Hp].[p]\longmapsto[Hp].

Multiplying HH by a nonzero scalar leaves this transformation unchanged. In two dimensions, writing its entries as hijh_{ij} gives

x′=h11x+h12y+h13h31x+h32y+h33,y′=h21x+h22y+h23h31x+h32y+h33.x'=\frac{h_{11}x+h_{12}y+h_{13}} {h_{31}x+h_{32}y+h_{33}}, \qquad y'=\frac{h_{21}x+h_{22}y+h_{23}} {h_{31}x+h_{32}y+h_{33}}.

Thus a linear operation on homogeneous representatives becomes a fractional transformation in affine coordinates. A zero denominator means that the transformed point lies at infinity in the target chart, not that the projective transformation is undefined. (pages.mtu.edu)

Projective transformations preserve lines and incidence, but generally do not preserve Euclidean lengths, angles, or parallelism. Consequently, homogeneous coordinates do not by themselves supply the metric structure of Euclidean space. (pages.mtu.edu)

Perspective imaging

An ideal perspective camera maps a three-dimensional point to a two-dimensional image using a 3×43\times4 matrix:

s(uv1)=P(XYZ1),P=K[R∣t].s \begin{pmatrix}u\\v\\1\end{pmatrix} = P \begin{pmatrix}X\\Y\\Z\\1\end{pmatrix}, \qquad P=K[R\mid t].

Here KK describes camera intrinsics, while RR and tt describe the change from world coordinates to camera coordinates. The factor ss accounts for the arbitrary scale of the image-point representative. Homogeneous notation packages coordinate changes and perspective projection into one matrix equation. (docs.opencv.org)

This camera projection differs from an invertible projective transformation: its matrix is rectangular, and multiple scene points along one viewing line can produce the same image point. The camera center maps to the zero vector and therefore has no defined image point. Homogeneous coordinates make these distinctions explicit rather than removing them. (16385.courses.cs.cmu.edu)

Homogeneous polynomial equations

In algebraic geometry, homogeneous coordinates are paired with homogeneous polynomials. A polynomial FF of degree dd is homogeneous when every monomial has total degree dd, giving

F(λX1,…,λW)=λdF(X1,…,W).F(\lambda X_1,\ldots,\lambda W) =\lambda^dF(X_1,\ldots,W).

Its numerical value generally depends on the chosen representative, but the condition F=0F=0 does not. Homogeneous equations therefore define well-defined subsets of projective space. (math.mit.edu)

An affine polynomial f(x1,…,xn)f(x_1,\ldots,x_n) of total degree dd can be homogenized by forming

F(X1,…,Xn,W)=Wdf(X1W,…,XnW).F(X_1,\ldots,X_n,W) = W^d f\left(\frac{X_1}{W},\ldots,\frac{X_n}{W}\right).

After expansion, this is a polynomial, including at W=0W=0. For example, the circle equation

x2+y2=1x^2+y^2=1

becomes the projective conic

X2+Y2−W2=0.X^2+Y^2-W^2=0.

Setting W=1W=1 recovers the affine equation; setting W=0W=0 identifies its points at infinity. For systems of polynomial equations, obtaining the projective closure requires care: homogenizing only a chosen list of generators can introduce unwanted components at infinity. (math.mit.edu)

Historical development

August Ferdinand Möbius introduced homogeneous coordinates in his 1827 work Der barycentrische Calcul. His approach was related to barycentric coordinates, which describe points through weights attached to reference points. Julius Plücker modified this coordinate framework in 1831, contributing to the representation now associated with the real projective plane. These developments connected geometric transformations with algebraic coordinate methods. (notes.math.ca)

Limitations and conventions

Homogeneous coordinates are redundant representations, so ordinary vector operations require interpretation. Adding arbitrary representatives does not define an intrinsic sum of projective points: replacing one representative by a scalar multiple can change the resulting point. Likewise, Euclidean distance cannot be calculated directly from arbitrary homogeneous tuples. Such operations require a selected affine chart and, where appropriate, additional metric structure. (visionbook.mit.edu)

Different conventions place the homogenizing coordinate first or last and use row or column vectors. Corresponding matrix formulas must be adjusted consistently. Most importantly, appending 11 represents only finite points in a particular affine chart; the complete coordinate system also includes nonzero tuples whose homogenizing coordinate is zero. (ocw.mit.edu)

References

  1. CSP problems 1e.math.cornell.edu
  2. 38 Representing Images and Geometry – Foundations of Computer Visionvisionbook.mit.edu
  3. 782 Arithmetic Geometry Lecture Note 13ocw.mit.edu
  4. Introduction and course overviewcs.cmu.edu
  5. Manipulating Points and Lineshomepages.inf.ed.ac.uk
  6. Geometric Transformationspages.mtu.edu
  7. Massachusetts Institute of Technology — Algebraic Geometry Notesmath.mit.edu
  8. Geometric Transformations, 1800–1855 – CMS Notesnotes.math.ca