Fact-checked by Grok 2 weeks ago

Homogeneous coordinates

Homogeneous coordinates, also known as projective coordinates, are a mathematical system for representing points and lines in , where a point in an n-dimensional space is expressed as an (n+1)- of real or numbers defined up to nonzero , such as (x_1 : x_2 : \dots : x_{n+1}). This representation extends the affine structure of by incorporating points at infinity, allowing parallel lines to intersect at a common ideal point on the line at infinity, thus unifying affine and projective transformations under linear algebra. Introduced by in his 1827 treatise Der barycentrische Calcul, homogeneous coordinates originated from barycentric methods for mass-point geometry and were later formalized in the context of by figures such as and in the early . In projective space \mathbb{P}^n, homogeneous coordinates define points as equivalence classes of nonzero vectors in \mathbb{R}^{n+1} or \mathbb{C}^{n+1}, where two vectors represent the same point if one is a scalar multiple of the other. This is a core property, enabling the embedding of the into the \mathbb{P}^2 via coordinates (x : y : 1) for finite points and (x : y : 0) for points at , which correspond to directions rather than positions. Projective transformations, represented as invertible linear maps on these coordinates, preserve incidence relations (such as ) and the , a fundamental invariant that generalizes the ratio for four collinear points. Duality in further equates points and , with a point (x_1 : \dots : x_{n+1}) dual to the hyperplane defined by the equation x_1 X_1 + \dots + x_{n+1} X_{n+1} = 0. The advantages of homogeneous coordinates lie in their computational efficiency and generality, as they linearize operations like and projection—tasks that require nonlinear formulas in Cartesian coordinates—through simple matrix multiplications. For instance, in 3D space, a point (X : Y : Z : W) dehomogenizes to (X/W, Y/W, Z/W) when W \neq 0, but accommodates vanishing when W = 0. This framework eliminates special cases in geometric algorithms, such as handling parallel intersections or clipping in rendering. Homogeneous coordinates have broad applications across and , particularly in for modeling perspective projections and affine transformations in 3D-to-2D rendering pipelines. In , they facilitate multi-camera calibration and by naturally handling image planes at infinity. Other uses include for kinematic modeling, (CAD) for surface representations, and for studying conics and quadrics via homogeneous polynomials. Their enduring influence stems from providing a rigorous, coordinate-based foundation for , bridging classical synthetic methods with modern computational techniques.

Fundamentals

Introduction

Homogeneous coordinates provide a method for representing points in , extending the affine plane to include points at . In two dimensions, a point is represented as a (x, y, z), where the affine coordinates are recovered by dividing by z when z \neq 0, and points at are included when z = 0. This system was introduced by in his 1827 work Der barycentrische Calcul, enabling the treatment of without special cases for infinite points. The primary motivation for homogeneous coordinates arises from the need to extend to the , where can intersect at points at infinity, resolving issues in perspective drawing and geometric transformations. In the , never meet, but in , this limitation is overcome by adjoining an infinite line, unifying concepts like intersections and projections under a single algebraic framework. For example, a point (x, y) in the affine plane is represented in homogeneous coordinates as (x, y, 1), allowing seamless incorporation into projective operations. A key advantage is that geometric operations, such as line intersections and perspective projections, become purely algebraic manipulations of coordinates, avoiding divisions by zero that plague affine representations.

Notation

In homogeneous coordinates, a point in the \mathbb{P}^2 is represented by a [x : y : z], where x, y, z are coordinates in a (typically the real numbers \mathbb{R}) not all zero, and the colons denote that the belongs to an under non-zero : [x : y : z] = [\lambda x : \lambda y : \lambda z] for any \lambda \neq 0. This notation embeds the affine plane as the set of points where z \neq 0. To recover the corresponding affine coordinates from a homogeneous point [x : y : z] with z \neq 0, dehomogenization is performed by dividing the first two coordinates by the third, yielding the point (x/z, y/z) in the . This process is reversible by homogenizing an affine point (u, v) to [u : v : 1]. Lines in the projective plane are represented dually by homogeneous coordinates [a : b : c], corresponding to the equation a x + b y + c z = 0, where the coefficients are defined up to scalar multiple, just as for points. A point [x : y : z] lies on the line if the incidence relation a x + b y + c z = 0 holds. Basic arithmetic operations on homogeneous coordinates respect the scaling equivalence. Scalar multiplication by \lambda \neq 0 yields \lambda [x : y : z] = [\lambda x : \lambda y : \lambda z], which represents the same point. Addition is not defined directly on points but arises in contexts like linear combinations for joining points or defining lines. Points at infinity are those with z = 0, forming the line at infinity [0 : 0 : 1] (or equivalently, the set satisfying z = 0). For example, the ideal point [1 : 0 : 0] represents the direction of the positive x-axis at infinity.

Homogeneity

The homogeneity property of homogeneous coordinates is defined by an equivalence relation: two coordinate tuples (x, y, z) and (x', y', z') in \mathbb{R}^3 \setminus \{(0,0,0)\} represent the same point in the projective plane if there exists a nonzero scalar \lambda \in \mathbb{R} such that x' = \lambda x, y' = \lambda y, and z' = \lambda z. This scale invariance means that each point corresponds to an entire ray through the origin in three-dimensional space, excluding the origin itself, thereby identifying the projective plane with the set of such rays. Geometrically, this equivalence embeds the affine plane into the through the affine chart where z = 1, mapping an affine point (x, y) to the homogeneous representative [x : y : 1]. Points with z = 0 then represent directions at , completing the projective structure without a distinguished origin or . To select a unique representative from each , normalization conventions are employed; for finite points (where z \neq 0), dividing by z yields the form [x/z : y/z : 1], aligning directly with affine coordinates. In numerical computations, an alternative is to normalize to unit norm \|(x, y, z)\| = 1 for improved against scaling-induced overflow or underflow. Incidence relations in this framework are expressed algebraically: a point [x : y : z] lies on a line [a : b : c] if and only if the determinant condition a x + b y + c z = 0 holds, equivalent to the dot product of the coordinate vectors being zero. This bilinear form captures projective incidence uniformly, independent of the chosen representatives. The zero tuple (0, 0, 0) is excluded from consideration, as it lies on every ray and fails to define a unique point in the projective space.

Generalizations

Higher Dimensions

Homogeneous coordinates generalize naturally to higher-dimensional projective spaces. In the real projective space \mathbb{RP}^n, a point is represented by a tuple of n+1 homogeneous coordinates [x_0 : x_1 : \dots : x_n], where the coordinates are defined up to equivalence under multiplication by any non-zero scalar \lambda \in \mathbb{R}, i.e., [x_0 : x_1 : \dots : x_n] = [\lambda x_0 : \lambda x_1 : \dots : \lambda x_n] for \lambda \neq 0. This construction arises from the quotient of the vector space \mathbb{R}^{n+1} \setminus \{\mathbf{0}\} by the action of scalar multiplication, providing a compactification of the affine space \mathbb{R}^n. The embedding of the \mathbb{R}^n into \mathbb{RP}^n occurs via the where the last coordinate is 1, mapping an (y_1, \dots, y_n) to [1 : y_1 : \dots : y_n]. , which compactify the by adding directions of , lie on the x_n = 0. in \mathbb{RP}^n, which are projective subspaces of n-1, are dually represented by linear equations of the form \sum_{i=0}^n a_i x_i = 0, where the coefficients (a_0, \dots, a_n) are defined up to scalar multiple and not all zero. In three dimensions, this framework is particularly useful for projective geometry, where an affine point (x, y, z) \in \mathbb{R}^3 is represented as [x : y : z : 1], and points at infinity take the form [x : y : z : 0]. For instance, the plane ax + by + cz + d = 0 becomes a x_0 + b x_1 + c x_2 + d x_3 = 0 in homogeneous coordinates [x_0 : x_1 : x_2 : x_3]. The space \mathbb{RP}^3 has dimension 3, in contrast to the affine \mathbb{R}^3, allowing unified treatment of finite points and ideal points at infinity.

Projective Spaces

The real projective space \mathbb{RP}^n over the field \mathbb{R} is defined as the set of all lines through the origin in \mathbb{R}^{n+1}, or equivalently, as the quotient space (\mathbb{R}^{n+1} \setminus \{0\}) / \sim, where x \sim y if y = \lambda x for some \lambda \in \mathbb{R} \setminus \{0\}. More generally, for an arbitrary field K, the projective space \mathbb{P}^n(K) is the quotient of K^{n+1} \setminus \{0\} by the action of scalar multiplication by nonzero elements of K, representing the set of 1-dimensional subspaces of K^{n+1}. Points in this space are represented using homogeneous coordinates [x_0 : \cdots : x_n], where the coordinates are defined up to scaling by nonzero scalars in K, and at least one x_i \neq 0. The complex projective space \mathbb{CP}^n extends this construction over the field \mathbb{C}, defined as the quotient of \mathbb{C}^{n+1} \setminus \{0\} by the equivalence x \sim y if y = \alpha x for \alpha \in \mathbb{C}^\times. Homogeneous coordinates for points in \mathbb{CP}^n are denoted [z_0 : \cdots : z_n], where (z_0, \dots, z_n) \in \mathbb{C}^{n+1} \setminus \{0\} and scaling by nonzero complex numbers identifies equivalent representations. This space is compact and serves as a model for complex lines in \mathbb{C}^{n+1}. Homogeneous coordinates also parametrize more general projective varieties, such as and . The \mathrm{Gr}(k, n) of k-dimensional subspaces of K^n embeds into \mathbb{P}^N (with N = \binom{n}{k} - 1) via the , where x_I = \det(A_I) for index sets I of size k serve as homogeneous coordinates on this subvariety. Flag varieties, which parametrize chains of subspaces (), are homogeneous spaces G/P under a G and parabolic subgroup P; they embed projectively using analogous coordinate systems derived from exterior powers, such as for partial . Topologically, \mathbb{RP}^n is a compact smooth manifold of dimension n. In particular, \mathbb{RP}^n is homeomorphic to the quotient of the n-sphere S^n by the identification of antipodal points, via the continuous bijection induced by the projection \rho: S^n \to \mathbb{RP}^n, which is a homeomorphism since S^n / \{\pm 1\} is compact and \mathbb{RP}^n is Hausdorff. For example, \mathbb{RP}^2 is homeomorphic to S^2 with antipodes identified, yielding a non-orientable surface. Algebraic varieties in projective space are defined as zero loci of homogeneous polynomials in the homogeneous coordinates. Specifically, for a set S of homogeneous polynomials in K[x_0, \dots, x_n], the projective algebraic set V_\mathbb{P}(S) = \{ [a_0 : \cdots : a_n] \in \mathbb{P}^n(K) \mid f(a_0, \dots, a_n) = 0 \ \forall f \in S \} consists of points where the polynomials vanish, invariant under scaling due to the homogeneity of the equations. A is an irreducible such set, and the ideal of a projective algebraic set Y \subseteq \mathbb{P}^n(K) is generated by homogeneous polynomials.

Alternative Definitions

One alternative definition of homogeneous coordinates arises in the axiomatic construction of the , where it is viewed as the set of lines passing through the origin in a three-dimensional over a , such as the real numbers \mathbb{R}^3. Each point in this projective plane \mathbb{P}^2 corresponds to a one-dimensional (or ) spanned by a nonzero vector (x, y, z)^T \in \mathbb{R}^3 \setminus \{\mathbf{0}\}, with equivalence under scalar multiplication identifying points on the same ray. This approach emphasizes the projective structure without initially specifying coordinate tuples, treating points as equivalence classes of vectors up to scaling. In , homogeneous coordinates are often defined through representations, where points are encoded as columns of transformation matrices to unify affine and projective operations. A point \mathbf{x} = (x, y, 1)^T in the plane is augmented to a homogeneous column vector \tilde{\mathbf{x}} = (x, y, 1)^T, and geometric transformations, including translations, rotations, scalings, and projections, are represented by $3 \times 3 matrices acting on these vectors via \tilde{\mathbf{x}}' = H \tilde{\mathbf{x}}, where H is defined up to scale. This formulation allows translations to be incorporated as affine components in the (e.g., the third column), enabling a single to handle all projective transformations efficiently. From a modern algebraic geometry perspective, homogeneous coordinates emerge in the sheaf-theoretic construction of , where \mathbb{P}^n is defined as a glued from affine charts via homogeneous transition functions. Specifically, the standard affine open sets U_i = \{ [x_0 : \cdots : x_n] \mid x_i \neq 0 \} are isomorphic to \mathbb{A}^n with coordinates y_j = x_j / x_i for j \neq i, and the structure sheaf \mathcal{O}_{\mathbb{P}^n} is defined such that sections over U_i are regular functions on the affine chart, glued compatibly using the homogeneous grading of the coordinate ring \mathbb{k}[x_0, \dots, x_n]. This view abstracts homogeneous coordinates as elements of the Proj functor applied to graded rings, focusing on homogeneous ideals rather than explicit tuples. These alternative definitions contrast with the standard tuple-based notation by inherently avoiding explicit scaling operations: the axiomatic ray representation and matrix column vectors treat points as directions or linear actions up to inherent equivalence, and the sheaf-theoretic approach works with graded ideals and local sections where homogeneity ensures consistent gluing without manual dehomogenization.

Geometric Interpretations

Line Coordinates and Duality

In homogeneous coordinates, a line in the projective plane \mathbb{P}^2 is represented by a triple [l : m : n], not all zero, corresponding to the linear equation l x + m y + n z = 0, where [x : y : z] denotes the coordinates of a point on the line. This representation is dual to that of points, as the coordinates of the line are the coefficients of the variables in the point equation, and the incidence relation—a point lying on a line—manifests as the vanishing of the dot product between their homogeneous coordinate vectors. The principle of projective duality underscores the symmetry between points and lines in \mathbb{P}^2: under any projective transformation, points map to points and lines to lines, while preserving the incidence structure, such that a point incident to a line corresponds to the dual line incident to the dual point. This duality interchanges the roles of points and lines in theorems of projective geometry; for instance, the statement that two points determine a unique line dualizes to the assertion that two lines determine a unique intersection point. Consequently, geometric objects defined by points, such as conics as loci of points satisfying a quadratic equation, have dual counterparts defined by lines. In the dual setting, a conic in line coordinates describes the envelope of lines tangent to the original point conic, given by a quadratic form on the line coordinates [l : m : n], such as the equation \mathbf{l}^T A^{-1} \mathbf{l} = 0, where A is the matrix of the primal conic \mathbf{p}^T A \mathbf{p} = 0 and \mathbf{p} = [x : y : z]. This dual conic represents the set of tangent lines to the primal conic, transforming the pointwise locus into a line envelope under duality. The pole-polar relation further exemplifies this symmetry with respect to a conic: the polar of a point P is the unique line consisting of the points of tangency of the tangents drawn from P to the conic, while the pole of a line l is the intersection point of the tangents from points on l to the conic. For a point P exterior to the conic, the polar line joins the contact points of the two tangents from P, and this relation is symmetric, as the polar of any point on the polar line passes through P. A practical computation arising from duality is the intersection of two lines. Given two lines with homogeneous coordinates \mathbf{l} = [l : m : n] and \mathbf{l}' = [l' : m' : n'], their intersection point has coordinates given by the cross product: \mathbf{p} = \mathbf{l} \times \mathbf{l}' = [m n' - n m' : n l' - l n' : l m' - m l']. This yields the unique point in \mathbb{P}^2 where the lines meet, including the point at infinity if the lines are parallel in the affine plane. For example, the lines [1 : 0 : 0] (the yz-plane line) and [0 : 1 : 0] (the xz-plane line) intersect at [0 : 0 : 1], the origin in affine terms.

Plücker Coordinates

Plücker coordinates offer a homogeneous representation for lines in three-dimensional , embedding them as points in a five-dimensional subject to a constraint. Given a line passing through two distinct points A = [x_1 : y_1 : z_1 : 1] and B = [x_2 : y_2 : z_2 : 1] in homogeneous coordinates, the are defined as the six 2×2 minors of the 4×2 matrix formed by stacking the column vectors of A and B: \begin{pmatrix} x_1 & x_2 \\ y_1 & y_2 \\ z_1 & z_2 \\ 1 & 1 \end{pmatrix}. These minors are labeled as p_{ij} = a_i b_j - a_j b_i for $0 \leq i < j \leq 3, where indices 0, 1, 2, 3 correspond to the homogeneous coordinates (with the last being the homogenizing coordinate). The six coordinates naturally partition into a direction vector (l, m, n) = (p_{01}, p_{02}, p_{03}), representing the direction of the line, and a moment vector (p, q, r) = (p_{23}, p_{31}, p_{12}), capturing the position relative to the origin via the cross product of a point on the line with the direction vector. These components satisfy the fundamental quadratic relation l p + m q + n r = 0, which enforces the geometric consistency of the line representation. Due to their homogeneous nature, the coordinates are defined up to scalar multiple, lying on the Klein quadric hypersurface in \mathbb{RP}^5, a degree-2 variety that parametrizes all lines in \mathbb{RP}^3. Incidence relations between lines, such as determining whether two lines intersect, are elegantly expressed using bilinear forms on their . For two lines with coordinates ({\mathbf{l}}_1, {\mathbf{m}}_1) and ({\mathbf{l}}_2, {\mathbf{m}}_2), they intersect if and only if the reciprocal product {\mathbf{l}}_1 \cdot {\mathbf{m}}_2 + {\mathbf{l}}_2 \cdot {\mathbf{m}}_1 = 0, providing a projective invariant for line geometry computations. This system was introduced by Julius Plücker in his 1865 memoir "On a New Geometry of Space," where he developed line coordinates to study complexes of lines, laying foundational work for modern projective line geometry.

Circular Points

In projective geometry over the complex numbers, the circular points at infinity, also known as isotropic points, are defined as the pair of points I = [1 : i : 0] and J = [1 : -i : 0] lying on the line at infinity [x : y : 0]. These points arise as the non-trivial solutions to the equation x^2 + y^2 = 0 in homogeneous coordinates, where substituting z = 0 yields the roots corresponding to the directions with imaginary slopes i and -i. A key role of the circular points is in characterizing circles within the projective framework: any circle in the Euclidean plane, when extended projectively, intersects the line at infinity precisely at I and J. This property allows circles to be defined as those conics that pass through these two fixed points, distinguishing them from general conics and enabling a uniform projective treatment of circular geometry. The circular points also facilitate the incorporation of metric concepts like angles and orthogonality into projective geometry. Specifically, the angle \theta between two lines with Plücker coordinates D_1 and D_2 is determined by the cross-ratio [D_1, D_2, D_I, D_J] = e^{i 2\theta}, where D_I and D_J are the lines joining the origin to I and J; lines are perpendicular when this cross-ratio equals -1, corresponding to a harmonic division with respect to I and J. By introducing these complex points at infinity, the Euclidean metric structure is embedded into the otherwise metric-free projective plane, allowing properties such as perpendicularity and angle measurement to be expressed projectively while contrasting with the purely incidence-based nature of real projective geometry. For example, the homogeneous equation of a circle with center [a : b : 1] and radius r takes the form (x - a z)^2 + (y - b z)^2 = r^2 z^2, which simplifies to x^2 + y^2 - 2 a x z - 2 b y z + (a^2 + b^2 - r^2) z^2 = 0 and inherently passes through I and J upon setting z = 0.

Barycentric Coordinates

Barycentric coordinates provide a method to represent points in the plane of a triangle using weights associated with its vertices, forming a specialized instance of homogeneous coordinates. For a point P in the plane of triangle ABC, the barycentric coordinates are given by (a : b : c), where a, b, and c are proportional to the signed areas of the subtriangles PBC, PCA, and PAB, respectively. In the affine case, these are normalized such that a + b + c = 1, yielding the position vector \mathbf{P} = a\mathbf{A} + b\mathbf{B} + c\mathbf{C}, where \mathbf{A}, \mathbf{B}, and \mathbf{C} are the position vectors of the vertices. These coordinates share the same homogeneous form as general homogeneous coordinates, allowing scaling by any nonzero factor without altering the represented point, which aligns with the projective nature of homogeneity. Unlike general homogeneous coordinates, barycentric ones are interpreted physically as masses placed at the vertices A, B, and C, such that the center of mass coincides with P; the total mass is a + b + c, and the ratios a : b : c determine the balance. This mass analogy extends the coordinate system naturally to , where the plane is embedded in a higher-dimensional space. Key properties include the normalization condition for interior points, where all coordinates are positive and sum to 1, while exterior points may have one or more negative coordinates, reflecting signed areas beyond the triangle boundaries. For instance, points on the sides have one coordinate equal to zero, such as a = 0 on side BC. The centroid of the triangle has coordinates (1 : 1 : 1), corresponding to equal masses at each vertex. To convert from Cartesian coordinates, the barycentric coordinates are computed using area ratios: a = \frac{[\triangle PBC]}{[\triangle ABC]}, b = \frac{[\triangle PCA]}{[\triangle ABC]}, and c = \frac{[\triangle PAB]}{[\triangle ABC]}, where [\cdot] denotes the signed area. The signed area of a triangle with vertices (x_1, y_1), (x_2, y_2), (x_3, y_3) is \frac{1}{2} \det \begin{vmatrix} x_1 & y_1 & 1 \\ x_2 & y_2 & 1 \\ x_3 & y_3 & 1 \end{vmatrix}, enabling direct computation from vertex positions. In triangle geometry, barycentric coordinates facilitate interpolation between points; for example, the midpoint of segment AB has coordinates (1 : 1 : 0), and more generally, a point dividing P = (u : v : w) and Q = (u' : v' : w') in the ratio p : q has coordinates (q u + p u' : q v + p v' : q w + p w'). They also provide a homogeneous formulation of Ceva's theorem: for cevians AD, BE, and CF to be concurrent, the condition \frac{BD}{DC} \cdot \frac{CE}{EA} \cdot \frac{AF}{FB} = 1 follows from the line equations in barycentric form, such as the line AD satisfying z = k y for some k.

Trilinear Coordinates

Trilinear coordinates constitute a homogeneous coordinate system for points in the plane of a reference triangle ABC, where a point P is represented by the triple (x : y : z), with x, y, and z proportional to the signed distances from P to the sides BC, CA, and AB, respectively. The use of signed distances allows points both inside and outside the triangle to be represented, with positive signs indicating the same side as the triangle's interior and negative signs the opposite side. As homogeneous coordinates, the ratios remain invariant under positive scalar multiplication, so (kx : ky : kz) denotes the same point for any k > 0. The relate directly to through the side lengths of the . Specifically, if (x : y : z) are the and a = BC, b = CA, c = AB are the side lengths, the corresponding homogeneous (A : B : C) are given by (a x : b y : c z). Conversely, the can be derived from as x : y : z = \frac{A}{a} : \frac{B}{b} : \frac{C}{c}, up to homogeneous scaling. This connection arises because are proportional to areas of sub-, while scale these by the reciprocal of the side lengths to yield distances. Certain triangle centers have simple expressions in trilinear coordinates. The incenter, the intersection of the angle bisectors and center of the incircle, has coordinates (1 : 1 : 1), reflecting its equal perpendicular distances to all sides. The orthocenter, the intersection of the altitudes, has coordinates (\sec A : \sec B : \sec C), where A, B, and C are the angles at vertices A, B, and C, respectively; this follows from the signed distances along the altitudes being proportional to the secants of the angles. Isogonal conjugates, pairs of points related by reflection of their cevians over the angle bisectors, exhibit a particularly elegant transformation in trilinear coordinates. The isogonal conjugate of a point with trilinear coordinates (\alpha : \beta : \gamma) has coordinates (1/\alpha : 1/\beta : 1/\gamma). This reciprocal property simplifies the study of cevian nests and symmedians, as the transformation preserves the projective structure while inverting the distance proportions to the sides.

Applications

Coordinate Transformations

Homogeneous coordinates provide a unified framework for representing coordinate transformations in , particularly through projective transformations. In the real \mathbb{RP}^2, a point is represented by a nonzero column \mathbf{x} = \begin{pmatrix} x \\ y \\ z \end{pmatrix} \in \mathbb{R}^3, defined up to , so \mathbf{x} \sim \lambda \mathbf{x} for \lambda \neq 0. A projective transformation is induced by an invertible 3×3 A, mapping the point [\mathbf{x}] to [A \mathbf{x}], where the result is again taken up to scale. This linear action on homogeneous coordinates preserves and the of points and lines. The collection of all such transformations forms the projective general linear group \mathrm{PGL}(3, \mathbb{R}), which consists of equivalence classes of invertible matrices under . Elements of \mathrm{PGL}(3, \mathbb{R}) are known as homographies and maintain the projective structure, including the ratios of areas in certain configurations but not distances or angles. To convert from affine coordinates (u, v) in the to homogeneous coordinates, the vector is formed as \begin{pmatrix} u \\ v \\ 1 \end{pmatrix}, embedding the affine as the subset where the third coordinate is nonzero. Affine transformations then correspond to projective transformations with the specific form where the bottom row of A is (0, 0, 1). A key application in imaging is the perspective projection matrix for pinhole camera models, which maps 3D points in \mathbb{RP}^3 to 2D points in \mathbb{RP}^2. For a canonical camera with focal length f and origin at the optical center, the projection matrix P is the 3×4 matrix P = \begin{pmatrix} f & 0 & 0 & 0 \\ 0 & f & 0 & 0 \\ 0 & 0 & 1 & 0 \end{pmatrix}, acting on a 3D point \mathbf{X} = \begin{pmatrix} X \\ Y \\ Z \\ 1 \end{pmatrix} to yield \begin{pmatrix} fX \\ fY \\ Z \end{pmatrix} in homogeneous image coordinates, with dehomogenized coordinates (fX/Z, fY/Z). This formulation captures the perspective foreshortening effect central to computer vision. Projective transformations preserve fundamental invariants such as the cross-ratio of four collinear points, defined for points with parameters a, b, c, d as (a,b;c,d) = \frac{(c-a)/(d-a)}{(c-b)/(d-b)}. This quantity remains unchanged under any projective map, serving as a complete invariant for the projective equivalence of ordered quadruples on a line and enabling the classification of projective configurations.

Computer Graphics and Vision

In computer graphics, homogeneous coordinates facilitate clipping and perspective division by representing points in four dimensions as (x, y, z, w), where the w-coordinate encodes depth information for projective transformations. During the rendering pipeline, vertices are transformed into clip space using a projection matrix, and clipping occurs against the canonical view volume defined by -w \leq x, y, z \leq w, ensuring efficient culling of geometry outside the frustum before perspective division normalizes coordinates by dividing x, y, z by w to obtain normalized device coordinates (NDC). This approach avoids nonlinear operations during clipping, as the homogeneous representation linearizes perspective effects. Viewport transformations in graphics pipelines, such as those in , employ 4x4 projection matrices to map world coordinates to screen space, incorporating or orthographic projections via homogeneous coordinates. For instance, the projection matrix scales and shears coordinates to fit the near and far clipping planes, producing a w-component that varies with depth for realistic foreshortening. These matrices handle the full transformation chain—from model-view to clip space—enabling hardware-accelerated rendering on GPUs. A key advantage of homogeneous coordinates in both and is their ability to unify translations, rotations, and projections through 4x4 multiplications, simplifying affine and projective operations that would otherwise require separate handling in Cartesian . This -based framework supports efficient composition of transformations, such as camera movements and scene scaling, without switches. In , homogeneous coordinates enable the fundamental matrix to model , which relates corresponding points between two images from different viewpoints by enforcing the epipolar constraint. The fundamental matrix F satisfies \mathbf{x}'^T F \mathbf{x} = 0 for matching points \mathbf{x} and \mathbf{x}' in homogeneous form, capturing relative camera pose and intrinsic parameters to constrain stereo correspondence searches along epipolar lines. This representation is essential for tasks like structure-from-motion and . For example, in ray tracing, intersections between and primitives like triangles are solved algebraically using homogeneous lines, where a is parameterized as a joined to an origin, allowing dual representations of points and planes for robust geometric queries without special cases for parallel . This method computes barycentric coordinates in for efficient hit testing.