Projective Geometry
👋 Introduction
Geometry and Algebra
- Geometry
- Points, lines, triangles, circles, conic sections...
- Collinear, concurrent, parallel, perpendicular...
- Distances, angles, areas, quadrance, spread, quadrea...
- Midpoint, bisector, orthocenter, pole/polar, tangent...
- Algebra
- Addition, multiplication, inverse...
- Elementary algebra: integer/rational/real/complex... numbers.
- Abstract Algebra: rings, fields...
- Linear algebra: vector, matrix, determinant, dot/cross product...
- The two subjects are linked by coordinates.
🔑 Key points
-
The earth is not flat and our universe is non-Euclidean.
-
Non-Euclidean geometry is much easier to learn than you might think.
-
Our curriculum in school is completely wrong.
-
Euclidean geometry is asymmetric. Three sides determine a triangle, but three angles do not determine a triangle. This may not the case in general geometries. Euclidean geometry is just a special case.
-
Yet Euclidean geometry is computationally more efficient and is still used in our small-scale everyday life.
-
Incidenceship facilitates integer arithmetic; non-oriented measurement facilitates rational arithmetic; oriented measurement facilitates floating-point arithmetic. Don't shoot rabbits with machine guns.
The Basic Elements of Projective Plane
The concept of Projective Plane
-
Only "points" and "lines" are involved.
-
Assume that "points" (or "lines") are distinguishable.
-
Denote = as and refer to the same point.
-
E.g., =
-
We have the following rules:
- = (reflective)
- If = , then = (symmetric)
- If = and = , then (transitive)
-
Unless otherwise mentioned, objects with different names are assumed to be distinct, i.e. .
-
This idea can be generalized to higher dimensions. However, we restrict here to 2D only.
Incidence
-
A point either lies on a line or it does not.
-
If a point lies on a line , denote .
-
For convenience, we also denote it as .
-
We have
Projective Point and Line
-
Projective Point
- Exactly one line passes through two distinct points.
- Denote join(, ) or simply as a line joined by and .
- We have:
- =
- and are always true.
-
Projective Line
- Exactly one point met by two distinct lines.
- Denote meet(, ) or simply as a point met by and .
- We have:
- =
- and are always true.
-
Duality: "Point" and "Line" are interchangable here.
-
"Projective geometry is all geometry." (Arthur Cayley)
Example 1: Euclidean Geometry
-
Point: projection of a 3D vector onto a 2D plane :
-
for all represents the same point.
-
For instance, and represent the same point
-
is a point at infinity.
-
Line: , denoted by a vector .
-
for all represents the same line.
-
is the line at infinity.
-
is not a valid point or line.
Euclidean 2D plane from 3D vector
{#fig:euclidean}
Calculation by Vector Operations
- Let and .
- Dot product = = .
- Cross product =
- Then, we have:
- precisely when
- Join of two points: =
- Meet of two lines: =
- precisely when
Examples
-
The linear equation that joins the point and is = , or , or .
-
The point lies on the line because = .
-
Exercise: Calculate the line equation that joins the points and .
🐍 Python Code (pg_object)
class pg_object(np.ndarray):
@abstractmethod
def dual(self):
"""abstract method"""
pass
def __new__(cls, inputarr):
* obj = np.asarray(inputarr).view(cls)
return obj
def __eq__(self, other):
if type(other) is type(self):
return (np.cross(self, other) == 0).all()
return False
def __ne__(self, other):
return not self.__eq__(other)
def incident(self, l):
return not self.dot(l)
def __mul__(self, other):
T = self.dual()
return T(np.cross(self, other))
🐍 Python Code (pg_point and pg_line)
class pg_point(pg_object):
def __new__(cls, inputarr):
obj = pg_object(inputarr).view(cls)
return obj
def dual(self):
return pg_line
class pg_line(pg_object):
def __new__(cls, inputarr):
obj = pg_object(inputarr).view(cls)
return obj
def dual(self):
return pg_point
def join(p, q):
assert isinstance(p, pg_point)
return p * q
def meet(l, m):
assert isinstance(l, pg_line)
return l * m
🐍 Python Code (Example)
from __future__ import print_function
from pprint import pprint
import numpy as np
if __name__ == "__main__":
p = pg_point([1, 3, 2])
q = pg_point([4, 3, 5])
print(join(p, q))
l = pg_line([5, 7, 8])
m = pg_line([-5, 1, 6])
print(meet(l, m))
p = pg_point([1-2j, 3-1j, 2+1j]) # complex number
q = pg_point([-2+1j, 1-3j, -1-1j])
assert p.incident(p*q)
Example 2: Perspective View of Euclidean Geometry
- It turns out that we can choose any line in a plane as the line of infinity.
{#fig:euclidean2}
Example 3: Spherical/Elliptic Geometry
-
Surprisingly, the vector notations and operators can also represent other geometries, such as spherical/Elliptic geometry.
-
"Point": projection of the 3D vector onto the unit sphere. where .
-
Here, the two points on the opposite poles are considered to be the same point.
-
"Line": represents the great circle intersecting the unit sphere and the plane .
-
The are called Homogeneous Coordinates.
-
Here, the coordinates can be integer numbers, rational numbers (the ratio of two integers), real numbers, complex numbers, or finite field numbers, or even polynomial functions.
Spherical Geometry from 3D vector
{#fig:sphere}
Example 4: Hyperbolic Geometry from 3D vector
- A velocity "point": projection of a 3D vector onto 2D plane :
Counterexamples
-
In some quorum systems, two "lines" are allowed to meet at more than one point. Therefore, it is a projective geometry only in very special cases.
-
In some systems, the line from to is not the same as the line from to , so they cannot form a projective geometry.
-
"Symmetry" is an important keyword in projective geometry.
Number systems
- Integers ():
- e.g.
- discrete, more computationally efficient.
- Rational numbers ():
- e.g. (i.e. infinity)
- Multiplication/division is simpler than addition/subtraction
- Real numbers ():
- e.g. , ,
- May induce round-off errors.
- Finite field, , where is a prime number (e.g.
) or prime powers (e.g. ).
- Used in Coding Theory
Number systems (cont'd)
-
Complex numbers ():
- e.g. ,
- Besides the identity (the only automorphism of the real numbers), there is also the automorphism that sends to such that .
-
Complex numbers over integers ()
- e.g. ,
- are also known as Gaussian integers.
-
Complex numbers over rational numbers ()
-
Projective Geometry can work on all these number systems.
-
In fact, Projective Geometry can work on any field. Moreover, multiplicative inverse operations are not required.
-
No "Continuity" is assumed in Projective Geometry.
Example 4: Poker Card Geometry
-
Even "coordinates" is not necessary for projective geometry.
-
Consider the poker cards in @tbl:poker_card:
- For example, meet() =
5
, join(J
,4
) = .
- For example, meet() =
-
We call this Poker Card Geometry here.
Table
A 2 3 4 5 6 7 8 9 10 J Q K
2 3 4 5 6 7 8 9 10 J Q K A
4 5 6 7 8 9 10 J Q K A 2 3
10 J Q K A 2 3 4 5 6 7 8 9
: Poker Card Geometry {#tbl:poker_card}
Finite projective plane
-
Yet we may assign the homogeneous coordinate to a finite projective plane where the vector operations are in a finite field.
-
E.g. the poker card geometry is a finite projective plane of order 3.
-
The smallest finite projective plane (order 2) contains only 7 points and 7 lines.
-
If the order is prime or prime powers, then we can easily construct the finite projective plane via finite fields and homogeneous coordinates.
-
In 1989, the nonexistence of finite projective plane of order 10 was proved . The proof took the equivalent of 2000 hours on a Cray 1 supercomputer.
-
The existence of many other higher order finite projective planes remains an open question.
Not covered in this work
-
Unless specifically mentioned, we will not discuss finite projective plane further more.
-
Although coordinate systems are not a requirement for general projective geometry, practically all examples we deal with have homogeneous coordinates. The proofs of all theorems are based on the assumption of homogeneous coordinates.
Basic Properties
Collinear, Concurrent, and Coincidence
-
If all three points lie on the same line, they are said to be collinear.
-
If all three lines intersect at the same point, they are called concurrent.
-
Denote the coincidence relationship as coI().
-
coI() is true precisely when is true.
-
Similarly, coI() is true precisely when is true.
-
In general, coI() is true precisely when is true for all in the remaining points .
-
Unless otherwise mentioned, is assumed to be coincide, while is assumed to coincide with none of the three.
Parameterize a line
-
The points on a line can be parameterized by , with and are not both zero.
-
For integer coordinates, to show that can span all integer points on the line, we give the exact expression of for a point as follows.
-
Let .
-
Then
🐍 Python Code
def coincident(p, q, r):
return r.incident(p * q)
def coI_core(l, Lst):
for p in Lst:
if not l.incident(p):
return False
return True
def coI(p, q, *rest):
assert p != q
return coI_core(p*q, rest )
# Note: `lambda` is a preserved keyword in python
def plucker(lambda1, p, mu1, q):
T = type(p)
return T(lambda1 * p + mu1 * q)
Pappus' Theorem
-
Theorem (Pappus): Given two lines and . Let =meet(), =meet(), and =meet(). Then are collinear.
-
Sketch of the proof:
- Let .
- Let .
- Express in terms of .
- Simplify the expression and conclude that it is equal to 0 (we may use the Python's symbolic package for the calculation).
-
Exercise: verify that this theorem holds for
3
,6
,Q
on and8
,9
,J
on in the poker card geometry.
🐍 Python Code for the Proof
import sympy
sympy.init_printing()
pv = sympy.symbols("p:3", integer=True)
qv = sympy.symbols("q:3", integer=True)
lambda1, mu1 = sympy.symbols("lambda1 mu1", integer=True)
p = pg_point(pv); q = pg_point(qv)
r = plucker(lambda1, p, mu1, q)
sv = sympy.symbols("s:3", integer=True)
tv = sympy.symbols("t:3", integer=True)
lambda2, mu2 = sympy.symbols("lambda2 mu2", integer=True)
s = pg_point(sv); t = pg_point(tv)
u = plucker(lambda2, s, mu2, t)
G = (p * t) * (q * s)
H = (p * u) * (r * s)
I = (q * u) * (r * t)
ans = np.dot(G, H * I)
ans = sympy.simplify(ans)
print(ans) # get 0
An instance of Pappus' theorem
{#fig:pappus}
Another instance of Pappus' theorem
{#fig:pappus2}
Triangles and Trilaterals
-
If three points , , and are not collinear, they form a triangle, denoted as .
-
If three lines , , and are not concurrent, they form a trilateral, denoted as .
-
Triangle and trilateral are dual if , and .
🐍 Python Code (II)
def tri(T):
a1, a2, a3 = T
l1 = a2 * a3
l2 = a1 * a3
l3 = a1 * a2
return l1, l2, l3
def tri_func(func, T):
a1, a2, a3 = T
m1 = func(a2, a3)
m2 = func(a1, a3)
m3 = func(a1, a2)
return m1, m2, m3
An example of triangle and trilateral
{#fig:triangle}
Projectivities and Perspectivities
Projectivities
-
An ordered set (whether collinear or not) is called a projective of a concurrent set precisely when , and .
-
Denote this as .
-
An ordered set (whether concurrent or not) is called a projective of a collinear set precisely when , and .
-
Denote this as .
-
If each ordered set is coincident, we may write:
- Or simply write
Perspectivities
-
An ordered set is called a perspectivity of an ordered set precisely when and for some concurrent set .
-
Denote this as .
-
An ordered set is called a perspectivity of an ordered set precisely when and for some collinear set .
-
Denote this as .
An instance of perspectivity
{#fig:perspec}
Another instance of perspectivity
{#fig:perspec2}
Perspectivity
- Similar definition for more than three points:
- .
- To check perspectivity:
- First construct a point := meet().
- For the rest of the points, check if are collinear.
- Note that and does not imply .
🐍 Python Code (III)
def persp(L, M):
if len(L) != len(M):
return False
if len(L) < 3:
return True
[pL, qL] = L[0:2]
[pM, qM] = M[0:2]
assert pL != qL
assert pM != qM
assert pL != pM
assert qL != qM
O = (pL * pM) * (qL * qM)
for rL, rM in zip(L[2:], M[2:]):
if not O.incident(rL * rM):
return False
return True
Desargues's Theorem
-
Theorem (Desargues): Let the trilateral be the dual of the triangle and the trilateral be the dual of the triangle . Then if and only if .
-
Sketch of the proof:
- Let be the perspective point.
- Let .
- Let .
- Let .
- Let =
- Let =
- Let =
- Express in terms of .
- Simplify the expression and find that it is equal to 0. (we may use the Python's symbolic package for the calculation.)
- Due to the duality, the only-if part can be proved using the same technique.
🐍 Python Code for the Proof (II)
# Define symbol points p, q, s, t as before
# Define symbol lambda1, mu1, lambda2, mu2 as before
# ...
lambda3, mu3 = sympy.symbols("lambda3 mu3", integer=True)
p2 = plucker(lambda1, p, mu1, t)
q2 = plucker(lambda2, q, mu2, t)
s2 = plucker(lambda3, s, mu3, t)
G = (p * q) * (p2 * q2)
H = (q * s) * (q2 * s2)
I = (s * p) * (s2 * p2)
ans = np.dot(G, H * I)
ans = sympy.simplify(ans)
print(ans) # get 0
An instance of Desargues' theorem
{#fig:desargues}
Another instance of Desargues' theorem
{#fig:desargues2}
Projective Transformation
-
Given a function that transforms a point into another point .
-
If , , and are collinear and we always have , , and collinear. Then the function is called a projective transformation.
-
In Homogeneous coordinates, a projective transformation is any non-singular matrix multiplied by a vector.
Quadrangles and Quadrilateral Sets
-
Given four points , , and , if none of three are collinear, they form a quadrangle, denoted as .
-
Note that the quadrangle here can be either convex or self-intersecting.
-
In total, there are six lines formed by .
-
Suppose they meet another line at , where
-
= meet(), = meet()
-
= meet(), = meet()
-
= meet(), = meet()
-
-
We call these six points a quadrilateral set, denoted as .
Quadrilateral set
{#fig:quad_set}
Another quadrilateral set
{#fig:quad_set2}
Harmonic Sets
-
In a quadrilateral set , if and , then it is called a harmonic set.
-
The Harmonic relation is denoted by .
-
Then and is called a harmonic conjugate.
-
Theorem: If , then .
-
In other words, projectivity preserves harmonic relation.
-
Theorem: If , then .
-
In other words, perspectivity preserves harmonic relation.
Basic metric between point and line
-
A basic metric between and , denoted by (inner product):
-
can be positive, negative, and zero.
-
precisely when lies on .
-
Cross Ratio
-
Given a line incident with . Choose an arbitrary point that is not on that line.
-
The cross ratio is defined as:
-
Note: the cross ratio does not depend on what is chosen.
🐍 Python Code (IV)
from fractions import Fraction
import numpy as np
def ratio_ratio(a, b, c, d):
if isinstance(a, (int, np.int64)):
return Fraction(a, b) / Fraction(c, d)
return (a * d) / (b * c)
def x_ratio(A, B, l, m):
dAl = A.dot(l)
dAm = A.dot(m)
dBl = B.dot(l)
dBm = B.dot(m)
return ratio_ratio(dAl, dAm, dBl, dBm)
def R(A, B, C, D):
O = (C*D).aux()
return x_ratio(A, B, O*C, O*D)
Polarities
-
A polarity is a projective correlation of period 2.
-
We call the polar of , and the pole of .
-
Denote and .
-
Except for the degenerate cases, and .
-
It may happen that is incident with so that each is self-conjugate.
-
The locus of self-conjugate points defines a conic. However, polarity is a more general concept than conics, because some polarities may have no self-conjugate points (or their self-conjugate points are complex).
The Use of a Self-Polar triangle
-
Any projective correlation that relates three vertices of one triangle to their respective opposite sides is a polarity.
-
Thus, any triangle , any point not on a side, and any line not throughout a vertex, determine a definite polarity .
The Conic
-
Historically ellipse (including circle), parabola, and hyperbola.
-
The locus of self-conjugate points is a conic.
-
Their polars are its tangents.
-
Any other line is called a secant or a nonsecant according to whether it meets the conic twice or not at all, i.e., according to whether the involution of conjugate points on it is hyperbolic or elliptic.
-
Note: Intersecting a conic with a line may result of an irrational intersection point.
Construct the polar of a point using a conic
- To construct the polar of a given point , not on the conic, draw any two secants and through ; then the polar joins the two points meet() and meet().
Example of constructing the polar of a point
\begin{figure}[hp]
\centering
\input{figs/pole2polar.tikz}
\caption{Example of constructing the polar of a point}
\end{figure}
Another example of constructing the polar of a point
\begin{figure}[hp]
\centering
\input{figs/pole2polar2.tikz}
\caption{Another example of constructing the polar of a point}
\end{figure}
Construct the pole from a line
- To construct the pole of a given secant , draw the polars of any two points on the line; then the common point of two polars is the pole of .
Constructing the pole of a line
\begin{figure}[hp]
\centering
\input{figs/polar2pole.tikz}
\caption{Constructing the pole of a line}
\end{figure}
Construct the tangent of a point on a conic
- To construct the tangent at a given point on a conic, join to the pole of any secant through .
Example of construct the tangent of a point on a conic
\begin{figure}[hp]
\centering
\input{figs/tangent.tikz}
\caption{Construct the tangent of a point on a conic}
\end{figure}
Another example of constructing the tangent of a point on a conic
\begin{figure}[hp]
\centering
\input{figs/tangent2.tikz}
\caption{Another example of constructing the tangent of a point on a conic}
\end{figure}
Pascal's Theorem
- If a hexagon is inscribed in a conic, the three pairs of opposite sides meet in collinear points.
An instance of Pascal' theorem
{#fig:pascal}
Another instance of Pascal' theorem
{#fig:pascal2}