Back to blogs
Written by
Ciara Nightingale
Published on
August 28, 2025

ZK Math 101: Understanding Elliptic Curves

Elliptic curves are algebraic curves often used in cryptography. Dive into a technical exploration of them, their structure, properties, point addition, and use in ZKPs.

Table of Contents

Elliptic curves are a class of algebraic curves frequently used in cryptography, most notably in the elliptic curve digital signature algorithm (ECDSA) and some SNARK-based zero-knowledge proofs (ZKPs) such as PLONK. But what are they, how do they work, and why are they used?

This article provides a technical exploration of elliptic curves, their mathematical structure, properties, elliptic curve point addition, and their application in cryptography and ZKPs.

Note that this resource is intended for programmers to familiarize themselves with the mathematical prerequisites for understanding cryptography and zero-knowledge proofs. The mathematical derivations have been omitted for brevity, but resources will be linked for those wanting to understand further.

What is an elliptic curve?

Elliptic curves are a class of algebraic curve with an equation of the form:

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

where $a$ and $b$ are constant coefficients. The curves must be defined over a field $K$, meaning the coordinates $(x,y)$ and coefficients $(a,b)$ must all be elements of field $K$.

This is the most common form of elliptic curve equation, known as the affine Weierstrass form. Others include the twisted Edwards form and the Montgomery form, which will not be covered in this article.

In Figure 1 below, you can see the elliptic curve defined over the field of real numbers, where $a=-1$ and $b=1$

Illustration of the elliptic curve y^2 = x^3 + -1x + 1, defined over the infinite field of real numbers with constant coefficients $a=-1$ and $b=1$.
Figure 1: Elliptic curve defined over the infinite field of real numbers with constant coefficients a=-1 and b=1.


A point $(x, y)$ on an elliptic curve
is the value of $y$ and $x$ that satisfies the above equation for a given $a$ and $b$.

The curve must be non-singular (i.e., it has no sharp points, known as cusps, or self-intersections). This is checked using the discriminant $\Delta = 4a^3 + 27b^2$ which must not be zero ($\Delta \not= 0$). This ensures that mathematical operations such as point addition (covered later in this article) are well-defined at every point on the curve.

Elliptic curves must be defined over a field $K$, meaning the coordinates $(x,y)$ and the curve parameters $a$ and $b$ must all be elements of field $K$.

When we refer to elliptic curves "over" some field, we're specifying the set from which all values are drawn:

  • Elliptic curve over the real numbers $E(\mathbb{R})$: coordinates and parameters are real numbers, creating smooth, continuous curves (like the one in Figure 1).
  • Elliptic curve over a finite field $E(\mathbb{F}_p)$: coordinates and parameters are elements of the finite field $\mathbb{F_p}$, creating discrete sets of points.


The elliptic curves we've examined so far have been over the real numbers, which is why Figure 1 shows a continuous, smooth plot. This will be the focus of this article, but note that the same characteristics hold for elliptic curves over finite fields.

Elliptic curve groups

The points on an elliptic curve form a set. When considering real numbers, this is, of course, an infinite set of points that satisfy the equation of an elliptic curve. We can also “add” these points together using a binary operator called elliptic curve point addition.

The process of adding together points is a little more complicated than simply “summing the x coordinates and then the y coordinates.” We shall discuss specifically how point addition actually works shortly. Still, the most important takeaway is:

The set of elliptic curve points equipped with the point addition binary operator forms an Abelian group.

And given this fact, we can define this “point addition” operator such that it adheres to the required rules of Abelian groups.

Recall that to be an Abelian group, the set of elliptic curve points under the point addition operator needs to satisfy the following properties (remember the mnemonic Clearly Cyfrin Is Incredibly Awesome):

Where, $P$, $Q$ and $R$ are all points on the elliptic curve with $x$ and $y$ coordinates and $+$ is the point addition operator (not regular addition).

  1. Closure: Point addition between two points in the set produces another point in the set (so it will also be a point on the elliptic curve).

    $$P + Q = R$$

    Where $R$ is in the set.
  2. Identity element: There must exist an identity element in the set, such that when added using point addition to a point, the result is the point itself:

    $$P + I = P$$

    For elliptical curves, the identity element is the point at infinity $\mathcal{O}$. To understand the point at infinity, we'll introduce a different coordinate system later in this article.
  3. Inverses: Every point in the set must have an inverse such that when the point and its inverse are combined with the binary operator, the result is the group identity element $\mathcal{O}$:

    $$P + (-P) = \mathcal{O}$$

    The inverse of a point $P = (x,y)$ is defined as $-P = (x,-y)$ and the addition of these points is equal to $\mathcal{O}$. How this is the case will make more sense once we define point addition.
  4. Associative:

    $$P + (Q + R) = (P+Q)+R$$
  5. Since we said it is an Abelian group, it also must be commutative:

    $$P + Q = Q + P$$


But we still don’t know what this mystical “point addition” operator is so let’s define it .

Elliptic curve point addition over real numbers

Point addition is the addition of two points $P = (x_1, y_1)$ and $Q = (x_2, y_2)$ on the elliptic curve. It is not addition in the “usual” sense, but instead is defined by the following geometric rules:

  • If $P \neq Q$, the line through the two points $P$ and $Q$ must intersect the curve at a third point $R$ (unless the line is perfectly vertical). This comes directly from Bezout’s Theorem:

    Bezouts theorem says that two curves $C$ and $D$ of degree $m$ and $n$ respectively meet in precisely $mn$ points.

    Here, our two “curves” are the elliptic curve and the straight like connecting $P$ and $Q$. Using the fact that the two must intersect in three points, $P$, $Q$ and $R$:
  • To add two points $P+Q$:
    • Connect: the points with a line.
    • Intersect: find the third point at which the line intersects the curve $R$.
    • Reflect: across the x-axis
Graph illustrating elliptic curve point addition.
Figure 2: Elliptic curve point addition.
  • If a line intersects an elliptic curve at two points, it will always intersect the curve at a third point as long as the line is not perfectly vertical
  • If $P = Q$, the tangent line at $P$ intersects the curve at another point on the curve $R$, and $2P$ is defined as the reflection of this point in the $x$ axis.
Graph of elliptic curve point doubling
Elliptic curve point doubling.


We can use this point doubling to define scalar multiplication of elliptic curve points.

Point multiplication (multiplication between points) does not exist in the group since it is defined with the point addition operator. However, we can use scalar multiplication, which is defined as simply adding a point to itself a number of times equal to the scalar. "Scalar" refers to a regular number (like an integer), rather than another group element. For example, let’s do some scalar multiplication of $P$:

$$2P = P + P$$

$$4P = P + P + P + P$$

Or, more generally:

$$xP = \underbrace{P + P + ... + P}_{ x \space times}$$

This is scalar multiplication! Remember that $+$ is point addition that follows the geometric rules rather than regular addition.

  • Adding any point P to its inverse $(-P)$: The result is always the identity element as defined by the group laws!

    $$P + (-P) = \mathcal{O}$$

    The inverse of $P$ is defined as $−P$, which has coordinates $(x,-y)$. Geometrically, when $P$ and $−P$ are added, the line connecting these two points vertically intersects the elliptic curve at the point $\mathcal{O}$, which is the identity element for elliptic curve groups and is known as the point at infinity, which we will revisit shortly.
Graph of an eElliptic curve addition of a point with it’s inverse.
Elliptic curve addition of a point with it’s inverse.

Why do we reflect the point on the x-axis?

As we’ve said, if you draw a line through two points $P$ and $Q$ on an elliptic curve, it intersects the curve at a third point, call it $R'$.

The key geometric fact is: three collinear points on the curve sum to zero:

$$P + Q + R' = \mathcal{O}$$

Now, suppose we defined addition as $P+Q=R'$. Then this relation would read:


$$P + Q + (P+Q) = \mathcal{O}$$

Which simplifies to


$$2(P+Q) = \mathcal{O}$$


That would mean every sum is its own inverse. This clearly breaks the group laws: we would not have a consistent identity or inverses.

To fix this, we redefine the sum to be the reflection of the third point:


$$P+Q=−R'$$


Now the relation becomes:


$$P + Q + (- (P+Q)) = \mathcal{O}$$


which is consistent with the requirement that every point has an inverse and that the point at infinity $\mathcal{O}$ acts as the identity.

With this definition:

  • $P + (-P) = \mathcal{O}$ (vertical lines hit $\mathcal{O}$),
  • Every point has a well-defined inverse,
  • And the elliptic curve points (plus $\mathcal{O}$) form an Abelian group.

By convention, we write $P+Q=R$, where $R$ is already included with this reflection step.

Let’s now define what $\mathcal{O}$ is.

The identity element: the point at infinity

The point at infinity $\mathcal{O}$ serves as the identity element for elliptic curves, such that $P + \mathcal{O} = P$ for all $P$. This is the point at which two parallel lines would eventually intersect.

Intuitively, it may seem logical to say that $(0,0)$ would be the identity element since any point plus $(0,0)$ should return the original point, right? However, this is not the case, which may sound confusing, but here’s why:

  • Point addition is not “normal” addition. Instead, it involves following the geometric rules stated above: connect, intersect, reflect.
  • These are not “normal” numbers but elliptic curve points.
  • $(0,0)$ is not on the curve, therefore not in the group.
  • Working in projective coordinates, the point at infinity is represented as $(0:1:0)$ and indeed lies on the curve. This will be introduced and explained shortly.

Under point addition, the point at infinity must satisfy the following properties:

  • Adding $\mathcal{O}$ to any point $P$: The result is always $P$. Mathematically, $P+\mathcal{O}=P$. This satisfies the identity property.
  • Adding any point P to its inverse: Remember from before, the result is always the identity element. Hopefully, this should make more sense now that we know what $\mathcal{O}$ is:

    $$P + (-P) = \mathcal{O}$$.

To really understand the point at infinity, we need to move to a different coordinate system: projective coordinates.

Affine vs. projective coordinates

Affine coordinates are similar to "normal" Cartesian coordinates $(x,y)$ but they offer more flexibility with regard to geometric transformations, such as scaling and translation.

This is because affine coordinates do not require properties such as lengths and angles to be preserved, like Cartesian coordinates do. This flexibility allows us to define operations like point addition on elliptic curves while maintaining important algebraic properties like commutativity and associativity.

Don’t get too hung up on affine coordinates. All you need to know is that they are “normal” coordinates that allow us to define point addition.

In affine coordinates, as stated above, the Weierstrass equation of an elliptic curve is:

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

In this system, the point at infinity has no finite affine $(x,y)$ representation, so it does not lie on the curve in the affine or Euclidean planes.

Elliptic curves are often described using projective coordinates, which are an extension of affine coordinates for handling points at infinity.

The key insight is that projective coordinates don't directly correspond to spatial directions. They're a mathematical formalism that allows us to represent points that would otherwise be "infinitely far away" in the affine plane.

In projective geometry, points are represented in homogeneous coordinates in which $(X:Y:Z)=(2X:2Y:2Z)$, where two sets of coordinates $(X_1:Y_1:Z_1)$ and $(X_2:Y_2:Z_2)$ represent the same point if one is a scalar multiple of the other. $Z$ is often referred to as the scaling factor and represents whether the point is at infinity or not:

  • If $Z$ is $0$ then the point is at infinity, distinct from the point at infinity.
  • There are infinitely many points at infinity that can be represented in projective coordinates, think of it like going to infinity in different directions, e.g., $(1:2:0)$, $(3:1:0)$, $(1:0:0)$, $(0:1:0)$ are all valid examples.
  • Each represents a different "direction" to infinity
  • While the projective plane contains an entire "line at infinity" (all points where $Z=0$), only one point from this line actually satisfies the projective elliptic curve equation.
  • This single point at infinity serves as the identity element for the elliptic curve group.
  • The point at infinity is $(0:1:0)$. This is infinity in the $Y$ direction. When visualizing the curve in the affine plane, this point can be thought of as connecting the two "branches" of the curve that extend upward and downward as $x$ goes to infinity.

Affine coordinates $(x,y)$ are related to projective coordinates by the transformation $x=\frac{X}{Z}$ and $y=\frac{Y}{Z}$.

Check for yourself if Z≠0, the original affine coordinate is recovered and if Z=0 then the point is at infinity!

The key takeaway is:

The point at infinity is represented in projective coordinates as $(0:1:0)$.

Using these coordinate transformations, we can construct the Weierstrass form of elliptic curves in projective coordinates:

$$(\frac{Y}{Z})^2=(\frac{X}{Z})^3+a(\frac{X}{Z})+b$$

Multiplying up by $Z^3$ gives the Weierstrass form of elliptic curves in projective coordinates:

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

Finally, substituting the point at infinity $(0:1:0)$ we can verify that it lies on the curve:

$$Y^2Z = X^3 + aXZ^2+bZ^3 = (1)^2*(0) = (0)^3+a*(0)(0)^2+b(0)^3 = 0$$

Therefore, the point at infinity is well-defined in projective coordinates, lies on the curve, and is the identity element, woohoo!

And that’s it, now we know:

  1. What an elliptic curve is.
  2. How to do point addition between elliptic curve points.
  3. How to define the identity element for the group of elliptic curve points: the point at infinity.

Now, let’s see, in the next article, how elliptic curves work when we define them, not in the world of real numbers but in a finite field of integers modulo $p$ and how we can then define the elliptic curve discrete logarithm problem!

What’s next?

While real-number elliptic curves help us build geometric intuition, cryptography and zero-knowledge protocols require working over finite fields where coordinates are integers modulo some prime number. In the next article, we move from continuous curves to their discrete counterparts by defining elliptic curves over finite fields. We will examine how the same group law applies and how this shift enables efficient computation and strong security guarantees in elliptic curve cryptography due to the elliptic curve discrete logarithm problem (ECDLP).

Summary

In this article, we covered:

  • Elliptic curves are defined by the equation $y^2 = x^3 + ax + b$, forming an Abelian group under point addition.
  • Point addition follows the "connect-intersect-reflect" process, with the point at infinity $\mathcal{O}$ serving as the identity element.
  • Scalar multiplication (repeated point addition) forms the basis for elliptic curve cryptography.
  • Reflection during point addition is necessary to maintain associativity in the group structure.
  • Projective coordinates $(X:Y:Z)$ allow us to properly represent the point at infinity $(0:1:0)$.

References

Secure your protocol today

Join some of the biggest protocols and companies in creating a better internet. Our security researchers will help you throughout the whole process.
Stay on the bleeding edge of security
Carefully crafted, short smart contract security tips and news freshly delivered every week.