# Rational trigonometry

Rational trigonometry is a proposed reformulation of metrical planar and solid geometries (which includes trigonometry) by Canadian mathematician Norman J. Wildberger, currently a professor of mathematics at the University of New South Wales. His ideas are set out in his 2005 book Divine Proportions: Rational Trigonometry to Universal Geometry. According to New Scientist, part of his motivation for an alternative to traditional trigonometry was to avoid some problems that he claims occur when infinite series are used in mathematics. Rational trigonometry avoids direct use of transcendental functions like sine and cosine by substituting their squared equivalents. Wildberger draws inspiration from mathematicians predating Georg Cantor's infinite set-theory, like Gauss and Euclid, who he claims were far more wary of using infinite sets than modern mathematicians.[nb 1] To date, rational trigonometry is largely unmentioned in mainstream mathematical literature.

## Approach

Rational trigonometry follows an approach built on the methods of linear algebra to the topics of elementary (high school level) geometry. Distance is replaced with its squared value (quadrance) and 'angle' is replaced with the squared value of the usual sine ratio (spread) associated to either angle between two lines. (The complement of Spread, known as cross, also corresponds to a scaled form of the inner product between line segments taken as vectors). The three main laws in trigonometry – Pythagoras's theorem, the sine law and the cosine law – are given in rational (square-equivalent) form, and are augmented by two further laws – the triple quad formula (relating the quadrances of three collinear points) and the triple spread formula (relating the spreads of three concurrent lines) –, giving the five main laws of the subject.[citation needed]

Rational trigonometry is otherwise broadly based on Cartesian analytic geometry, with a point defined as an ordered pair of rational numbers

$(x,y)$ and a line

$ax+by+c=0,$ as a general linear equation with rational coefficients a, b and c.

By avoiding calculations that rely on square root operations giving only approximate distances between points, or standard trigonometric functions (and their inverses), giving only truncated polynomial approximations of angles (or their projections) geometry becomes entirely algebraic. There is no assumption, in other words, of the existence of real number solutions to problems, with results instead given over the field of rational numbers, their algebraic field extensions, or finite fields. Following this, it is claimed, makes many classical results of Euclidean geometry applicable in rational form (as quadratic analogs) over any field not of characteristic two.[citation needed]

The book Divine Proportions shows the application of calculus using rational trigonometric functions, including three-dimensional volume calculations. It also deals with rational trigonometry's application to situations involving irrationals, such as the proof that Platonic Solids all have rational 'spreads' between their faces.[nb 2]

## Notability and criticism

Rational trigonometry (RT) is mentioned in only a modest number of mathematical publications besides Wildberger's own articles and book. Divine Proportions was dismissed by reviewer Paul J. Campbell, in the Mathematics Magazine of the Mathematical Association of America (MAA): "the author claims that this new theory will take 'less than half the usual time to learn'; but I doubt it. and it would still have to be interfaced with the traditional concepts and notation." Reviewer William Barker, Isaac Henry Wing Professor of Mathematics at Bowdoin College, also writing for the MAA, was more approving: "Divine Proportions is unquestionably a valuable addition to the mathematics literature. It carefully develops a thought provoking, clever, and useful alternate approach to trigonometry and Euclidean geometry. It would not be surprising if some of its methods ultimately seep into the standard development of these subjects. However, unless there is an unexpected shift in the accepted views of the foundations of mathematics, there is not a strong case for rational trigonometry to replace the classical theory"  New Scientist's Amanda Gefter described the approach of Wildberger as an example of finitism. James Franklin in the Mathematical Intelligencer argued that the book deserved careful consideration.

An analysis by Michael Gilsdorf of the example problems given by Wildberger in an early paper disputed the claim that RT required fewer steps to solve most problems, if free selection of classical methods (such as the 'shoelace formula' for the area of a triangle from the coordinates of its vertices or applying a special case of Stewart's theorem directly to a triangle with a median) is allowed to optimize the solution of problems. Concerning pedagogy, and whether using the quadratic quantities introduced by RT offers real benefits over traditional learning, the author observed that classical trigonometry was not initially based on use of Taylor series to approximate angles at all, but rather on measurements of chord (twice the sine of an angle) and thus with a proper understanding students could reap continued advantages from use of linear measurement without the claimed logical inconsistencies when circular parametrization by angle is subsequently introduced.

Quadrance and distance (as its square root) both measure separation of points in Euclidean space. Following Pythagoras's theorem, the quadrance of two points A1 = (x1, y1) and A2 = (x2, y2) in a plane is therefore defined as the sum of squares of differences in the $x$ and $y$ coordinates:

$Q(A_{1},A_{2})=(x_{2}-x_{1})^{2}+(y_{2}-y_{1})^{2}.$ The triangle inequality $d_{3}\leq d_{1}+d_{2}$ is expressed under rational trigonometry as $(Q_{3}-Q_{1}-Q_{2})^{2}\leq 4Q_{1}Q_{2}$ . Suppose l1 and l2 intersect at the point A. Let C be the foot of the perpendicular from B to l2. Then the spread is s = Q/R.

Spread gives one measure to the separation of two lines as a single dimensionless number in the range [0,1] (from parallel to perpendicular) for Euclidean geometry. It replaces the concept of (and has several differences from) angle discussed in the section below. Descriptions of spread may include:

• Trigonometric (most elementary): the sine ratio of quadrances in a right triangle, equivalent to the square of the sine of the angle (left). By extending adjacent side AC to form part of the unit diameter in a circle and considering similar triangles (right), spread may be measured as the length (or ratio to diameter) of the exterior segment - more traditionally equal to one half times (1 minus the cosine of twice the angle at A) or haversine.
• Vector: as a rational function of the slopes (and relative direction) of a pair of lines where they meet.
• Cartesian: as a rational function of three co-ordinates used to ascribe two vectors.
• Linear algebra (from the dot product): a normalized rational function: the square of the determinant of two vectors (or pair of intersecting lines) forming a matrix divided by the product of their quadrances.

#### Trigonometric

Suppose two lines, l1 and l2, intersect at the point A as shown at right. Choose a point BA on l1 and let C be the foot of the perpendicular from B to l2. Then the spread s is

$s(\ell _{1},\ell _{2})={\frac {Q(B,C)}{Q(A,B)}}={\frac {Q}{R}}.$ #### Vector/slope (two-variable)

Like angle, spread depends only on the relative slopes of two lines (constant terms being eliminated) and is invariant under translation (i.e. it is preserved when lines are moved keeping parallel with themselves). So given two lines whose equations are

$a_{1}x+b_{1}y={\text{constant}}\qquad {\text{and}}\qquad a_{2}x+b_{2}y={\text{constant}}$ we may rewrite them as two lines which meet at the origin (0, 0) with equations

$a_{1}x+b_{1}y=0\qquad {\text{and}}\qquad a_{2}x+b_{2}y=0$ In this position the point (−b1, a1) satisfies the first equation and (−b2, a2) satisfies the second and the three points (0, 0), (−b1, a1) and (−b2, a2) forming the spread will give three quadrances:

{\begin{aligned}Q_{1}&=\left(b_{1}^{2}+a_{1}^{2}\right),\\Q_{2}&=\left(b_{2}^{2}+a_{2}^{2}\right),\\Q_{3}&=\left(b_{1}-b_{2}\right)^{2}+\left(a_{1}-a_{2}\right)^{2}\end{aligned}} The cross law – see below – in terms of spread is

$1-s={\frac {(Q_{1}+Q_{2}-Q_{3})^{2}}{4Q_{1}Q_{2}}}.$ which becomes:

$1-s={\frac {\left(a_{1}^{2}+a_{2}^{2}+b_{1}^{2}+b_{2}^{2}-(b_{1}-b_{2})^{2}-(a_{1}-a_{2})^{2}\right)^{2}}{4\left(a_{1}^{2}+b_{1}^{2}\right)\left(a_{2}^{2}+b_{2}^{2}\right)}}.$ This simplifies, in the numerator, to (2a1a2 + 2b1b2)2, giving:

$1-s={\frac {\left(a_{1}a_{2}+b_{1}b_{2}\right)^{2}}{\left(a_{1}^{2}+b_{1}^{2}\right)\left(a_{2}^{2}+b_{2}^{2}\right)}}.$ (Note: 1 − s is the expression for the cross, the square of the cosine of either angle between a pair of lines or vectors, that gives its name to the cross law.)

Then, using the Brahmagupta–Fibonacci identity

$\left(a_{2}b_{1}-a_{1}b_{2}\right)^{2}+\left(a_{1}a_{2}+b_{1}b_{2}\right)^{2}=\left(a_{1}^{2}+b_{1}^{2}\right)\left(a_{2}^{2}+b_{2}^{2}\right),$ the standard expression for spread in terms of slopes (or directions) of two lines becomes

$s={\frac {\left(a_{1}b_{2}-a_{2}b_{1}\right)^{2}}{\left(a_{1}^{2}+b_{1}^{2}\right)\left(a_{2}^{2}+b_{2}^{2}\right)}}.$ In this form (and in its Cartesian equivalent that follows) a spread is the ratio of the square of a determinant of two vectors (numerator) to the product of their quadrances (denominator)

#### Cartesian (three-variable)

This replaces (−b1, a1) with (x1, y1), (−b2, a2) with (x2, y2) and the origin (0, 0), as the point of intersection of two lines, with (x3, y3) in the previous result:

$s={\frac {{\bigl (}(y_{1}-y_{3})(x_{2}-x_{3})-(y_{2}-y_{3})(x_{1}-x_{3}){\bigr )}^{2}}{{\bigl (}(y_{1}-y_{3})^{2}+(x_{1}-x_{3})^{2}{\bigr )}{\bigl (}(y_{2}-y_{3})^{2}+(x_{2}-x_{3})^{2}{\bigr )}}}.$ Unlike angle, which can define a relationship between rays emanating from a point, by an arc measurement parametrization, and where a pair of lines can be considered four pairs of rays, forming four angles, 'spread' is more fundamental in rational trigonometry, describing two lines by a single measure of a rational function (see above). Being equivalent to the square of a sine of the corresponding angle θ (and to the haversine of the chord-based double-angle Δ = 2θ), the spread of both an angle and its supplementary angle are equal.

0 0 0 0 0g
1/4 1/3 1/12 π/6 30° 33+1/3g
1/2 1/2 1/8 π/4 45° 50g
3/4 2/3 1/6 π/3 60° 66+2/3g
1 1 1/4 π/2 90° 100g orthogonal lines
3/4 1+1/3 1/3 2π/3 120° 133+1/3g
1/2 1+1/2 3/8 3π/4 135° 150g
1/4 1+2/3 5/12 5π/6 150° 166+2/3g
0 2 1/2 π 180° 200g

Spread is not proportional, however, to the separation between lines as angle would be; with spreads of 0, 1/4, 1/2, 3/4, and 1 corresponding to unevenly spaced angles 0°, 30°, 45°, 60° and 90°.

Instead, (recalling the supplementary property) two equal, co-terminal spreads determine a third spread, whose value will be a solution of the triple spread formula for a triangle (or three concurrent lines) having spreads of s, s and r:

{\begin{aligned}(2s+r)^{2}&=2\left(2s^{2}+r^{2}\right)+4s^{2}r\\4s^{2}+4sr+r^{2}&=4s^{2}+2r^{2}+4s^{2}r\end{aligned}} giving the quadratic polynomial (in s):

{\begin{aligned}r^{2}+4s^{2}r-4sr&=0\\r^{2}-4s(1-s)r&=0\end{aligned}} and solutions

$r=0\quad ({\text{trivial}})\qquad {\text{or}}\qquad r=4s(1-s)$ This is equivalent to the trigonometric identity :

$\sin ^{2}(2\theta )=4\sin ^{2}\theta \left(1-\sin ^{2}\theta \right)$ of the angles θ, θ and 180° − 2θ of a triangle, using

$S_{2}(s)=S_{2}\left(\sin ^{2}\theta \right)=\sin ^{2}(2\theta )=r(s)$ to denote a second spread polynomial in s.

Finding the triple of a spread likewise makes use of the triple spread formula as a quadratic equation in the unknown third spread t treating the known spreads s and r (the previous solution) as constants. This turns out (after eliminating the 'smaller' solution s) to be:

$S_{3}(s)=s(3-4s)^{2}=t(s)$ Further multiples of any basic spread of lines can either be generated by continuing use of the triple spread formula in this way, or by use of a recursion formula (see below) which applies it indirectly. Whereas any multiple of a spread that is rational will be polynomial in that spread (and therefore rational), the converse does not apply. For example, by the half-angle formula, two lines meeting at a 15° (or 165°) angle have spread of:

$\operatorname {hav} \left(30^{\circ }\right)=\sin ^{2}\left({\frac {30^{\circ }}{2}}\right)={\frac {1-\cos 30^{\circ }}{2}}={\frac {1-{\frac {\sqrt {3}}{2}}}{2}}={\frac {2-{\sqrt {3}}}{4}}\approx 0.0667.$ and thus exists by algebraic extension of the rational numbers.

### Twist

As seen for double and triple spreads, an nth multiple of any spread, s gives a polynomial in that spread, denoted Sn(s), as one solution to the triple spread formula.

In the conventional language of circular functions, these nth-degree spread polynomials, for n = 0, 1, 2, ..., can be characterized by the identity:[citation needed]

$\sin ^{2}(n\theta )=S_{n}\left(\sin ^{2}\theta \right).$ ### Identities

#### Explicit formulas

• $S_{n}(s)=s\sum _{k=0}^{n-1}{\frac {n}{n-k}}{\binom {2n-1-k}{k}}(-4s)^{n-1-k}.$ (Michael Hirschhorn, Shuxiang Goh)
• $S_{n}(s)={\tfrac {1}{2}}-{\tfrac {1}{4}}\left(1-2s+2{\sqrt {s^{2}-s}}\right)^{n}-{\tfrac {1}{4}}\left(1-2s-2{\sqrt {s^{2}-s}}\right)^{n}.$ (M. Hovdan)
• $S_{n}(s)=-{\tfrac {1}{4}}\left(\left({\sqrt {1-s}}+i{\sqrt {s}}\right)^{2n}-1\right)^{2}\left({\sqrt {1-s}}-i{\sqrt {s}}\right)^{2n}.$ (M. Hovdan)

From the definition it immediately follows that

$S_{n}(s)=\sin ^{2}\left(n\arcsin \left({\sqrt {s}}\right)\right).$ [citation needed]

#### Recursion formula

$(s_{1}+s_{2}+s_{3})^{2}=2\left(s_{1}^{2}+s_{2}^{2}+s_{3}^{2}\right)+4s_{1}s_{2}s_{3}$ is an identity whose entries can themselves be spread polynomials of the form :$s$ , $S_{n}(s)$ and $S_{n\pm \ 1}(s)$ ,

So, taking a difference of (and rearranging) the expressions

$(s+S_{n}(s)+S_{n+1}(s))^{2}=2\left(s^{2}+S_{n}(s)^{2}+S_{n+1}(s)^{2}\right)+4sS_{n}(s)S_{n+1}(s)$ and
$(s+S_{n}(s)+S_{n-1}(s))^{2}=2\left(s^{2}+S_{n}(s)^{2}+S_{n-1}(s)^{2}\right)+4sS_{n}(s)S_{n-1}(s)$ yields the recursive relation:

$S_{n+1}(s)=2(1-2s)S_{n}(s)-S_{n-1}(s)+2s.$ #### Relation to Chebyshev polynomials

The spread polynomials are related to the Chebyshev polynomials of the first kind, Tn, by the identity

$1-2S_{n}(s)=T_{n}(1-2s).$ This implies

$S_{n}(s)={\frac {1-T_{n}(1-2s)}{2}}=1-T_{n}^{2}\left({\sqrt {1-s}}\right).$ The second equality above follows from the identity

$2T_{n}^{2}(x)-1=T_{2n}(x)$ on Chebyshev polynomials.[citation needed]

#### Composition

The spread polynomials satisfy the composition identity

$S_{n}{\bigl (}S_{m}(s){\bigr )}=S_{nm}(s).$ #### Coefficients in finite fields

When the coefficients are taken to be members of the finite field Fp, then the sequence {Sn}n = 0, 1, 2,... of spread polynomials is periodic with period p2 − 1/2. In other words, if k = p2 − 1/2, then Sn + k = Sn, for all n.[citation needed]

#### Orthogonality

When the coefficients are taken to be real, then for nm, we have

$\int _{0}^{1}\left(S_{n}(s)-{\tfrac {1}{2}}\right)\left(S_{m}(s)-{\tfrac {1}{2}}\right){\frac {ds}{\sqrt {s(1-s)}}}=0.$ For n = m, the integral is π/8 unless n = m = 0, in which case it is π/4.[citation needed]

#### Generating functions

The ordinary generating function is

$\sum _{n=1}^{\infty }S_{n}(s)x^{n}={\frac {sx(1+x)}{(1-x)^{3}+4sx(1-x)}}.$ (Michael Hirschhorn)

The exponential generating function is

$\sum _{n=1}^{\infty }{\frac {S_{n}(s)}{n!}}x^{n}={\tfrac {1}{2}}e^{x}\left(1-e^{-2sx}\cos \left(2x{\sqrt {s(1-s)}}\right)\right).$ [citation needed]

#### Differential equation

Sn(s) satisfies the second-order linear nonhomogeneous differential equation[citation needed]

$s(1-s)y''+\left({\tfrac {1}{2}}-s\right)y'+n^{2}\left(y-{\tfrac {1}{2}}\right)=0.$ For every integer n and every prime p, there is a natural number m such that Sn(s) is divisible by p precisely when m divides n. This number m is a divisor of either p − 1 or p + 1. The proof of this number theoretical property was first given in a paper by Shuxiang Goh and N. J. Wildberger. It involves considering the projective analogue to quadrance in the finite projective line P1(Fp).

### Table of spread polynomials, with factorizations

The first several spread polynomials are as follows:

{\begin{aligned}S_{0}(s)={}&0\\[10pt]S_{1}(s)={}&s\\[10pt]S_{2}(s)={}&4s-4s^{2}\\={}&4s(1-s)\\[10pt]S_{3}(s)={}&9s-24s^{2}+16s^{3}\\={}&s(3-4s)^{2}\\[10pt]S_{4}(s)={}&16s-80s^{2}+128s^{3}-64s^{4}\\={}&16s(1-s)(1-2s)^{2}\\[10pt]S_{5}(s)={}&25s-200s^{2}+560s^{3}-640s^{4}+256s^{5}\\={}&s\left(5-20s+16s^{2}\right)^{2}\\[10pt]S_{6}(s)={}&36s-420s^{2}+1792s^{3}-3456s^{4}+3072s^{5}-1024s^{6}\\={}&4s(1-s)(1-4s)^{2}(3-4s)^{2}\\[10pt]S_{7}(s)={}&49s-784s^{2}+4704s^{3}-13440s^{4}+19712s^{5}-14336s^{6}+4096s^{7}\\={}&s\left(7-56s+112s^{2}-64s^{3}\right)^{2}\\[10pt]S_{8}(s)={}&64s-1344s^{2}+10752s^{3}-42240s^{4}+90112s^{5}-106496s^{6}\\&{}+65536s^{7}-16384s^{8}\\={}&64s(s-1)(1-2s)^{2}\left(1-8s+8s^{2}\right)^{2}\\[10pt]S_{9}(s)={}&81s-2160s^{2}+22176s^{3}-114048s^{4}+329472s^{5}-559104s^{6}\\&{}+552960s^{7}-294912s^{8}+65536s^{9}\\={}&s(-3+4s)^{2}\left(-3+36s-96s^{2}+64s^{3}\right)^{2}\\[10pt]S_{10}(s)={}&100s-3300s^{2}+42240s^{3}-274560s^{4}+1025024s^{5}\\&{}-2329600s^{6}+3276800s^{7}-2785280s^{8}+1310720s^{9}-262144s^{10}\\={}&4s(1-s)\left(5-20s+16s^{2}\right)^{2}\left(1-12s+16s^{2}\right)^{2}\\[10pt]S_{11}(s)={}&121s-4840s^{2}+75504s^{3}-604032s^{4}+2818816s^{5}\\&{}-8200192s^{6}+15319040s^{7}-18382848s^{8}+13697024s^{9}-5767168s^{10}+1048576s^{11}\\={}&s\left(11-220s+1232s^{2}-2816s^{3}+2816s^{4}-1024s^{5}\right)^{2}\end{aligned}} ## Laws of rational trigonometry

Wildberger states that there are five basic laws in rational trigonometry. He also states that these laws can be verified using high-school level mathematics. Some are equivalent to standard trigonometrical formulae with the variables expressed as quadrance and spread.

In the following five formulae, we have a triangle made of three points A1, A2, A3. The spreads of the angles at those points are s1, s2, s3, and Q1, Q2, Q3, are the quadrances of the triangle sides opposite A1, A2, A3, respectively. As in classical trigonometry, if we know three of the six elements s1, s2, s3, Q1, Q2, Q3, and these three are not the three s, then we can compute the other three.

The three points A1, A2, A3 are collinear if and only if:

$(Q_{1}+Q_{2}+Q_{3})^{2}=2\left(Q_{1}^{2}+Q_{2}^{2}+Q_{3}^{2}\right)$ where Q1, Q2, Q3 represent the quadrances between A1, A2, A3 respectively. It can either be proved by analytic geometry (the preferred means within rational trigonometry) or derived from Heron's formula, using the condition for collinearity that the triangle formed by the three points has zero area.

Proof (click at right to show/hide)

The line AB has the general form:

$ax+by+c=0$ where the (non-unique) parameters a, b, c can be expressed in terms of the coordinates of points A and B as:

{\begin{aligned}a&=A_{y}-B_{y}\\b&=B_{x}-A_{x}\\c&=A_{x}B_{y}-A_{y}B_{x}\end{aligned}} so that, everywhere on the line:

$\left(A_{y}-B_{y}\right)x+\left(B_{x}-A_{x}\right)y+\left(A_{x}B_{y}-A_{y}B_{x}\right)=0.$ But the line can also be specified by two simultaneous equations in a parameter t, where t = 0 at point A and t = 1 at point B:

{\begin{aligned}x&=(B_{x}-A_{x})t+A_{x},\\y&=(B_{y}-A_{y})t+A_{y},\end{aligned}} or, in terms of the original parameters:

{\begin{aligned}x&=bt+A_{x},\\y&=-at+A_{y}.\end{aligned}} If the point C is collinear with points A and B, there exists some value of t (for distinct points, not equal to 0 or 1), call it λ, for which these two equations are simultaneously satisfied at the coordinates of the point C, such that:

{\begin{aligned}C_{x}&=b\lambda +A_{x}.\\C_{y}&=-a\lambda +A_{y}.\end{aligned}} Now, the quadrances of the three line segments are given by the squared differences of their coordinates, which can be expressed in terms of λ:

{\begin{aligned}Q(AB)&\equiv (B_{x}-A_{x})^{2}+(B_{y}-A_{y})^{2}\\&=b^{2}+(-a)^{2}\\&=a^{2}+b^{2}\\[10pt]Q(BC)&\equiv (C_{x}-B_{x})^{2}+(C_{y}-B_{y})^{2}\\&={\bigl (}(b\lambda +A_{x})-B_{x}{\bigr )}^{2}+{\bigl (}(-a\lambda +A_{y})-B_{y}{\bigr )}^{2}\\&={\bigl (}b\lambda +(A_{x}-B_{x}){\bigr )}^{2}+{\bigl (}-a\lambda +(A_{y}-B_{y}){\bigr )}^{2}\\&={\bigl (}b\lambda +(-b){\bigr )}^{2}+(-a\lambda +a)^{2}\\&=b^{2}(\lambda -1)^{2}+a^{2}(-\lambda +1)^{2}\\&=b^{2}(\lambda -1)^{2}+a^{2}(\lambda -1)^{2}\\&=\left(a^{2}+b^{2}\right)(\lambda -1)^{2}\\[10pt]Q(AC)&\equiv (C_{x}-A_{x})^{2}+(C_{y}-A_{y})^{2}\\&={\bigl (}(b\lambda +A_{x})-A_{x}{\bigr )}^{2}+{\bigl (}(-a\lambda +A_{y})-A_{y}{\bigr )}^{2}\\&=(b\lambda +A_{x}-A_{x})^{2}+(-a\lambda +A_{y}-A_{y})^{2}\\&=(b\lambda )^{2}+(-a\lambda )^{2}\\&=b^{2}\lambda ^{2}+(-a)^{2}\lambda ^{2}\\&=b^{2}\lambda ^{2}+a^{2}\lambda ^{2}\\&=\left(a^{2}+b^{2}\right)\lambda ^{2}\end{aligned}} where use was made of the fact that (−λ + 1)2 = (λ − 1)2.

Substituting these quadrances into the equation to be proved:

{\begin{aligned}{\bigl (}Q(AB)+Q(BC)+Q(AC){\bigr )}^{2}&=2\left(Q(AB)^{2}+Q(BC)^{2}+Q(AC)^{2}\right)\\\left(\left(a^{2}+b^{2}\right)+\left(a^{2}+b^{2}\right)(\lambda -1)^{2}+\left(a^{2}+b^{2}\right)\lambda ^{2}\right)^{2}&=2\left(\left(a^{2}+b^{2}\right)^{2}+\left(\left(a^{2}+b^{2}\right)(\lambda -1)^{2}\right)^{2}+\left(\left(a^{2}+b^{2}\right)\lambda ^{2}\right)^{2}\right)\\\left(a^{2}+b^{2}\right)^{2}\left(1+(\lambda -1)^{2}+\lambda ^{2}\right)^{2}&=2\left(a^{2}+b^{2}\right)^{2}\left(1+\left((\lambda -1)^{2}\right)^{2}+\left(\lambda ^{2}\right)^{2}\right)\end{aligned}} Now, if A and B represent distinct points, such that a2 + b2 ≠ 0, we may divide both sides by Q(AB)2 = (a2 + b2)2:

{\begin{aligned}\left(1+\lambda ^{2}-2\lambda +1+\lambda ^{2}\right)^{2}&=2\left(1+\left(\lambda ^{2}-2\lambda +1\right)^{2}+\lambda ^{4}\right)\\\left(2\lambda ^{2}-2\lambda +2\right)^{2}&=2\left(1+\lambda ^{4}-2\lambda ^{3}+\lambda ^{2}-2\lambda ^{3}+4\lambda ^{2}-2\lambda +\lambda ^{2}-2\lambda +1+\lambda ^{4}\right)\\4\left(\lambda ^{2}-\lambda +1\right)^{2}&=2\left(2\lambda ^{4}-4\lambda ^{3}+6\lambda ^{2}-4\lambda +2\right)\\4\left(\lambda ^{4}-\lambda ^{3}+\lambda ^{2}-\lambda ^{3}+\lambda ^{2}-\lambda +\lambda ^{2}-\lambda +1\right)&=4\left(\lambda ^{4}-2\lambda ^{3}+3\lambda ^{2}-2\lambda +1\right)\\\lambda ^{4}-2\lambda ^{3}+3\lambda ^{2}-2\lambda +1&=\lambda ^{4}-2\lambda ^{3}+3\lambda ^{2}-2\lambda +1\end{aligned}} ### Pythagoras's theorem

The lines A1A3 (of quadrance Q1) and A2A3 (of quadrance Q2) are perpendicular (their spread is 1) if and only if:

$Q_{1}+Q_{2}=Q_{3}.$ where Q3 is the quadrance between A1 and A2.

This is equivalent to the Pythagorean theorem (and its converse).

There are many classical proofs of Pythagoras's theorem; this one is framed in the terms of rational trigonometry.

The spread of an angle is the square of its sine. Given the triangle ABC with a spread of 1 between sides AB and AC,

$Q(AB)+Q(AC)=Q(BC)$ where Q is the "quadrance", i.e. the square of the distance.

Proof

Construct a line AD dividing the spread of 1, with the point D on line BC, and making a spread of 1 with DB and DC. The triangles ABC, DBA and DAC are similar (have the same spreads but not the same quadrances).

This leads to two equations in ratios, based on the spreads of the sides of the triangle:

{\begin{aligned}s_{C}&={\frac {Q(AB)}{Q(BC)}}&&={\frac {Q(BD)}{Q(AB)}}&&={\frac {Q(AD)}{Q(AC)}}.\\s_{B}&={\frac {Q(AC)}{Q(BC)}}&&={\frac {Q(DC)}{Q(AC)}}&&={\frac {Q(AD)}{Q(AB)}}.\end{aligned}} For convenience, but with no loss of generality, we orient the lines intersecting with a spread of 1 to the coordinate axes, and label the dividing line with coordinates (x1, y1) and (x2, y2). Then the two spreads are given by:

{\begin{aligned}s_{1}&={\frac {(x_{2}-x_{2})^{2}+(y_{2}-y_{1})^{2}}{(x_{2}-x_{1})^{2}+(y_{2}-y_{1})^{2}}}&&={\frac {(y_{2}-y_{1})^{2}}{(x_{2}-x_{1})^{2}+(y_{2}-y_{1})^{2}}},\\s_{2}&={\frac {(x_{2}-x_{1})^{2}+(y_{2}-y_{2})^{2}}{(x_{2}-x_{1})^{2}+(y_{2}-y_{1})^{2}}}&&={\frac {(x_{2}-x_{1})^{2}}{(x_{2}-x_{1})^{2}+(y_{2}-y_{1})^{2}}}.\end{aligned}} Hence

$s_{1}+s_{2}={\frac {(x_{2}-x_{1})^{2}+(y_{2}-y_{1})^{2}}{(x_{2}-x_{1})^{2}+(y_{2}-y_{1})^{2}}}=1,$ so that

$s_{C}+s_{B}=1.$ Using the first two ratios from the first set of equations, this can be rewritten:

${\frac {Q(AB)}{Q(BC)}}+{\frac {Q(AC)}{Q(BC)}}=1.$ Multiplying both sides by Q(BC):

$Q(AB)+Q(AC)=Q(BC).$ For any triangle A1A2A3 with nonzero quadrances:

${\frac {s_{1}}{Q_{1}}}={\frac {s_{2}}{Q_{2}}}={\frac {s_{3}}{Q_{3}}}.$ This is the law of sines, just squared.

### Cross law

For any triangle A1A2A3,

$(Q_{1}+Q_{2}-Q_{3})^{2}=4Q_{1}Q_{2}(1-s_{3}).$ This is analogous to the law of cosines. It is called the 'cross law' because (1 − s3), the square of the cosine of the angle, is called the 'cross'.

For any triangle A1A2A3,

$(s_{1}+s_{2}+s_{3})^{2}=2\left(s_{1}^{2}+s_{2}^{2}+s_{3}^{2}\right)+4s_{1}s_{2}s_{3}.$ This relation can be derived from the formula for the sine of a compound angle: in a triangle (whose three angles sum to 180°) we have,

$\sin(a)=\sin(b+c)=\sin(b)\cos(c)+\sin(c)\cos(b)$ .

Equivalently, it describes the relationship between the spreads of three concurrent lines, as spread (like angle) is unaffected when the sides of a triangle are moved parallel to themselves to meet in a common point.

Knowing two spreads allows the third to be calculated by solving the associated quadratic formula. Since two solutions are produced, further triangle spread rules must be used to select the appropriate one. While this appears more complex than obtaining a supplementary angle directly by subtraction, the irrational value of 'π' (implicitly present in the angle sum of a triangle) is avoided.

## Trigonometry over arbitrary fields

As the laws of rational trigonometry give algebraic (and not transcendental) relations, they apply in generality to algebraic number fields beyond the rational numbers. Specifically, any finite field which does not have characteristic 2 reproduces a form of these laws, and thus a finite field geometry. The 'plane' formed by a finite field Fp is the cartesian product Fp × Fp of all ordered pairs of field elements, with opposite edges identified forming the surface topologically equivalent to a discretized torus. Individual elements correspond to standard 'points' and 'lines' to sets of no more than $p$ points related by incidence (an initial point) plus direction or slope given in lowest terms (say all points '2 over and 1 up') that 'wrap' the plane before repeating.

### Example: (verify the spread law in F13)

The figure (right) shows a triangle of three such lines in the finite field setting F13 × F13:

Each line has its own symbol and the intersections of lines (vertices) is marked by two symbols present at points:

(2, 8), (9, 9) and (10, 0).

Using Pythagoras's theorem with arithmetic modulo 13, we find these sides have quadrances of:

(9 − 2)2 + (9 − 8)2 = 50 ≡ 11 mod 13
(9 − 10)2 + (9 − 0)2 = 82 ≡ 4 mod 13
(10 − 2)2 + (0 − 8)2 = 128 ≡ 11 mod 13

Rearranging the cross law as

$s_{3}=1-{\frac {(Q_{1}+Q_{2}-Q_{3})^{2}}{4Q_{1}Q_{2}}}$ gives separate expressions for each spread, in terms of the three quadrances:

1 − (4 + 11 − 11)2/4 × 4 × 11 = 1 − 3/7 ≡ 8 mod 13
1 − (11 + 11 − 4)2/4 × 11 × 11 = 1 − 12/3 ≡ 10 mod 13
1 − (4 + 11 − 11)2/4 × 4 × 11 = 1 − 3/7 ≡ 8 mod 13

In turn we note these ratios are all equal – as per the spread law (at least in mod 13):

8/11 : 10/4 : 8/11

Since first and last ratios match (making the triangle isosceles) we just cross multiply, and take differences, to show equality with the middle ratio also:

11 × 10 − 8 × 4 = 78 ≡ 0 mod 13

Otherwise, the standard Euclidean plane is taken to consist of just rational points, ℚ × ℚ, omitting any non-algebraic numbers as solutions. Properties like incidence of objects, representing the solutions or 'content' of geometric theorems, therefore follow a number theoretic approach that differs and is more restrictive than one allowing real numbers. For instance, not all lines passing through a circle's centre are considered to meet the circle at its circumference. To be incident such lines must be of the form

{\begin{aligned}ax+by&=0\\a^{2}+b^{2}&=c^{2}\end{aligned}}\quad a,b,c\in \mathbb {Q} and necessarily meet the circle in a rational point.

## Computation – complexity and efficiency

Rational trigonometry makes nearly all problems solvable with only addition, subtraction, multiplication or division, as trigonometric functions (of angle) are purposefully avoided in favour of trigonometric ratios in quadratic form. At most, therefore, results required as distance (or angle) can be approximated from an exact-valued rational equivalent of quadrance (or spread) after these simpler operations have been carried out. To make use of this advantage however, each problem must either be given, or set up, in terms of prior quadrances and spreads, which entails additional work.

The laws of rational trigonometry, being algebraic, introduce subtleties into the solutions of problems, such as non-additivity of quadrances of collinear points (via the triple quad formula) or spreads of concurrent lines (via the triple spread formula) to give rational-valued outputs. By contrast, in the classical subject linearity is incorporated into distance and angular measurements to simplify these operations, albeit by 'transcendental' techniques employing real numbers entailing approximate valued output.