{
  "schema_version": 1,
  "title": "Deriving the point-doubling formulas",
  "url": "/writing/understanding-elliptic-curves/lessons/0003-point-doubling-derivation.html",
  "author": "Abhineet Biju",
  "text": "Chapter III · point doubling Deriving the point-doubling formulas Objective derive x₃ and y₃ Method geometry and algebra Requires point addition We can derive the point-doubling formulas directly from a line intersecting the curve. Why point addition uses a line We need point addition to stay on the curve, but coordinate-wise addition does not. A line and a cubic curve meet at three points when multiplicity is counted. If we know two intersections, the line determines the third. For a short Weierstrass curve, define three collinear curve points to sum to the identity 𝒪: P + Q + R = 𝒪 The curve is symmetric across the horizontal axis, so reflecting R=(x,y) gives its inverse −R=(x,−y). Therefore: P + Q = −RJoin P and Q, find the third intersection R, then reflect R. Point doubling uses the tangent line For distinct points P and Q, exactly one ordinary line passes through both. Its slope is: λ = (y₂ − y₁) / (x₂ − x₁) For P+P, both points occupy the same location. Infinitely many lines pass through one point, so an arbitrary line would produce an arbitrary third intersection and would not define P+P consistently. The tangent supplies the direction. You can think of it as the line through P and Q as Q moves toward P. The tangent touches the curve twice at P, so P is a double root and one intersection remains. Move P along the real curve Point P Slope λ Third point R Reflected 2P The diagram uses the real curve y²=x³−2x+2 so the tangent is visible. Cryptographic finite-field curves use the same algebra without a continuous picture. Derive the tangent slope Let's start with the general short Weierstrass equation over real numbers: y² = x³ + ax + b Differentiate both sides with respect to x: d(y²)/dx = d(x³ + ax + b)/dx 2y · dy/dx = 3x² + a dy/dx = (3x² + a) / 2y The derivative dy/dx is the tangent slope. At P=(x₁,y₁): λ = (3x₁² + a) / (2y₁) Distinct points use a secant slope. Doubling uses the tangent slope. Quick check 1 Why does point addition calculate a slope? Derive the output x-coordinate Write the line as y=λx+ν and substitute it into the curve: (λx + ν)² = x³ + ax + b x³ − λ²x² + (a − 2λν)x + (b − ν²) = 0 Its roots are the three intersection x-coordinates. Vieta's rule says the roots of x³+cx²+… add to −c. Here: x₁ + x₂ + xR = λ² xR = λ² − x₁ − x₂ For doubling, the tangent touches at P twice. That means x₁=x₂, counted as a double root: xR = λ² − 2x₁ Reflection changes only the y-coordinate, so the final sum keeps this x-coordinate: x₃ = λ² − 2x₁ Derive the output y-coordinate Point-slope form gives the y-coordinate of the third intersection R: yR = y₁ + λ(xR − x₁) But the group sum is −R, not R. Reflect across the horizontal axis: y₃ = −yR y₃ = −[y₁ + λ(x₃ − x₁)] y₃ = λ(x₁ − x₃) − y₁ The x-formula finds the third intersection. The y-formula reflects it. Reflection is part of the group-law definition. It gives each point the inverse (x,−y) and makes the identity and inverse rules work in their standard form. Apply point doubling modulo 17 A finite-field curve has no visual tangent, but the algebra still works over fields of characteristic other than 2 or 3. Now return to our toy curve and G=(5,1): y² ≡ x³ + 2x + 2 (mod 17) λ = (3·5² + 2) / (2·1) = 77 / 2 77 ≡ 9 and 2⁻¹ ≡ 9, so λ ≡ 9·9 ≡ 13 x₃ ≡ 13² − 2·5 ≡ 159 ≡ 6 y₃ ≡ 13(5 − 6) − 1 ≡ −14 ≡ 3 2G = (6,3) The formula is unchanged. Division becomes multiplication by a modular inverse, and every result wraps modulo 17. If 2y₁=0, the tangent is vertical and division has no inverse. In that special case, doubling returns the identity point 𝒪. Check your understanding Try to reconstruct each step before you open the solutions. Why does a line through two curve points produce a third intersection? Why does doubling use the tangent rather than an arbitrary line through P? How does differentiating the curve produce λ? How does the sum of three cubic roots produce x₃? Why do we reflect R to obtain the final y₃? Show numbered solutions Substituting y=λx+ν into the curve gives a cubic in x. A cubic has three roots with multiplicity. Two known intersections determine the third. As Q approaches P, their secant becomes the tangent at P. The tangent counts P as a repeated intersection and leaves one further intersection. An arbitrary line would select an arbitrary third point, so it could not define one consistent value for P+P. Differentiation gives 2y·dy/dx=3x²+a, then λ=(3x²+a)/(2y). In a finite field, division means multiplying by the inverse of 2y. The cubic's roots add to λ², so x₃=λ²−x₁−x₂. For doubling, x₁=x₂, giving x₃=λ²−2x₁. The inverse rule sends (x,y) to (x,−y). Reflecting the third intersection produces the sum and gives y₃=λ(x₁−x₃)−y₁. Without this reflection, the identity and inverse rules would not take their standard form. Primary reading MIT 18.783, lecture 2 derives the group law for Weierstrass curves and explains why three points on a line sum to the identity. SEC 1, section 2.2.1 specifies the finite-field point-addition and doubling operations used by short Weierstrass curves.",
  "headings": [
    {
      "level": 1,
      "id": null,
      "text": "Deriving the point-doubling formulas"
    },
    {
      "level": 2,
      "id": null,
      "text": "Why point addition uses a line"
    },
    {
      "level": 2,
      "id": null,
      "text": "Point doubling uses the tangent line"
    },
    {
      "level": 2,
      "id": null,
      "text": "Derive the tangent slope"
    },
    {
      "level": 3,
      "id": null,
      "text": "Quick check 1"
    },
    {
      "level": 2,
      "id": null,
      "text": "Derive the output x-coordinate"
    },
    {
      "level": 2,
      "id": null,
      "text": "Derive the output y-coordinate"
    },
    {
      "level": 2,
      "id": null,
      "text": "Apply point doubling modulo 17"
    },
    {
      "level": 2,
      "id": null,
      "text": "Check your understanding"
    },
    {
      "level": 3,
      "id": null,
      "text": "Primary reading"
    }
  ],
  "sections": [
    {
      "id": "why-add",
      "heading": "Why point addition uses a line",
      "text": "Why point addition uses a line We need point addition to stay on the curve, but coordinate-wise addition does not. A line and a cubic curve meet at three points when multiplicity is counted. If we know two intersections, the line determines the third. For a short Weierstrass curve, define three collinear curve points to sum to the identity 𝒪: P + Q + R = 𝒪 The curve is symmetric across the horizontal axis, so reflecting R=(x,y) gives its inverse −R=(x,−y). Therefore: P + Q = −RJoin P and Q, find the third intersection R, then reflect R."
    },
    {
      "id": "why-tangent",
      "heading": "Point doubling uses the tangent line",
      "text": "Point doubling uses the tangent line For distinct points P and Q, exactly one ordinary line passes through both. Its slope is: λ = (y₂ − y₁) / (x₂ − x₁) For P+P, both points occupy the same location. Infinitely many lines pass through one point, so an arbitrary line would produce an arbitrary third intersection and would not define P+P consistently. The tangent supplies the direction. You can think of it as the line through P and Q as Q moves toward P. The tangent touches the curve twice at P, so P is a double root and one intersection remains. Move P along the real curve Point P Slope λ Third point R Reflected 2P The diagram uses the real curve y²=x³−2x+2 so the tangent is visible. Cryptographic finite-field curves use the same algebra without a continuous picture."
    },
    {
      "id": "slope-formula",
      "heading": "Derive the tangent slope",
      "text": "Derive the tangent slope Let's start with the general short Weierstrass equation over real numbers: y² = x³ + ax + b Differentiate both sides with respect to x: d(y²)/dx = d(x³ + ax + b)/dx 2y · dy/dx = 3x² + a dy/dx = (3x² + a) / 2y The derivative dy/dx is the tangent slope. At P=(x₁,y₁): λ = (3x₁² + a) / (2y₁) Distinct points use a secant slope. Doubling uses the tangent slope. Quick check 1 Why does point addition calculate a slope?"
    },
    {
      "id": "x-formula",
      "heading": "Derive the output x-coordinate",
      "text": "Derive the output x-coordinate Write the line as y=λx+ν and substitute it into the curve: (λx + ν)² = x³ + ax + b x³ − λ²x² + (a − 2λν)x + (b − ν²) = 0 Its roots are the three intersection x-coordinates. Vieta's rule says the roots of x³+cx²+… add to −c. Here: x₁ + x₂ + xR = λ² xR = λ² − x₁ − x₂ For doubling, the tangent touches at P twice. That means x₁=x₂, counted as a double root: xR = λ² − 2x₁ Reflection changes only the y-coordinate, so the final sum keeps this x-coordinate: x₃ = λ² − 2x₁"
    },
    {
      "id": "y-formula",
      "heading": "Derive the output y-coordinate",
      "text": "Derive the output y-coordinate Point-slope form gives the y-coordinate of the third intersection R: yR = y₁ + λ(xR − x₁) But the group sum is −R, not R. Reflect across the horizontal axis: y₃ = −yR y₃ = −[y₁ + λ(x₃ − x₁)] y₃ = λ(x₁ − x₃) − y₁ The x-formula finds the third intersection. The y-formula reflects it. Reflection is part of the group-law definition. It gives each point the inverse (x,−y) and makes the identity and inverse rules work in their standard form."
    },
    {
      "id": "finite-field",
      "heading": "Apply point doubling modulo 17",
      "text": "Apply point doubling modulo 17 A finite-field curve has no visual tangent, but the algebra still works over fields of characteristic other than 2 or 3. Now return to our toy curve and G=(5,1): y² ≡ x³ + 2x + 2 (mod 17) λ = (3·5² + 2) / (2·1) = 77 / 2 77 ≡ 9 and 2⁻¹ ≡ 9, so λ ≡ 9·9 ≡ 13 x₃ ≡ 13² − 2·5 ≡ 159 ≡ 6 y₃ ≡ 13(5 − 6) − 1 ≡ −14 ≡ 3 2G = (6,3) The formula is unchanged. Division becomes multiplication by a modular inverse, and every result wraps modulo 17. If 2y₁=0, the tangent is vertical and division has no inverse. In that special case, doubling returns the identity point 𝒪."
    },
    {
      "id": "close",
      "heading": "Check your understanding",
      "text": "Check your understanding Try to reconstruct each step before you open the solutions. Why does a line through two curve points produce a third intersection? Why does doubling use the tangent rather than an arbitrary line through P? How does differentiating the curve produce λ? How does the sum of three cubic roots produce x₃? Why do we reflect R to obtain the final y₃? Show numbered solutions Substituting y=λx+ν into the curve gives a cubic in x. A cubic has three roots with multiplicity. Two known intersections determine the third. As Q approaches P, their secant becomes the tangent at P. The tangent counts P as a repeated intersection and leaves one further intersection. An arbitrary line would select an arbitrary third point, so it could not define one consistent value for P+P. Differentiation gives 2y·dy/dx=3x²+a, then λ=(3x²+a)/(2y). In a finite field, division means multiplying by the inverse of 2y. The cubic's roots add to λ², so x₃=λ²−x₁−x₂. For doubling, x₁=x₂, giving x₃=λ²−2x₁. The inverse rule sends (x,y) to (x,−y). Reflecting the third intersection produces the sum and gives y₃=λ(x₁−x₃)−y₁. Without this reflection, the identity and inverse rules would not take their standard form. Primary reading MIT 18.783, lecture 2 derives the group law for Weierstrass curves and explains why three points on a line sum to the identity. SEC 1, section 2.2.1 specifies the finite-field point-addition and doubling operations used by short Weierstrass curves."
    }
  ],
  "links": [
    {
      "label": "writing",
      "url": "/#writing"
    },
    {
      "label": "Return to chapter II",
      "url": "/writing/understanding-elliptic-curves/lessons/0002-elliptic-curve-point-addition.html"
    },
    {
      "label": "Formula sheet",
      "url": "/writing/understanding-elliptic-curves/reference/0002-point-addition-formulas.html"
    },
    {
      "label": "MIT 18.783, lecture 2",
      "url": "https://math.mit.edu/classes/18.783/2025/LectureNotes2.pdf"
    },
    {
      "label": "SEC 1, section 2.2.1",
      "url": "https://www.secg.org/sec1-v2.pdf"
    },
    {
      "label": "Previous: Elliptic-curve points and addition",
      "url": "/writing/understanding-elliptic-curves/lessons/0002-elliptic-curve-point-addition.html"
    },
    {
      "label": "Next: Scalar multiplication and keypairs",
      "url": "/writing/understanding-elliptic-curves/lessons/0004-scalar-multiplication-and-keypairs.html"
    }
  ]
}
