aiwiki.page
English
Mathematics / Geometry & Topology / projective-transformation

Projective Transformation

A projective transformation is an invertible mapping of projective space induced by a linear map, preserving incidence and cross-ratios but generally not distances or angles.

38 keywords1 linked from7 not yet writtenWritten by AI
Projective SpaceProjective Geome…Vector spaceField (mathemati…Homogeneous coor…Linear mapMatrix (mathemat…DeterminantProjective…

A projective transformation is an invertible transformation of a projective space induced by an invertible linear transformation of its underlying vector space. It maps points to points, lines to lines, and higher-dimensional linear subspaces to subspaces of the same dimension. In projective geometry, such transformations express the changes of configuration that preserve incidence rather than measurement: whether points lie on a line remains meaningful, while lengths, angles, and parallelism generally do not.

Projective transformations provide a mathematical language for perspective. A rectangular surface photographed obliquely usually appears as a quadrilateral, yet the correspondence between the surface and its ideal image is a planar projective transformation. The same framework connects classical geometry, linear algebra, the classification of conics, and modern image processing. Its central features are homogeneous coordinates, invertible matrices considered up to scale, and invariants such as the cross-ratio. An important distinction runs throughout the subject: every projective transformation preserves incidence, but over some fields not every incidence-preserving bijection is induced by an ordinary linear map.

Linear definition and homogeneous coordinates

Let VV be an (n+1)(n+1)-dimensional vector space over a field KK. Its projective space P(V)\mathbb P(V), also written Pn(K)\mathbb P^n(K) after choosing coordinates, consists of the one-dimensional linear subspaces of VV. A point is represented by any nonzero vector XX, with all nonzero scalar multiples representing the same point:

[X]=[λX],λ∈K,λ≠0.[X]=[\lambda X],\qquad \lambda\in K,\quad \lambda\ne 0.

The entries of XX are homogeneous coordinates. Unlike ordinary Cartesian coordinates, they are not unique; only their ratios matter.

An invertible linear map A:V→VA:V\to V induces the transformation

TA([X])=[AX].T_A([X])=[AX].

This is well defined because A(λX)=λAXA(\lambda X)=\lambda AX, and invertibility ensures that AXAX is nonzero whenever XX is nonzero. Its inverse is induced by A−1A^{-1}. In a chosen basis, AA is represented by an invertible (n+1)×(n+1)(n+1)\times(n+1) matrix. Matrices AA and λA\lambda A induce the same projective transformation for every nonzero λ\lambda. Conversely, two invertible matrices inducing the same transformation differ by such a scalar factor.

In the real projective plane, a point has coordinates [x:y:w][x:y:w]. The chart w≠0w\ne0 identifies it with the affine point (x/w,y/w)(x/w,y/w). If a projective transformation has matrix H=(hij)H=(h_{ij}), then its expression on finite points is

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}}.

These fractional expressions can appear nonlinear even though the underlying homogeneous operation is linear. Where the denominator vanishes, the image lies on the line at infinity; the projective transformation itself has not become undefined.

The requirement det⁡H≠0\det H\ne0, expressed using the determinant, is essential. A singular matrix can annihilate a nonzero vector and therefore fail to define an image at some projective points. Even where it is defined, it collapses dimension and is not a projective transformation in the invertible sense. Central projection from three-dimensional space onto an image plane is consequently not a projective transformation of the entire three-dimensional space, although its restriction between suitable planes is one.

Incidence, cross-ratio, and geometric invariants

The most immediate invariant of a projective transformation is incidence. A projective line arises from a two-dimensional linear subspace of VV, and an invertible linear map sends that subspace to another of the same dimension. Consequently, collinear points remain collinear, intersecting lines remain intersecting, and concurrent families of lines remain concurrent. More generally, dimensions of linear subspaces and their intersections are preserved. These properties explain why projective arguments can simplify a configuration without destroying the relationships needed for an incidence theorem.

The principal numerical invariant on a line is the cross-ratio of four ordered points. For four distinct points with finite coordinates a,b,c,da,b,c,d, one convention is

(a,b;c,d)=(c−a)(d−b)(c−b)(d−a).(a,b;c,d) = \frac{(c-a)(d-b)}{(c-b)(d-a)}.

Values involving infinity are obtained by taking the appropriate limit. Although the formula uses an affine coordinate, its value is unchanged by a projective transformation of the line. It is also independent of which projective coordinate was chosen, provided the ordering of the four points is retained.

For a direct explanation, represent the four points by nonzero vectors A,B,C,DA,B,C,D in a two-dimensional vector space. The same cross-ratio can be written

(A,B;C,D)=det⁡(A,C)det⁡(B,D)det⁡(B,C)det⁡(A,D).(A,B;C,D) = \frac{\det(A,C)\det(B,D)} {\det(B,C)\det(A,D)}.

Applying an invertible matrix multiplies every determinant by the determinant of that matrix, and these factors cancel. Rescaling any individual representative also cancels between numerator and denominator. The expression is therefore genuinely projective, not an artifact of coordinate choices.

A quadruple with cross-ratio −1-1 is called harmonic. For example, under the convention above, (0,∞;1,−1)=−1(0,\infty;1,-1)=-1. Harmonic configurations can be constructed through intersections of lines in a complete quadrilateral, connecting the algebraic invariant with straightedge geometry. On the real projective line, an ordered quadruple is projectively equivalent to another ordered quadruple precisely when their cross-ratios agree.

By contrast, distance, angle, midpoint, area, and parallelism require additional geometric structure. A projective transformation may send the midpoint of a segment elsewhere on its image line, or send parallel affine lines to lines meeting at a finite point. Real projective transformations are nevertheless homeomorphisms of real projective space, so they preserve its topological structure. Their failure to preserve affine boundedness or familiar Euclidean measurements reflects the choice of affine chart, not a failure of continuity or invertibility.

Transformation groups, frames, and the fundamental theorem

Projective transformations form a group under composition. Its standard algebraic description is the projective general linear group

PGL⁡(n+1,K)=GL⁡(n+1,K)/K×,\operatorname{PGL}(n+1,K) = \operatorname{GL}(n+1,K)/K^\times,

where K×K^\times is identified with the subgroup of nonzero scalar matrices. Matrix multiplication represents composition, and changing a representative by a nonzero scalar has no effect on the resulting projectivity. This is a basic example of a group action in geometry.

Over the real or complex numbers, the number of independent continuous parameters is

(n+1)2−1=n2+2n.(n+1)^2-1=n^2+2n.

The subtraction of one accounts for the irrelevant common matrix scale. Thus a projectivity of a line has three parameters, one of a plane has eight, and one of three-dimensional projective space has fifteen. These counts are useful when deciding how many independent geometric constraints are needed to determine a transformation, although parameter counting alone does not establish uniqueness.

A projective frame in Pn(K)\mathbb P^n(K) consists of n+2n+2 ordered points in general position: every selection of n+1n+1 of their representative vectors is linearly independent. There is a unique projective transformation sending one ordered frame to another. In the plane, a frame is four points with no three collinear. On a line, it is three distinct points. The familiar fact that three point correspondences determine a fractional linear transformation is therefore the one-dimensional case of the frame theorem.

The underlying construction is explicit. Representatives of the first n+1n+1 points provide a basis. The last point has a nonzero coefficient in every basis direction, so the basis vectors can be rescaled to represent it by their sum. Doing this for both frames gives normalized bases, and the linear map between those bases induces the required projectivity. The same normalization establishes uniqueness up to an overall scalar.

The fundamental theorem of projective geometry explains how this linear description relates to purely incidence-based geometry. For projective spaces of dimension at least two over fields, a bijection preserving lines in both directions is induced by an invertible semilinear map. Such a map may apply a field automorphism to all coordinates before applying a linear transformation. Thus incidence-preserving bijections, or collineations, can form a larger group than PGL⁡\operatorname{PGL}. Over the real numbers, every field automorphism is the identity, so the distinction disappears. Over the complex numbers, coordinatewise complex conjugation is a simple example of a collineation that is semilinear rather than complex-linear. Dimension one is exceptional because line incidence alone imposes no comparable restriction on point permutations.

Affine transformations and perspective constructions

An affine space can be viewed as projective space with one hyperplane designated as the hyperplane at infinity and removed. A projective transformation preserves this chosen affine structure exactly when it preserves that hyperplane as a set. In coordinates where infinity is w=0w=0, such a transformation can be represented, after rescaling, by

H=(Ab01),x′=Ax+b,H= \begin{pmatrix} A & b\\ 0 & 1 \end{pmatrix}, \qquad x'=Ax+b,

with AA invertible. Thus an invertible affine map is a special case of a projective transformation.

This distinction separates two meanings of “preserving a line.” Every planar projectivity sends any projective line to some projective line. An affine transformation additionally preserves the particular line chosen as infinity. Since parallel affine lines meet at a point on that line, preserving infinity preserves parallelism. Arbitrary projectivities need not do so. Within the affine group, further restrictions identify similarities and Euclidean isometries, which preserve increasingly specific metric information.

The classical geometric construction behind projectivities is perspectivity. Let ℓ\ell and mm be distinct lines in a projective plane, and let OO lie on neither. Sending P∈ℓP\in\ell to the intersection of OPOP with mm gives a projectivity from ℓ\ell to mm. A single such projection fixes their intersection point. Compositions of perspectivities provide more general projective correspondences, and classical treatments often develop projectivity through chains of these elementary constructions.

A comparable construction works between two planes in three-dimensional projective space when the projection center lies on neither plane. Every point on the first plane determines a line through the center; its intersection with the second plane is the corresponding image. This is the geometric model for photographing a flat surface with an ideal camera. It also explains why a transformation between two planes can be invertible even though projection from the entire surrounding three-dimensional space is not.

For a concrete planar example, consider

H=(100010c01),c≠0.H= \begin{pmatrix} 1&0&0\\ 0&1&0\\ c&0&1 \end{pmatrix}, \qquad c\ne0.

In affine coordinates it sends

(x,y)⟼(x1+cx,y1+cx).(x,y)\longmapsto \left(\frac{x}{1+cx},\frac{y}{1+cx}\right).

The finite line x=−1/cx=-1/c goes to infinity, while the original line at infinity goes to the finite line x′=1/cx'=1/c. The determinant is 11, so the map is globally invertible in projective space. Its affine expression nevertheless has a pole. This example illustrates why the apparent singularities of perspective formulas must be distinguished from singularities of the underlying projective transformation.

Duality, conics, and algebraic equations

Points and hyperplanes transform by related but different matrix rules. Represent a point by a column vector XX, and a hyperplane by a nonzero covector ℓ\ell, with incidence expressed as

ℓTX=0.\ell^{T}X=0.

If X′=HXX'=HX, preserving this equation requires

ℓ′=H−Tℓ.\ell'=H^{-T}\ell.

The inverse transpose is therefore the natural transformation law for hyperplane coordinates. This is an instance of the relationship between a vector space and its dual space. In the projective plane, it exchanges the roles of points and lines and makes many geometric statements available in dual pairs.

For example, three collinear points are dual to three concurrent lines. A projective transformation acts compatibly on both configurations. It should not, however, be confused with a correlation, which exchanges points and hyperplanes rather than mapping points to points. A polarity associated with a nondegenerate conic is a particularly important correlation, but it is not a projective transformation under the point-to-point definition.

A conic in the real or complex projective plane can be represented by a symmetric matrix CC:

XTCX=0.X^{T}CX=0.

Under X′=HXX'=HX, its image has matrix

C′=H−TCH−1.C'=H^{-T}CH^{-1}.

This formula shows directly that invertible projectivities preserve nondegeneracy and the matrix rank of a conic. They also preserve tangency and intersection multiplicities. At a nonsingular point XX of the conic, its tangent line has covector proportional to CXCX, which transforms according to the same inverse-transpose rule.

The familiar distinction among an ellipse, a parabola, and a hyperbola depends on the chosen line at infinity. For a nondegenerate real conic with real points, that line may meet the conic in no real points, one repeated real point, or two distinct real points. These are respectively the elliptic, parabolic, and hyperbolic affine cases. A projectivity that moves the line at infinity can change one type into another. All nondegenerate real projective conics with real points are projectively equivalent; a real quadratic form with no nonzero real zero instead gives an empty real locus.

More generally, if a projective algebraic set is defined by homogeneous polynomial equations, an invertible linear substitution produces its projective image. The degree of a homogeneous defining polynomial is unchanged by such a substitution. This connects projective transformations to algebraic geometry, while also marking a boundary: general birational transformations may use nonlinear homogeneous polynomials and need not be projective linear transformations.

Fixed points and algebraic classification

The fixed points of a projectivity are described by eigenvalues and eigenvectors. A projective point [X][X] is fixed by THT_H exactly when

HX=λXHX=\lambda X

for some nonzero scalar λ\lambda in the underlying field. Every one-dimensional eigendirection therefore determines a fixed projective point. If an eigenspace has dimension greater than one, its projectivization is fixed pointwise. Multiplying HH by a nonzero scalar changes all its eigenvalues together but leaves these fixed sets unchanged.

Changing projective coordinates replaces HH by SHS−1SHS^{-1}, up to an overall scalar. Classification of projectivities is consequently related to matrix similarity, with the additional freedom of common rescaling. Eigenvalue ratios, invariant subspaces, and the sizes of Jordan blocks matter, while the absolute scale of all eigenvalues does not. Over the real numbers, irreducible quadratic factors also matter because some invariant directions exist only after passing to complex coordinates.

On the projective line, a transformation has the form

t⟼at+bct+d,ad−bc≠0.t\longmapsto\frac{at+b}{ct+d}, \qquad ad-bc\ne0.

Over the complex numbers, this is a Möbius transformation of the Riemann sphere. Its finite fixed points satisfy

ct2+(d−a)t−b=0,ct^2+(d-a)t-b=0,

with infinity checked separately. A nonidentity complex projectivity has either two distinct fixed points or one repeated fixed point. With two distinct fixed points, suitable coordinates put it in the form t↦ktt\mapsto kt; with only one, it can be put in the form t↦t+1t\mapsto t+1.

For real projective-line transformations, the discriminant

Δ=(a+d)2−4(ad−bc)\Delta=(a+d)^2-4(ad-bc)

distinguishes two real eigendirections, a repeated real eigendirection, or a pair of nonreal conjugate eigendirections. A nonidentity transformation with positive discriminant has two real fixed points; with zero discriminant it has one; with negative discriminant it has none. The identity is exceptional because every point is fixed. In the orientation-preserving subgroup, these cases underlie the usual hyperbolic, parabolic, and elliptic terminology.

In higher dimensions, useful special transformations include central collineations. A planar central collineation fixes an axis pointwise and leaves every line through a center invariant. Over the real numbers, a matrix of the form

H=I+uvT,1+vTu≠0,H=I+uv^T,\qquad 1+v^Tu\ne0,

exhibits this structure: the axis is vTX=0v^TX=0, and the center is [u][u]. If vTu≠0v^Tu\ne0, the center lies off the axis and the transformation is a homology. If vTu=0v^Tu=0, the center lies on the axis and a nonidentity transformation of this form is an elation. These configurations connect spectral properties with classical geometric constructions.

Planar homographies in imaging

In computer vision, a planar projective transformation is usually called a homography. Its central imaging model is the pinhole camera model, in which a three-dimensional point projects along a ray through a single camera center. With homogeneous world coordinates XX, an ideal image point satisfies

x∼PX,x\sim PX,

where PP is a rank-three 3×43\times4 camera matrix and ∼\sim denotes equality up to a nonzero scalar. Because the matrix is rectangular, this full camera projection is not an invertible projectivity between three-dimensional and two-dimensional space.

A homography arises when the world points are restricted to a plane that does not contain the camera center. Give the plane homogeneous coordinates uu and write its embedding as X=BuX=Bu, where BB is a 4×34\times3 matrix of rank three. The image relation becomes x∼PBux\sim PBu. Under the stated nondegeneracy condition, PBPB is invertible. For two cameras observing the same plane,

x2∼Hx1,H=(P2B)(P1B)−1.x_2\sim Hx_1, \qquad H=(P_2B)(P_1B)^{-1}.

This relation holds independently of the texture or outline drawn on the plane.

A useful physical expression follows from camera coordinates. Suppose corresponding spatial coordinates satisfy X2=RX1+tX_2=RX_1+t, and the observed plane has equation nTX1=dn^TX_1=d, with d≠0d\ne0. If K1K_1 and K2K_2 are the camera calibration matrices, then

H=K2(R+tnTd)K1−1.H = K_2\left(R+\frac{tn^T}{d}\right)K_1^{-1}.

The sign of the plane-dependent term changes if the plane equation is defined using the opposite convention for its offset. The formula separates rotational effects from the contribution of translation and plane geometry.

Another important case is pure camera rotation about a fixed center. Then t=0t=0, and

H=K2RK1−1.H=K_2RK_1^{-1}.

The homography now relates image directions throughout the scene, regardless of depth, wherever corresponding points are visible. This is the ideal geometric basis of rotational panorama stitching.

A single homography is not generally valid for a three-dimensional scene viewed from distinct camera centers. Translation causes depth-dependent parallax, so objects away from the reference plane fail to align. Lens distortion and rolling-shutter effects can also violate the ideal model. These limitations distinguish a physically justified homography from a merely convenient image warp. Appropriate uses include document rectification, planar image registration, mapping textures onto flat surfaces, and aligning images of building façades. Recovering metric dimensions requires additional information, such as known corners, orthogonality, aspect ratios, or camera calibration.

Estimation, numerical conditioning, and image warping

Estimating a planar homography from point correspondences begins with its eight independent parameters. Four correspondences determine it uniquely when the source points and target points each form a projective frame. Collinear points do not provide a frame, and nearly collinear arrangements can make the estimate unstable. More than four correspondences are normally used when measured positions contain noise.

For each match xi↔xi′x_i\leftrightarrow x_i', the homogeneous relationship xi′∼Hxix_i'\sim Hx_i can be written

xi′×Hxi=0.x_i'\times Hx_i=0.

The cross product supplies three scalar equations, of which only two are independent. Stacking them produces a homogeneous system of linear equations

Ah=0,Ah=0,

where hh contains the nine entries of HH. In the direct linear transformation method, the estimated hh is the unit vector minimizing ∥Ah∥\|Ah\|, obtained from the right singular vector of AA associated with its smallest singular value. This uses the singular value decomposition.

Coordinate normalization is crucial for numerical stability. A common procedure translates each image’s measured points so that their centroid is the origin, then scales them so their mean distance from the origin is 2\sqrt2. Estimation is performed in these normalized coordinates. If TT and T′T' are the normalization matrices, the result is returned to the original coordinates by

H=T′−1H~T.H=T'^{-1}\widetilde H T.

Normalization reduces the imbalance between constant, coordinate, and coordinate-product terms. It cannot, however, repair fundamentally degenerate geometric data.

The linear method minimizes an algebraic residual rather than a directly interpretable image distance. It therefore often supplies an initial estimate for nonlinear least-squares refinement. One possible geometric objective is symmetric transfer error:

∑i∥π(Hxi)−π(xi′)∥2+∥π(H−1xi′)−π(xi)∥2,\sum_i \left\| \pi(Hx_i)-\pi(x_i') \right\|^2 + \left\| \pi(H^{-1}x_i')-\pi(x_i) \right\|^2,

where π([u:v:w])=(u/w,v/w)\pi([u:v:w])=(u/w,v/w). Other objectives explicitly model measurement uncertainty or optimize corrected point locations in both images. Their statistical interpretation depends on the assumed noise model.

Incorrect feature matches require separate treatment. RANSAC, introduced by Martin Fischler and Robert Bolles in 1981, repeatedly estimates a model from small samples and tests its support among all observations. For a planar homography, a minimal sample normally contains four nondegenerate correspondences. A robust estimator cannot make an unsuitable planar model valid, and repeated textures can produce plausible but incorrect matches.

Applying the estimated transformation to an image introduces sampling issues beyond the geometry. Inverse mapping commonly visits each output pixel, transforms it back through H−1H^{-1}, and interpolates the source image. This avoids the holes that straightforward forward mapping can leave. Strong perspective compression still requires appropriate filtering to reduce aliasing. Near a transformed horizon, the local magnification can become very large even when HH is algebraically invertible, making reliable pixel reconstruction increasingly difficult.

Historical development and relations to other geometries

Projective transformations developed from the mathematical study of perspective rather than from matrices. Renaissance artists and theorists examined how parallel lines appear to converge and how spatial forms can be represented on a plane. These investigations supplied geometric constructions that later became central projections and perspectivities. Their practical concern was pictorial representation; the later mathematical theory isolated which properties remain unchanged under the corresponding transformations.

Gérard Desargues’s 1639 work on conics was a major step toward treating projection as a unifying geometric method. His approach related apparently different conic sections through constructions involving projection and points at infinity. Blaise Pascal announced his theorem on hexagons inscribed in a conic in 1640. The collinearity asserted by Pascal’s theorem exemplifies a property preserved by projectivities, unlike the metric characteristics that distinguish a circle from other conics.

In the nineteenth century, Jean-Victor Poncelet’s Traité des propriétés projectives des figures of 1822 helped establish projective methods as a coherent subject. Karl von Staudt’s Geometrie der Lage of 1847 developed a synthetic approach based on incidence and constructions such as harmonic configurations. This work addressed a foundational issue: how numerical coordinates and projective relationships could be connected without assuming Euclidean length measurement as the starting point.

The algebraic formulation gained broader significance through Felix Klein and the Erlangen program of 1872. Klein proposed studying geometries through their transformation groups and invariants. From this perspective, projective geometry concerns properties invariant under the projective group; affine geometry appears after selecting a hyperplane at infinity; and Euclidean geometry requires further invariant metric structure. These are relationships among geometric structures and groups, not a claim that one geometry supplies all the concepts of another without additional choices.

Projective transformations also illuminate non-Euclidean geometry. In the Beltrami–Klein model of the hyperbolic plane, points lie inside a conic and geodesics are represented by straight chords. Real projectivities preserving the boundary conic act as hyperbolic isometries. Hyperbolic distance can be expressed through a logarithm of a cross-ratio involving two interior points and the chord’s boundary endpoints. The selected conic supplies the additional structure that turns a projective invariant into a metric quantity.

Modern computer graphics preserves the same distinction between projective transformations and projections. Invertible 4×44\times4 matrices can change coordinates in three-dimensional projective space, while a camera projection ultimately discards depth to form a two-dimensional image. Graphics pipelines often retain homogeneous clip coordinates before perspective division, making clipping and coordinate transformations compatible with linear algebra. The resulting screen image is not an invertible record of the scene: many spatial points share a viewing ray. This distinction is the computational counterpart of the classical difference between a projectivity of a space and a projection from that space onto a lower-dimensional one.