What’s the cheapest calculator you know of? Basic calculators are much cheaper than their scientific counterparts, and you can probably get one for £2. A slide rule is even cheaper: you could strap together two plastic rulers with logarithmic scales for about 20p — a saving of an order of magnitude. Pretty impressive for a couple of sliding scales.

We can do much better than this, though. You can print a fully functional calculator, capable of multiplication, division and extraction of square roots, on a single sheet of A4 (or A3 for ‘double precision’!) paper. This is probably an order of magnitude again cheaper than a regular slide rule, costing about 2 pence.

Clicking the above image will link to a full-size version, which you can print off and use. Note that it has two scales, red and blue, running in opposite directions on an elliptic (non-singular cubic) curve. The scales are reciprocals of each other; for any point labelled x in red and y in blue, xy = 1.

To multiply two numbers together, find them (ignoring decimal places; 10x and x are represented by the same point) in the same colour and draw a straight line through them. This will intersect the elliptic curve in a third point. Read the result off on the oppositely-coloured scale; this is the product of the two numbers!

Similarly, you can divide and compute square-roots, as shown in the pictorial instructions at the foot of the image. It’s very simple to use, but to explain why it works is much more difficult; it relies on some advanced algebraic geometry and group theory typically encountered in degree-level mathematics. If you really want to know why, continue reading. But be warned: the mathematics gets quite complicated.

It all boils down to the fact that the points on an elliptic curve form an Abelian group. This has a similar structure to the real numbers, which means that we can interchange between the two. (This is not so straightforward, requiring a transcendental function related to the Weierstrass P-function. I used repeated interval bisection and polynomial interpolation to obtain a good approximation instead.)

We define an operation on the points of the elliptic curve. We’ll represent this with a funky symbol such as @. For three collinear points on the curve, A, B and C, we say that A @ B @ C = e, where e is the identity element. It’s pretty obvious that B @ A @ C = e, as well, since the order of points on the line is unimportant. In other words, A @ B = B @ A — the group operation is commutative. It suffices only to show that A @ (B @ C) = (A @ B) @ C — associativity — before we can treat @ like addition or multiplication, which are themselves equivalent due to the exponential function. Proving associativity is possible with a lovely theorem called Cayley-Bacharach.

In my elliptic curve calculator, I have used @ to emulate multiplication. Division is rather routine, since it’s just reverse-engineering multiplication. Finding the point B with a tangent intersecting the curve at A is equivalent to solving A @ B @ B = e, so B is the square root of the reciprocal of A.

The geometry of elliptic curves has applications in advanced cryptography, where it offers superior security compared with ordinary RSA (Rivest-Shamir-Adleman). It’s very easy with repeated squaring to quickly compute the nth power (B = A @ A @ … @ A) of a point A on the curve. However, given A and B, it is very difficult to reverse-engineer the process to obtain n. This is known as the discrete logarithm problem. With some effort, it can be adapted into a cryptosystem similar to RSA, but in the setting of elliptic curves instead of modular arithmetic.

Elliptic curves were also the tools used by Andrew Wiles to prove (most of) the Tanayama-Shimura Conjecture and thus Fermat’s Last Theorem. The simplest proof of Poncelet’s porism also involves elliptic curves.