---
title: "Theta Functions"
canonical: "https://docs.magma-maths.org/v2.30-1/BasicRings/RealAndComplexFields/theta.html"
source: "https://docs.magma-maths.org/v2.30-1/BasicRings/RealAndComplexFields/theta.md"
part: "Basic Rings"
chapter: "Real and Complex Fields"
breadcrumbs:
  - {"title": "Magma Handbook", "source": "https://docs.magma-maths.org/v2.30-1/index.md"}
  - {"title": "Basic Rings", "source": "https://docs.magma-maths.org/v2.30-1/BasicRings/index-basic-rings.md"}
  - {"title": "Real and Complex Fields", "source": "https://docs.magma-maths.org/v2.30-1/BasicRings/RealAndComplexFields/index-real-and-complex-fields.md"}
prev: {"title": "Elliptic and Modular Functions", "source": "https://docs.magma-maths.org/v2.30-1/BasicRings/RealAndComplexFields/elliptic-modular.md"}
next: {"title": "Gamma, Bessel, and Associated Functions", "source": "https://docs.magma-maths.org/v2.30-1/BasicRings/RealAndComplexFields/gamma-bessel.md"}
intrinsics:
  - {"name": "Theta", "signature": "Theta(char, z, tau): Mtrx, Mtrx, Mtrx -> FldComElt"}
  - {"name": "Theta", "signature": "Theta(char, z, A): Mtrx, Mtrx, AnHcJac -> FldComElt"}
---

# Theta Functions

One of the main tools for working with analytic Jacobians is the theta function. For instance it is used by [`FromAnalyticJacobian`](https://docs.magma-maths.org/v2.30-1/ArithmeticGeometry/HyperellipticCurves/analytic.md#function-fromanalyticjacobianlabel) and [`RosenhainInvariants`](https://docs.magma-maths.org/v2.30-1/ArithmeticGeometry/HyperellipticCurves/analytic.md#function-rosenhaininvariantslabel). For $c \in {\mathbb{R}}^{2g}$ let $c'$ be the first $g$ entries and $c''$ the second $g$ entries of $c$. For such a $c$, $z \in {\mathbb{C}}^g$ and $\tau$ an element of Siegel upper half-space the classical multi-variable theta function is defined by

$$
\theta[c](z,\tau) = \sum_{m \in {\mathbb{Z}}^g} \exp (\pi i
{}^t(m+c')\tau(m+c') + 2\pi i {}^t(m+c')(z+c'')).
$$

The vector $c$ is called the characteristic of the theta function.

<a id="function-theta-mtrx-mtrx-mtrx"></a>
## `Theta(char, z, tau): Mtrx, Mtrx, Mtrx -> FldComElt`

This computes the multidimensional theta function with characteristic $char$ (a $2g \times 1$ matrix) at $z$ (a $g \times 1$ matrix) and $\tau$ (a symmetric $g \times g$ matrix with positive definite imaginary part).

<a id="function-theta-mtrx-mtrx-anhcjac"></a>
## `Theta(char, z, A): Mtrx, Mtrx, AnHcJac -> FldComElt`

This computes the multidimensional theta function with characteristic $char$ (a $2g \times 1$ matrix) at $z$ (a $g \times 1$ matrix) and $\tau$, the small period matrix of the analytic Jacobian $A$. This function caches the values of theta null values ($z = 0$) at half-integer characteristics.
