Skip to content

Instantly share code, notes, and snippets.

@RazorBest
Last active March 9, 2026 10:54
Show Gist options
  • Select an option

  • Save RazorBest/0e1d5a8d42c5dce10fc9ce4248cfad7a to your computer and use it in GitHub Desktop.

Select an option

Save RazorBest/0e1d5a8d42c5dce10fc9ce4248cfad7a to your computer and use it in GitHub Desktop.
The point at infinity in elliptic curves

The point at infinity in elliptic curves

Prerequisites:

  • The properties of a group
  • Elliptic curve point addition

An elliptic curve is a group. Its elements are closed under point addition.

Check addition: https://www.desmos.com/calculator/ialhd71we3

The point at infinity is the identity element of the group. There is no point in the curve that can be the identity element, so we need to include a new element, with the special property that it is the identity.

When doing addition, we have two steps:

  • Draw a line between P and Q. Find the third point on the curve that intersects that line.
  • Reflect that point

When P or Q is the identity element, these steps become:

  • Draw a vertical line through P. Find the second point on the curve that intersects that line
  • Reflect that point

You can see that that these two steps cancel each other. They're the exact same operation, but rephrased differently.

Why is it called "at infinity?". There are two ways to think about this.

The homogeneous coordinates explanation

The short Weierstrass form of a curve:

$$y^2=x^3+ax+b$$

The equivalent projective curve:

$$Y^2Z = X^3 + aXZ^2 + bZ^2$$

Where $(X:Y:Z)$ belongs to the projective plane $\mathbb{P}^2$, with the equivalence relation:

$$(X:Y:Z) \sim (\lambda X:\lambda Y: \lambda Z) ,\ \forall \lambda \neq 0$$

The values of the projective coordinates of a curve can be mapped back to the afine coordinates:

$$\phi(X:Y:Z) \mapsto (X/Z, Y/Z) $$

The neutral element in the projective coordinates is $(0:1:0)$. If we try to use the previous function to represent this point with afine coordinates:

$$\phi(0:1:0) = (0/0, 1/0) = (0/0, \pm \infty)$$

Are you confused about projective coordinates and want to find more about it? Check out this book. It's a good introduction on Elliptic Curves: https://books.google.ch/books?id=mAJei2-JcE4C.

The visual explanation

Check out this desmos graph: https://www.desmos.com/calculator/ialhd71we3

Let's say you have two points and you plot the result of their addition. Also, assume that those two points are on the same sign side of the y axis.

If you move the second point further away, you'll observe that the result of the addition gets closer to the first point. Without any mathematical rigurosity, we can say that:

As $Q\rightarrow \infty$, $P+Q\rightarrow P$.

Point at infinity in practice

Openssl:

Bitcoin's secp256k1:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment