Point addition is the group operation for elliptic curves. This lesson computes one non-doubling add.

highlighted = computed this step

Why point addition has rows

Adding two curve points is modular arithmetic, not drawing by eye. The table recomputes the slope and the resulting coordinates.

P+Q=RP+Q=R
Adding two pointsPoint-addition rows recomputed from the two input points.Adding two points - R=(10,6)quantityvalueP(5,1)Q(6,3)doublefalseslope s2x3=s^2-x1-x210y3=s(x1-x3)-y16R=P+Q(10,6)

Pin P and Q

Use P=(5,1) and Q=(6,3).

P+QP+Q
Adding two pointsPoint-addition rows recomputed from the two input points.Adding two points - R=(10,6)quantityvalueP(5,1)Q(6,3)doublefalseslope s2x3=s^2-x1-x210y3=s(x1-x3)-y16R=P+Q(10,6)

Compute the slope

The slope is s=2 modulo p.

s=2s=2
Adding two pointsPoint-addition rows recomputed from the two input points.Adding two points - R=(10,6)quantityvalueP(5,1)Q(6,3)doublefalseslope s2x3=s^2-x1-x210y3=s(x1-x3)-y16R=P+Q(10,6)

Read R

The result is R=(10,6).

R=(10,6)R=(10,6)
Adding two pointsPoint-addition rows recomputed from the two input points.Adding two points - R=(10,6)quantityvalueP(5,1)Q(6,3)doublefalseslope s2x3=s^2-x1-x210y3=s(x1-x3)-y16R=P+Q(10,6)

Summary

Point addition lands on (10,6). NOTE: toy-modulus; no-side-channel; no-production; never-roll-your-own. Exact point arithmetic over a deliberately tiny prime field; real ECC uses about 256-bit curves such as Curve25519 in reviewed protocols.

P+Q=RP+Q=R
Adding two pointsPoint-addition rows recomputed from the two input points.Adding two points - R=(10,6)quantityvalueP(5,1)Q(6,3)doublefalseslope s2x3=s^2-x1-x210y3=s(x1-x3)-y16R=P+Q(10,6)