现充|junyu33

Why does elliptic curve point addition satisfy the associative law?

This article introduces the proof of the associativity law for elliptic curve point addition, as well as the stronger 9-point theorem. Additionally, it covers three corollaries of this theorem: Pascal's theorem, Pappus' theorem, and the polar principle of pole and polar for conic sections.

Elementary Proof

(Theorem 1:) For a non-singular elliptic curve E:y2=x3+Ax+B, take three distinct points P,Q,R such that the sum of any two or three points is not the point at infinity O. Define P+Q as the third intersection point of the line connecting P and Q with E, reflected about the x-axis (this point clearly lies on E). Then we have:

(P+Q)+R=P+(Q+R)

(Proof 1:) We attempt to prove this using a relatively elementary method. Let the coordinates of the three points P,Q,R on E be (x1,y1),(x2,y2),(x3,y3). Define λab=ybyaxbxa:

P+Q=(λ122x1x2,λ12((λ122x1x2)x1)y1)

Denote this point as S(xs,ys);

Q+R=(λ232x2x3,λ23((λ232x2x3)x2)y2)

Denote this point as T(xt,yt).

Then compute:

x(P+Q)+R=λs32xsx3xP+(Q+R)=λ1t2x1xt

Then verify that x(P+Q)+R=xP+(Q+R). Since manual calculation is quite tedious, we use Sagemath's Gröbner basis reduction to verify that the difference is 0.

# 1) Base polynomial ring and fraction field
R = PolynomialRing(QQ, ['A','B','x1','y1','x2','y2','x3','y3'], order='lex')
A,B,x1,y1,x2,y2,x3,y3 = R.gens()
K = R.fraction_field()

# 2) Addition formulas (x- and y-coordinate) using secant/slope; generic position
def xAdd(xa, ya, xb, yb):
    lam_ab = (yb - ya)/(xb - xa)
    return lam_ab**2 - xa - xb

def yAdd(xa, ya, xb, yb):
    lam_ab = (yb - ya)/(xb - xa)
    return -lam_ab*((lam_ab**2 - xa - xb) - xa) - ya

# 3) Lift symbols to fraction field
A,B,x1,y1,x2,y2,x3,y3 = [K(z) for z in (A,B,x1,y1,x2,y2,x3,y3)]

# 4) Build x((P+Q)+R) and x(P+(Q+R))
x12 = xAdd(x1,y1,x2,y2);  y12 = yAdd(x1,y1,x2,y2)
x23 = xAdd(x2,y2,x3,y3);  y23 = yAdd(x2,y2,x3,y3)

xA  = xAdd(x12,y12,x3,y3)   # x((P+Q)+R)
xB  = xAdd(x1,y1,x23,y23)   # x(P+(Q+R))

# 5) Take common-denominator numerator and reduce modulo the curve ideal
diff = xA - xB
num  = diff.numerator()  # element of R up to a unit; denominators assumed nonzero (generic position)

I = R.ideal([
    y1**2 - (x1**3 + A*x1 + B),
    y2**2 - (x2**3 + A*x2 + B),
    y3**2 - (x3**3 + A*x3 + B)
])

rem = I.reduce(num)       # Gröbner normal form modulo the curve ideal
print(rem.is_zero())

The program outputs True, indicating that the associativity of point addition on the elliptic curve holds.

9-Points Theorem

In fact, this conclusion holds not only on elliptic curves but also on general cubic curves:

(Theorem Two:) In the projective plane PK2 (where K is the field of definition), let C be a cubic curve defined by the homogeneous cubic polynomial C(x,y,z)=0. Given three lines l1,l2,l3 and another three lines m1,m2,m3 such that limj, their intersection points Pij=limj (excluding P33) are all non-singular points on C. If these eight points are distinct (the original theorem does not require this condition; for brevity, we do not discuss coincident points here), then the intersection point P33 must also lie on the curve C.

An intuitive example is as follows, where l1,2,3 are the red lines, m1,2,3 are the blue lines, and the black curve is the cubic curve C:

(Proof Two:) The idea of the proof is to define D=Cαm1m2m3βl1l2l3=0, so that C=αm1m2m3+βl1l2l3. Then, since P33 lies on both l3 and m3, both αm1m2m3 and βl1l2l3 vanish, leading to C(P33)=0, i.e., P33 lies on the cubic curve C.

First, we parameterize the line equation l(x,y,z). Suppose l satisfies ax+by+cz=0 in PK2. We can set:

{x=a1u+b1vy=a2u+b2vz=a3u+b3v

to transform the line equation from l(x,y,z) to l~(u,v). Since line l1 passes through points P11,P12,P13, let (u1,v1),(u2,v2),(u3,v3) be the corresponding (u,v) parameter pairs for these three points on l1. Substituting the parameterization of l1 into the equations of lines mj gives m~j(u,v). Since P11,P12,P13 lie on m1,m2,m3 respectively, we have m~j(uj,vj)=0. On the other hand, points other than P1j do not lie on mj, so m~j(u,v) is a nonzero polynomial. Multiplying these three expressions, we obtain m~1(u,v)m~2(u,v)m~3(u,v), a homogeneous cubic polynomial in u and v.

Consider the following lemma:

(Lemma 2.1:) If two homogeneous cubic polynomials R and S intersect a line at three identical points (counting multiplicity), then there exists a constant α such that R=αS.

The lemma is intuitively clear. From the perspective of univariate functions, if two cubic functions R and S share the same three roots (with the line y=0), say x1,x2,x3 (which may coincide), then by the zero theorem, both functions must contain the polynomial (xx1)(xx2)(xx3). Since this polynomial is already cubic, the only difference between R and S is a constant factor α. The formal proof simply translates this univariate argument into projective and parameterized language, which we omit here.

For another homogeneous cubic polynomial C, apply the same l1-parameterization to transform it into C~(u,v). Clearly, C~ also passes through points P11,P12,P13. By Lemma 2.1, there exists a constant α such that C~=αm~1m~2m~3.

Suppose the projective equation of l1 is ax+by+cz=0, where a,b,c are not all zero. Without loss of generality, assume a0, so:

{x=(b/a)u(c/a)vy=uz=v

Let C1=Cαm1m2m3. Then C1(l1)=0. Write C1 as a polynomial in x: C1(x,y,z)=a3(y,z)x3+a2(y,z)x2+a1(y,z)x+a0(y,z). Note that:

xn=(1/a)n((ax+by+cz)(by+cz))n

Thus, we can rewrite:

C1(x,y,z)=a3(y,z)(ax+by+cz)3++a0(y,z)=a0(y,z)

and C~1(u,v)=C1((b/a)u(c/a)v,u,v)=a0(u,v)=0 (since C1(l1)0, independent of parameter choice). Since a0(u,v)=a0(y,z), we have (ax+by+cz)(C(x,y,z)αm1m2m3), i.e.:

l1(Cαm1m2m3)

Similarly, we have:

m1(Cβl1l2l3)

Now define:

D=Cαm1m2m3βl1l2l3

It is easy to show that m1D and l1D. Since l1 and m1 intersect but do not coincide, gcd(m1,l1)=1. By the unique factorization theorem, m1l1D, i.e., D=l1m1l, where l is also a linear form (a line).

Additionally, from the given conditions, C(P22)=C(P23)=C(P32)=0, and clearly αm1m2m3+βl1l2l3 also vanishes at these points. Hence, D(P22)=D(P23)=D(P32)=0. Since l1 and m1 do not pass through these three points, we have l(P22)=l(P23)=l(P32)=0.

Note that two points determine a line. This implies that l lies on both l2 and m2. Since l2m2, the only possibility is l0, which implies D0. Therefore, we have C=αm1m2m3+βl1l2l3, which is the conclusion we aimed to prove at the beginning. This shows that P33 lies on C.

After proving the 9-points theorem, we can show that the addition on elliptic curves satisfies associativity. As shown in the figure below, let P=P13, Q=P11, R=P31, and point E is (P+Q+R), the intersection of l3 and m3. By the 9-points theorem, C, l3, and m3 are concurrent. Computing ((P+Q)+R) gives the intersection of l3 and C, while computing (P+(Q+R)) gives the intersection of m3 and C. Therefore, these two intersection points are the same. This verifies ((P+Q)+R)=(P+(Q+R)), i.e., the associativity of point addition holds.


The 9-points theorem has a more general form:

(Theorem Three, Cayley–Bacharach:) Let X,YP2 be two cubic curves intersecting at nine distinct points p0,p1,,p8. If a cubic curve ZP2 passes through p1,,p8, then it also passes through p0.

It is easy to see that if X and Y degenerate into unions of three lines, this theorem reduces to the 9-points theorem.

(Proof Three:) This is a classical result in algebraic geometry. You can find it in Hartshorne's GTM52 (page 400, Corollary 4.5). Also, see the link on Banana Space: Cayley–Bacharach Theorem.

Pascal/Pappus

(Corollary Four, Pascal:) Let ABCDEF be a hexagon inscribed in a conic Γ (ellipse, parabola, or hyperbola), where A,B,C,D,E,F are distinct points in the affine plane. Let X be the intersection of AB and DE, Y be the intersection of BC and EF, and Z be the intersection of CD and FA. Then the three points X,Y,Z are collinear. As shown in the figure:

(Proof Four:) Let l1=EF, l2=AB, l3=CD, m1=BC, m2=DE, m3=FA. We can list the intersection table of the line family l and the line family m:

l1 l2 l3
m1 Y B C
m2 E X D
m3 F A Z

Let Q(x,y,z)=0 be the projective form of Γ, and let l(x,y,z)=0 be the projective form of the line XY. Then:

C(x,y,z)=Q(x,y,z)l(x,y,z)

is a homogeneous cubic polynomial, and C=0 must pass through the points A,B,C,D,E,F,X,Y. Since these eight points are all non-singular points in P2, the conditions of Theorem 2 (9-points theorem) are satisfied. By Theorem 2, we have C(Z)=0, and clearly Q(Z)0, so l(Z)=0. Therefore, X,Y,Z are collinear.


(Corollary Five, Pappus:) Let l and m be two distinct lines in the plane, A,B,C be distinct points on l, and A,B,C be distinct points on m. Assume none of these points is the intersection of l and m. Let X be the intersection of AB and AB, Y be the intersection of BC and BC, and Z be the intersection of CA and CA. Then the three points X,Y,Z are collinear. As shown in the figure:

(Proof Five:) Here, l and m represent the degenerate case of the conic in Theorem 4, and the corresponding hexagon is ABCABC.

Poles and Polar Lines

After learning about Pascal's theorem for ellipses, I recalled that some classmates in high school introduced properties related to poles and polar lines of conic sections. It seems these two concepts should be connected. First, let's define poles and polar lines (using an ellipse as an example):

(Definition Six, Pole and Polar Line:)

One fundamental property of poles and polar lines is the principle of polarity, stated as follows:

(Corollary Seven, Principle of Polarity:) For the same ellipse, if the polar line of point P passes through point Q, then the polar line of point Q passes through point P.

(Proof Seven:) Here, we provide a purely geometric proof using only Pascal's theorem. First, consider the case where P is inside the ellipse. According to the definition, construct its polar line IJ:

The original proof reduces to proving that the tangency points D and K of point Q with the ellipse satisfy the condition that D,P,K are collinear. Draw another secant QL through Q and temporarily hide other lines to obtain the following diagram:

We can see that HELGFM forms a hexagon inscribed in the ellipse. According to Pascal's theorem, the three intersection points X,Y,Z of HE and GF, EL and FM, and LG and MH are collinear (which indirectly proves that the polar line is a straight line):

Clearly, point X here is the same as point P mentioned earlier, so we can conclude that P lies on line YZ. The choice of secant QL is arbitrary. If we let points L and M approach each other infinitely (i.e., QL becomes tangent to the ellipse), we find that Y and Z coincide with the tangency point L:

Therefore, we can conclude that line PYZ passes through the tangency point L. Similarly, it also passes through the other tangency point L of point Q with the ellipse. According to the definition of the polar line of a point outside a circle, LL is the polar line of Q. Since two points determine a line, LL coincides with PYZ, so P lies on the polar line of Q.


The case where P lies on the ellipse is straightforward. First, the polar line of P is the tangent to the ellipse at P. Conversely, take any other point Q on this tangent. Draw the two tangents from Q to the ellipse. One of the tangency points is P, so P naturally lies on the polar line formed by connecting the two tangency points.


Now, consider the case where P lies outside the ellipse. According to the definition, draw two tangents from P to the ellipse. Connect the two tangency points D and E to obtain the polar line DE of P. Then, take a point Q on DE and construct its polar line JK according to the definition. This gives the following diagram (the original proposition reduces to proving that J,P,K are collinear):

Consider the degenerate case of the hexagon HHGFFI inscribed in the ellipse. The intersection points are K (intersection of HG and FI), J (intersection of GF and IH), and X (not shown, intersection of the tangents to the ellipse at H and F). According to Pascal's theorem, J,X,K are collinear. Therefore, X lies on the polar line JK of point Q.

Now, rotate line HF around point Q until it coincides with DE. Since the polar line depends only on the position of point Q, this operation does not change the position of the polar line JK. By the definition of points D and E, X must coincide with point P. Therefore, we have proven that P lies on JK, i.e., J,P,K are collinear.

Reference Materials

Elliptic Curves: Number Theory and Cryptography

https://www.bananaspace.org/wiki/Cayley–Bacharach_定理

https://en.wikipedia.org/wiki/Cayley–Bacharach_theorem