---
title: "Dimension Formulas"
canonical: "https://docs.magma-maths.org/v2.30-1/ModularArithmeticGeometry/ModularSymbols/dimension-formulas.html"
source: "https://docs.magma-maths.org/v2.30-1/ModularArithmeticGeometry/ModularSymbols/dimension-formulas.md"
part: "Modular Arithmetic Geometry"
chapter: "Modular Symbols"
breadcrumbs:
  - {"title": "Magma Handbook", "source": "https://docs.magma-maths.org/v2.30-1/index.md"}
  - {"title": "Modular Arithmetic Geometry", "source": "https://docs.magma-maths.org/v2.30-1/ModularArithmeticGeometry/index-modular-arithmetic-geometry.md"}
  - {"title": "Modular Symbols", "source": "https://docs.magma-maths.org/v2.30-1/ModularArithmeticGeometry/ModularSymbols/index-modular-symbols.md"}
prev: {"title": "Elliptic Curves", "source": "https://docs.magma-maths.org/v2.30-1/ModularArithmeticGeometry/ModularSymbols/elliptic-curves.md"}
next: {"title": "Bibliography", "source": "https://docs.magma-maths.org/v2.30-1/ModularArithmeticGeometry/ModularSymbols/bibliography.md"}
intrinsics:
  - {"name": "DimensionCuspFormsGamma0", "signature": "DimensionCuspFormsGamma0(N, k): RngIntElt, RngIntElt -> RngIntElt"}
  - {"name": "DimensionNewCuspFormsGamma0", "signature": "DimensionNewCuspFormsGamma0(N, k): RngIntElt, RngIntElt -> RngIntElt"}
  - {"name": "DimensionCuspFormsGamma1", "signature": "DimensionCuspFormsGamma1(N, k): RngIntElt, RngIntElt -> RngIntElt"}
  - {"name": "DimensionNewCuspFormsGamma1", "signature": "DimensionNewCuspFormsGamma1(N, k): RngIntElt, RngIntElt -> RngIntElt"}
  - {"name": "DimensionCuspForms", "signature": "DimensionCuspForms(eps, k): GrpDrchElt, RngIntElt -> RngIntElt"}
examples:
  - "ex-57206a"
---

# Dimension Formulas

<a id="function-dimensioncuspformsgamma0-rngintelt-rngintelt"></a>
## `DimensionCuspFormsGamma0(N, k): RngIntElt, RngIntElt -> RngIntElt`

The dimension of the space $S_k(\Gamma_0(N))$ of weight $k$ cusp forms for $\Gamma_0(N)$.

<a id="function-dimensionnewcuspformsgamma0-rngintelt-rngintelt"></a>
## `DimensionNewCuspFormsGamma0(N, k): RngIntElt, RngIntElt -> RngIntElt`

The dimension of the new subspace of the space $S_k(\Gamma_0(N))$ of weight $k$ cusp forms for $\Gamma_0(N)$.

<a id="function-dimensioncuspformsgamma1-rngintelt-rngintelt"></a>
## `DimensionCuspFormsGamma1(N, k): RngIntElt, RngIntElt -> RngIntElt`

The dimension of the space $S_k(\Gamma_1(N))$ of weight $k$ cusp forms for $\Gamma_1(N)$.

<a id="function-dimensionnewcuspformsgamma1-rngintelt-rngintelt"></a>
## `DimensionNewCuspFormsGamma1(N, k): RngIntElt, RngIntElt -> RngIntElt`

The dimension of the new subspace of the space $S_k(\Gamma_1(N))$ of weight $k$ cusp forms for $\Gamma_1(N)$.

<a id="function-dimensioncuspforms-grpdrchelt-rngintelt"></a>
## `DimensionCuspForms(eps, k): GrpDrchElt, RngIntElt -> RngIntElt`

The dimension of the space $S_k(\Gamma_1(N))(\varepsilon)$ of cusp forms of weight $k$ and Dirichlet character `eps`. The level $N$ is the modulus of `eps`. The dimension is computed using the formula of Cohen and Oesterlè (see [[CO77](https://docs.magma-maths.org/v2.30-1/references.md#cite-cohen-oesterle-dimensions)]).

<a id="example-ex-57206a"></a>
## `Example: Dimensions of Spaces of Cusp Forms (ex-57206a)`

```magma
> DimensionCuspFormsGamma0(11,2);
1
> DimensionCuspFormsGamma0(1,12);
1
> DimensionCuspFormsGamma0(5077,2);
422
> DimensionCuspFormsGamma1(5077,2);
1071460
> G := DirichletGroup(5*7);
> eps := G.1*G.2;
> IsOdd(eps);
true
> DimensionCuspForms(eps,2);
0
> DimensionCuspForms(eps,3);
6
```

The dimension of the space of cuspidal modular symbols is twice the dimension of the space of cusp forms.

```magma
> Dimension(CuspidalSubspace(ModularSymbols(eps,3)));
12
```
