---
title: "Subspaces"
canonical: "https://docs.magma-maths.org/v2.30-1/ModularArithmeticGeometry/ModularSymbols/subspaces.html"
source: "https://docs.magma-maths.org/v2.30-1/ModularArithmeticGeometry/ModularSymbols/subspaces.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": "Decomposition", "source": "https://docs.magma-maths.org/v2.30-1/ModularArithmeticGeometry/ModularSymbols/decomposition.md"}
next: {"title": "Twists", "source": "https://docs.magma-maths.org/v2.30-1/ModularArithmeticGeometry/ModularSymbols/twists.md"}
intrinsics:
  - {"name": "CuspidalSubspace", "signature": "CuspidalSubspace(M): ModSym -> ModSym"}
  - {"name": "IsCuspidal", "signature": "IsCuspidal(M): ModSym -> BoolElt"}
  - {"name": "EisensteinSubspace", "signature": "EisensteinSubspace(M): ModSym -> ModSym"}
  - {"name": "IsEisenstein", "signature": "IsEisenstein(M): ModSym -> BoolElt"}
  - {"name": "NewSubspace", "signature": "NewSubspace(M): ModSym -> ModSym"}
  - {"name": "IsNew", "signature": "IsNew(M): ModSym -> BoolElt"}
  - {"name": "NewSubspace", "signature": "NewSubspace(M, p): ModSym, RngIntElt -> ModSym"}
  - {"name": "Kernel", "signature": "Kernel(I, M): [Tup], ModSym -> ModSym"}
  - {"name": "Complement", "signature": "Complement(M): ModSym -> ModSym"}
  - {"name": "BoundaryMap", "signature": "BoundaryMap(M): ModSym -> ModMatFldElt"}
examples:
  - "ex-a39393"
  - "ex-2e2403"
---

<a id="id1"></a>
# Subspaces

The following functions compute the cuspidal, Eisenstein, and new subspaces, along with the complement of a subspace.

<a id="function-cuspidalsubspace-modsym"></a>
## `CuspidalSubspace(M): ModSym -> ModSym`

The cuspidal subspace of the space of modular symbols $M$. This is the kernel of `BoundaryMap(M)`.

<a id="function-iscuspidal-modsym"></a>
## `IsCuspidal(M): ModSym -> BoolElt`

Returns `true` if and only if the space of modular symbols $M$ is contained in the cuspidal subspace of the ambient space.

<a id="function-eisensteinsubspace-modsym"></a>
## `EisensteinSubspace(M): ModSym -> ModSym`

The Eisenstein subspace of the space of modular symbols $M$. This is the complement in $M$ of the cuspidal subspace of $M$.

<a id="function-iseisenstein-modsym"></a>
## `IsEisenstein(M): ModSym -> BoolElt`

Returns `true` if and only if the space of modular symbols $M$ is contained in the Eisenstein subspace of the ambient space.

<a id="function-newsubspace-modsym"></a>
## `NewSubspace(M): ModSym -> ModSym`

The new subspace of the space of modular symbols $M$. This is the intersection of `NewSubspace(M,p)` as $p$ varies over all prime divisors of the level of $M$. Note that $M$ is required to be cuspidal.

<a id="function-isnew-modsym"></a>
## `IsNew(M): ModSym -> BoolElt`

Returns `true` if and only if the space of modular symbols $M$ is contained in the new cuspidal subspace of the ambient space.

<a id="function-newsubspace-modsym-rngintelt"></a>
## `NewSubspace(M, p): ModSym, RngIntElt -> ModSym`

The $p$-new subspace of the space of modular symbols $M$. This is the kernel of the degeneracy map from $M$ to the space of modular symbols of level equal to the level of $M$ divided by $p$ and character the restriction of the character of $M$. If the character of $M$ does not restrict, then `NewSubspace(M,p)` is equal to $M$. Note that $M$ is required to be cuspidal.

<a id="function-kernel-tup-modsym"></a>
## `Kernel(I, M): [Tup], ModSym -> ModSym`

The kernel of $I$ on the space of modular symbols $M$. Let $T_p$ denote the $p$th Hecke operator (see Section [Operators](https://docs.magma-maths.org/v2.30-1/ModularArithmeticGeometry/ModularSymbols/operators.md#modsym-operators)). This is the subspace of $M$ obtained by intersecting the kernels of the operators $f_n(T_{p_n})$, where $I$ is a sequence $[\langle p_1, f_1(x)\rangle,...,\langle p_n,f_n(x)\rangle]$ of pairs consisting of a prime number and a polynomial. Only primes $p_i$ which do not divide the level of $M$ are used.

<a id="function-complement-modsym"></a>
## `Complement(M): ModSym -> ModSym`

The space of modular symbols complementary to the space of modular symbols $M$ in the ambient space of $M$. Thus the ambient space of $M$ is equal to the direct sum of $M$ and `Complement(M)`.

<a id="function-boundarymap-modsym"></a>
## `BoundaryMap(M): ModSym -> ModMatFldElt`

A matrix that represents the boundary map from the space of modular symbols $M$ to the vector space whose basis consists of the weight $k$ cusps. (Note: At present there is no intrinsic that lists these cusps.)

<a id="example-ex-a39393"></a>
## `Example: Cuspidal Subspace of Modular Symbols (ex-a39393)`

First we compute the cuspidal subspace of the space of modular symbols for $\Gamma_0(11)$.

```magma
> M := ModularSymbols(11,2); M;
Full modular symbols space for Gamma_0(11) of weight 2 and dimension 3
over Rational Field
> IsCuspidal(M);
false
> C := CuspidalSubspace(M); C;
Modular symbols space for Gamma_0(11) of weight 2 and dimension 2 over
Rational Field
> IsCuspidal(C);
true
```

Next we compute the Eisenstein subspace.

```magma
> IsEisenstein(C);
false
> E := EisensteinSubspace(M); E;
Modular symbols space for Gamma_0(11) of weight 2 and dimension 1 over
Rational Field
> IsEisenstein(E);
true
> E + C eq M;
true
```

The Eisenstein subspace is the complement of the cuspidal subspace, and conversely.

```magma
> E eq Complement(C);
true
> C eq Complement(E);
true
```

<a id="example-ex-2e2403"></a>
## `Example: Boundary Map on Modular Symbols (ex-2e2403)`

```magma
> M := ModularSymbols("37B"); M;
Modular symbols space for Gamma_0(37) of weight 2 and dimension 2 over
Rational Field
> BoundaryMap(M);
[0 0]
[0 0]
> A := AmbientSpace(M);
> BoundaryMap(A);
[ 0  0]
[ 0  0]
[ 0  0]
[ 0  0]
[ 1 -1]
```

Observe that the Eisenstein subspace of $A$ is not in the kernel of the boundary map.

```magma
> Basis(VectorSpace(EisensteinSubspace(A)));
[
    (0 0 0 1 3)
]
```
