Level 1 · Explorer · chapter 15

15 Mirror images: 02 and 03

Level 1 · Explorer. You will learn that every point of the curve has a mirror image, how the visualizer shows it on the donut, on the flat map and on other shapes, and what the prefixes 02 and 03 of a Bitcoin key have to do with it. Read first: 13 Why a donut and 14 Two points: how far apart?.

Two points for every x

The rule of the curve gives y² (“y times y”), not y itself. A number squared does not care about its sign: 3 × 3 and (−3) × (−3) are both 9. So when one y fits, its negative fits too, and on a clock with p hours “minus y” is p − y. Every point (x, y) therefore has a partner

−P = (x, p − y),

with the same x and the other y. It is called the negation of P, or its mirror image, and the next sections show why.

There is one more fact that makes this matter for Bitcoin. p is odd, so y and p − y always have opposite parity: if one is even, the other is odd. A compressed public key stores x and one extra byte: 02 for “the even y” and 03 for “the odd y”. So 02 + x and 03 + x are always a point and its mirror image. The visualizer opens with exactly that pair, G and −G on Bitcoin’s curve:

Only the first byte differs.

Example 15.1 · The mirror button: P₂ = −P₁

On the small curve F₂₂₃, type 4G into P₁, then click the button next to P₂ whose tooltip says “Set P₂ = −P₁, the mirror image”.

F₂₂₃ from the side: P₁ = 4G on top of the tube and P₂ = −P₁ = 17G straight below it, joined by their shared ring, and the Relations section

Open this view: 4G and its mirror image

Do it yourself

  1. In Curve, pick the preset y² = x³ + 7 over F₂₂₃, Programming Bitcoin.
  2. Type 4G in P₁.
  3. Click the mirror button next to P₂ (its tooltip: “Set P₂ = −P₁, the mirror image”).
  4. Press 3 for the side view.
  5. In the 3D view, click P₁ and P₂ to pin their cards.
  6. Read the Relations section in the panel.

Look at:

Why: G has order 21 on this curve, and 4 + 17 = 21. Adding a point to its mirror image gives 𝒪, the point at infinity, and 21G is 𝒪, so the mirror image of 4G must be 17G. On Bitcoin’s curve the same rule makes the mirror image of G the key n − 1 (in hex, fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364140).

Relations also says P₁ + P₂ is “𝒪, the point at infinity”, and the chord row explains: “vertical line x = x₁: it meets the curve only at P, −P and 𝒪”. The dashed ring joining the two points is that vertical line, drawn on the donut. 24 Adding points explains chords.

Example 15.2 · On the flat map: a flip about the middle line

the same pair on the enlarged flat map: P₁ below the dashed middle line, P₂ above it at the same height from it

Open this view: 4G and −4G, flat map enlarged

Do it yourself

  1. In Curve, pick the preset y² = x³ + 7 over F₂₂₃, Programming Bitcoin.
  2. Type 4G in P₁.
  3. Click the mirror button next to P₂ (its tooltip: “Set P₂ = −P₁, the mirror image”).
  4. Click ⤢ on the flat map to enlarge it.

Look at: the enlarged flat map. The dashed line across the middle, marked ½, is y = p/2. P₁ is below it and P₂ is above it, exactly as far from the line as P₁, on the same vertical line.

Why: y ↦ p − y flips the square upside down around its middle line. That is why the whole cloud of dots on the map is symmetric top to bottom: every dot has its mirror image across the line. On the donut, the same flip is the reflection in the middle plane.

The mirror on other shapes

The visualizer can wrap the same points onto other shapes (16 One set of points, nine shapes). It places y on each of them so that the mirror image is still a true reflection. The next four examples show G and −G on Bitcoin’s curve.

Example 15.3 · On the sphere: north and south

secp256k1 on the sphere from the side: G in the northern half and −G at the same longitude in the southern half

Open this view: G and −G on the sphere

Do it yourself

  1. In Curve, pick the preset secp256k1: G and −G (mirror pair).
  2. In Shape, pick Sphere (or press S until it shows).
  3. Press 3 for the side view.
  4. In the 3D view, click P₁ and P₂ to pin their cards.

Look at: G in the northern half and −G in the southern half, at the same longitude and the same distance from the equator.

Why: on the sphere y sets the latitude, with y = 0 on the equator. The equator’s plane is the mirror: north and south swap, nothing else changes. The same G and −G were 156.853° apart around the tube on the donut.

Example 15.4 · On the icosahedron

secp256k1 on the icosahedron from the side: G above the mirror plane, −G straight below it

Open this view: G and −G on the icosahedron

Do it yourself

  1. In Curve, pick the preset secp256k1: G and −G (mirror pair).
  2. In Shape, pick Icosahedron (or press S until it shows).
  3. Press 3 for the side view.
  4. In the 3D view, click P₁ and P₂ to pin their cards.

Look at: the icosahedron (a solid with 20 triangular faces) from the side: G straight above −G.

Why: the icosahedron carries the sphere’s map pushed outward onto its faces. It is built so that the plane through its middle is a mirror of the solid itself, so the reflection still works.

Example 15.5 · On the wavy plane: an upright mirror

secp256k1 on the wavy plane from the top: G and −G mirrored across the middle line

Open this view: G and −G on the wavy plane

Do it yourself

  1. In Curve, pick the preset secp256k1: G and −G (mirror pair).
  2. In Shape, pick Wavy plane (or press S until it shows).
  3. Press 2 for the top view.
  4. In the 3D view, click P₁ and P₂ to pin their cards.

Look at: from the top, G and −G lie at equal distances on either side of the middle line of the wavy sheet.

Why: the wavy plane is the flat map lifted into 3D with waves. Its mirror is the upright plane through its middle line, which is the flat map’s line y = p/2 standing on edge.

Example 15.6 · On the trefoil knot: a mirror inside the ring

secp256k1 on the trefoil knot: G and −G on one ring of the tube, reflections of each other inside that ring

Open this view: G and −G on the trefoil

Do it yourself

  1. In Curve, pick the preset secp256k1: G and −G (mirror pair).
  2. In Shape, pick Trefoil knot (or press S until it shows).
  3. In the 3D view, click P₁ and P₂ to pin their cards.

Look at: G and −G on the same ring around the knotted tube, on opposite sides of it.

Why: a knot has a handedness, like a left and a right glove: no mirror turns the knot into itself, so there is no mirror plane for the whole shape. The visualizer still keeps −P a reflection, but a local one: P is mirrored inside its own ring, across the plane that runs along the knot through the middle of that ring.

Try it yourself

Recap

Next: 16 One set of points, nine shapes.