In algebraic geometry, a **hyperelliptic curve** is an algebraic curve of genus *g* > 1, given by an equation of the form

where

A **hyperelliptic function** is an element of the function field of such a curve, or of the Jacobian variety on the curve; these two concepts are identical for elliptic functions, but different for hyperelliptic functions.

The degree of the polynomial determines the genus of the curve: a polynomial of degree 2*g* + 1 or 2*g* + 2 gives a curve of genus *g*. When the degree is equal to 2*g* + 1, the curve is called an imaginary hyperelliptic curve. Meanwhile, a curve of degree 2*g* + 2 is termed a real hyperelliptic curve. This statement about genus remains true for *g* = 0 or 1, but those special cases are not called "hyperelliptic". In the case *g* = 1 (if one chooses a distinguished point), such a curve is called an elliptic curve.

While this model is the simplest way to describe hyperelliptic curves, such an equation will have a singular point *at infinity* in the projective plane. This feature is specific to the case *n* > 3. Therefore, in giving such an equation to specify a non-singular curve, it is almost always assumed that a non-singular model (also called a smooth completion), equivalent in the sense of birational geometry, is meant.

To be more precise, the equation defines a quadratic extension of **C**(*x*), and it is that function field that is meant. The singular point at infinity can be removed (since this is a curve) by the normalization (integral closure) process. It turns out that after doing this, there is an open cover of the curve by two affine charts: the one already given by

and another one given by

The glueing maps between the two charts are given by

and

wherever they are defined.

In fact geometric shorthand is assumed, with the curve *C* being defined as a ramified double cover of the projective line, the ramification occurring at the roots of *f*, and also for odd *n* at the point at infinity. In this way the cases *n* = 2*g* + 1 and 2*g* + 2 can be unified, since we might as well use an automorphism of the projective plane to move any ramification point away from infinity.

Using the Riemann–Hurwitz formula, the hyperelliptic curve with genus *g* is defined by an equation with degree *n* = 2*g* + 2. Suppose *f* : *X* → P^{1} is a branched covering with ramification degree *2*, where *X* is a curve with genus *g* and P^{1} is the Riemann sphere. Let *g*_{1} = *g* and *g*_{0} be the genus of P^{1} ( = 0 ), then the Riemann-Hurwitz formula turns out to be

where *s* is over all ramified points on *X*. The number of ramified points is *n*, so *n* = 2*g* + 2.

All curves of genus 2 are hyperelliptic, but for genus ≥ 3 the generic curve is not hyperelliptic. This is seen heuristically by a moduli space dimension check. Counting constants, with *n* = 2*g* + 2, the collection of *n* points subject to the action of the automorphisms of the projective line has (2*g* + 2) − 3 degrees of freedom, which is less than 3*g* − 3, the number of moduli of a curve of genus *g*, unless *g* is 2. Much more is known about the *hyperelliptic locus* in the moduli space of curves or abelian varieties,^{[clarification needed]} though it is harder to exhibit *general* non-hyperelliptic curves with simple models.^{[1]} One geometric characterization of hyperelliptic curves is via Weierstrass points. More detailed geometry of non-hyperelliptic curves is read from the theory of canonical curves, the canonical mapping being 2-to-1 on hyperelliptic curves but 1-to-1 otherwise for *g* > 2. Trigonal curves are those that correspond to taking a cube root, rather than a square root, of a polynomial.

The definition by quadratic extensions of the rational function field works for fields in general except in characteristic 2; in all cases the geometric definition as a ramified double cover of the projective line is available, if the extension is assumed to be separable.

Hyperelliptic curves can be used in hyperelliptic curve cryptography for cryptosystems based on the discrete logarithm problem.

Hyperelliptic curves also appear composing entire connected components of certain strata of the moduli space of Abelian differentials.^{[2]}

Hyperellipticity of genus-2 curves was used to prove Gromov's filling area conjecture in the case of fillings of genus =1.

Hyperelliptic curves of given genus *g* have a moduli space, closely related to the ring of invariants of a binary form of degree 2*g*+2.^{[specify]}

Hyperelliptic functions were first published^{[citation needed]} by Adolph Göpel (1812-1847) in his last paper *Abelsche Transcendenten erster Ordnung* (Abelian transcendents of first order) (in Journal für die reine und angewandte Mathematik, vol. 35, 1847). Independently Johann G. Rosenhain worked on that matter and published *Umkehrungen ultraelliptischer Integrale erster Gattung* (in Mémoires des savants etc., vol. 11, 1851).