Points and lines in 2D
A 2D Euclidean point is embedded in projective space as a 3-vector: The scale factor is arbitrary — the vectors and represent the same point. When the vector represents a point at infinity (ideal point) along the direction . A 2D line is likewise a 3-vector:Key operations
Point on a line — point lies on line if and only if: Intersection of two lines — the intersection point of and is: Line through two points — the line joining and is: where denotes the cross product. This elegant duality means point–line incidence is handled by a single cross product in either direction.Duality of points and lines
In projective 2D space there is a perfect duality between points and lines: any theorem about points and lines remains valid when the two notions are swapped. Both are represented by 3-vectors; the roles of “join” and “intersection” exchange.| Operation | Formula |
|---|---|
| Line through , | |
| Intersection of , | |
| Point on line test | |
| Parallel lines meet at | (point at infinity) |
Extension to 3D
In 3D projective space a point becomes a 4-vector: A plane is also a 4-vector , and the incidence condition is: Intersection of three planes is the 3D analogue of intersecting two lines — solved as a linear system or via cross product of the plane normals.A line in 3D is not simply a 4-vector; it requires either two points, two planes (their intersection), or the Plücker representation (a skew-symmetric matrix).
MATLAB example — points and lines
The following snippet illustrates the basic operations with homogeneous coordinates in MATLAB:Python examples
Points and lines (Colab)
Interactive notebook covering homogeneous point and line operations in Python.
E01 — Where does John Lennon look?
Practical exercise: use line intersections to determine gaze direction from a photograph.
Video lecture
Lecture: Homogeneous coordinates, lines, and points (2021)
Recorded class covering the full theory of homogeneous coordinates in 2D and 3D.
Summary
Why use homogeneous coordinates?
Why use homogeneous coordinates?
Homogeneous coordinates unify all geometric operations — including perspective projection, which maps 3D points to 2D image points — into simple matrix multiplications. Points at infinity are handled naturally, eliminating the need for special cases in intersection and transformation algorithms.
How do you convert back to Euclidean coordinates?
How do you convert back to Euclidean coordinates?
Divide all components by the last coordinate: . If the last coordinate is zero the point is at infinity and has no Euclidean representation.
What is the cross product rule for lines and intersections?
What is the cross product rule for lines and intersections?
Both the line through two points and the intersection of two lines use the cross product of the two 3-vectors. This works because the cross product produces a vector orthogonal to both, and orthogonality in projective space encodes incidence ().
