Topic

The hyperbolic plane

In the hyperbolic plane, through a point off a line there are infinitely many lines that never meet it. The plane cannot be drawn in ours without distortion, so it is drawn in models, each wrong in a different way. Here a point is one exact object and the models are four views of it.

const p = hpoint("1/2", 0);                // coordinates in the Poincaré disc
p.klein;  p.halfPlane;  p.hyperboloid;     // (4/5, 0)   (0, 3)   [5/3, 4/3, 0]
horigin().distanceTo(p).text;              // "ln(3)"
const l = hline(["1/2", 0], [0, "1/2"]);
String(l.disc);                            // "circle, centre (5/4, 5/4), radius √34/4"
String(l.klein);                           // "5·x + 5·y - 4 = 0": a straight chord
const axis = hline(ideal(-1, 0), ideal(1, 0));
axis.parallelsThrough([0, "1/2"]).angle;   // the angle of parallelism, cosine 4/5

Four models, one point

The model that makes the algebra simple is the hyperboloid: the points (t,x,y)(t, x, y) with t2−x2−y2=1t^2 - x^2 - y^2 = 1 and t>0t > 0. With the form

B(p,q)=p0q0−p1q1−p2q2 B(p, q) = p_0 q_0 - p_1 q_1 - p_2 q_2

it behaves like a sphere of radius ii: the distance is given by cosh⁡d(p,q)=B(p,q)\cosh d(p, q) = B(p, q), a line is {p:B(n,p)=0}\{p : B(n, p) = 0\} for a vector nn, and the isometries are the matrices that keep BB. The library keeps every point there. The other three are views:

  • The Poincaré disc, (x,y)/(1+t)(x, y)/(1 + t). Angles are true to the eye; lines are arcs of circles that meet the boundary at right angles, or diameters.
  • The Klein disc, (x,y)/t(x, y)/t. Lines are straight chords, so incidence looks Euclidean; angles are distorted.
  • The half-plane, the Poincaré disc under z↦i 1+z1−zz \mapsto i\,\dfrac{1 + z}{1 - z}. Lines are half-circles centred on the real axis, or vertical lines.

The maps between the hyperboloid, the Poincaré disc and the half-plane are rational, so a point with rational coordinates in one has them in the others: (½, 0) in the disc is (0, 3) in the half-plane and (5/3, 4/3, 0) on the hyperboloid. Going to and from the Klein disc needs one square root in one direction. hpoint(x, y) takes Poincaré disc coordinates; fromKlein, fromHalfPlane and fromHyperboloid take the others; and every point has .disc, .klein, .halfPlane and .hyperboloid.

The boundary circle is not part of the plane. Its points are the ideal points, the directions in which a line can leave: ideal(x, y), or ideal("1/8") at an angle given as a fraction of a turn.

Distance

A distance is a Length. It holds cosh⁡d\cosh d and sinh⁡d\sinh d exactly, so ed=cosh⁡d+sinh⁡de^d = \cosh d + \sinh d is an exact algebraic number and the distance is its logarithm: from the centre of the disc to (½, 0) is exactly ln⁡3\ln 3, and value(digits) encloses it. Lengths add exactly, by the addition formulas for cosh and sinh. Near the boundary the disc's scale shrinks without limit: the point at Euclidean radius rr is at distance ln⁡1+r1−r\ln\frac{1 + r}{1 - r} from the centre.

Lines, and three ways for two of them to lie

Through two points there is one line, hline(a, b); either point may be ideal. A line has two ends, and its shape in each model is available as an exact circle or line of the plane.

For two lines with normals n1,n2n_1, n_2, compare B(n1,n2)2B(n_1, n_2)^2 with B(n1,n1) B(n2,n2)B(n_1, n_1)\,B(n_2, n_2). relation reports which case holds:

  • intersecting (less): they cross in one point, at an angle with exact cosine;
  • asymptotic (equal): they share an end and come arbitrarily close without meeting;
  • ultraparallel (more): they have exactly one common perpendicular, and its length, the shortest distance between them, has cosh⁡d=∣B(n1,n2)∣/B(n1,n1)B(n2,n2)\cosh d = |B(n_1, n_2)| / \sqrt{B(n_1,n_1)B(n_2,n_2)}.

Parallels and the angle of parallelism

Take a line and a point PP at distance dd from it. The two lines from PP to the ends of the line are the limiting parallels. Every line through PP between them misses the given line, so there are infinitely many parallels. The limiting ones make an angle Π(d)\Pi(d) with the perpendicular from PP, the angle of parallelism, and Lobachevsky's formula for it becomes an exact statement about a cosine:

cos⁡Π(d)=tanh⁡d. \cos \Pi(d) = \tanh d.

As d→0d \to 0 the angle tends to a right angle, the Euclidean answer; as dd grows it tends to 0. At distance ln⁡3\ln\sqrt3 it is exactly 60°, and parallelsThrough returns it as the angle π/3. See the parallel postulate for the same question in every geometry of the package.

Circles and horocycles

A circle of radius rr has circumference 2πsinh⁡r2\pi \sinh r and area 2π(cosh⁡r−1)2\pi(\cosh r - 1), both more than in the plane and growing exponentially. They are exact multiples of π: the circle of radius ln⁡3\ln 3 has circumference 83π\tfrac83\pi and area 43π\tfrac43\pi. In the Poincaré disc a hyperbolic circle is a Euclidean circle, but its centre is somewhere else; circle.disc gives it. A horocycle is the limit of circles through a point as the centre goes off to an ideal point: in the disc, a circle touching the boundary.

callreturns
hpoint(x, y), fromKlein, fromHalfPlane, fromHyperboloid, horigin()HPoint: disc, klein, halfPlane, hyperboloid, distanceTo
ideal(x, y), ideal(turns)HIdeal: disc, halfPlane (a number, or null for the point at infinity)
hline(a, b), hbisector(a, b), hmidpoint(a, b)HLine: contains, side, ends, disc, klein, halfPlane, distanceTo, foot, perpendicularThrough, relation, meets, reflection, parallelsThrough
hcircle(centre, point | { cosh } | { exp }), horocycle(ideal, p)HCircle: radius, circumference, area, disc, contains
Length.ofCosh(c), Length.ofExp(e), Length.ofSinh(s)Length: cosh, sinh, exp, tanh, text, value(digits), add, double, half, equals
hyperbolicFigure(items, { model })A figure in the Poincaré disc, the Klein disc or the half-plane
Try itEdit the code and run it with @ratmath/geo and Core's Rational in scope. The last line's value is shown; PRINT(…) adds lines, TEX(…) typesets math.
Ctrl/⌘ + Enter runs