# The Intersection Pairing

Magma can compute the intersection pairing

$$
H_1(X_0(N),{\mathbb{Q}}) \times H_1(X_0(N),{\mathbb{Q}}) \rightarrow {\mathbb{Q}}
$$

on the homology of the modular curve $X_0(N)$. The algorithm that we implemented is essentially the one given in [[Merel, 1993](../../references.md#cite-merel-intersections)]. (Warning: There is a typo in Proposition 4 of [[Merel, 1993](../../references.md#cite-merel-intersections)]; $W_i$ should be replaced by $W_i^{\varepsilon_i}$.)

## `IntersectionPairing(x, y): ModSymElt, ModSymElt -> FldRatElt`

The intersection pairing of the homology classes corresponding to the weight-$2$ cuspidal modular symbols $x$ and $y$. The symbols $x$ and $y$ must have the same parent, which must have trivial character and not be a $+1$ or $-1$ quotient.

## `Example: Intersection Pairing (ex-3889b3)`

In this example, we illustrate several basic properties of the intersection pairing on $H_1(X_0(37),{\mathbb{Z}})$. First, let `H37` be the space of modular symbols that corresponds to $H_1(X_0(37),{\mathbb{Z}})$, and compute a basis for `H37`.

```magma
> M37 := ModularSymbols(37,2);
> H37 := CuspidalSubspace(M37);
> Z := IntegralBasis(H37); Z;
[
    {-1/29, 0},
    {-1/22, 0},
    {-1/12, 0},
    {-1/18, 0}
]

```

Now we compute some intersection numbers.

```magma
> IntersectionPairing(Z[1],Z[2]);
-1
> IntersectionPairing(Z[3],Z[4]);
0

```

The intersection pairing is perfect and skew-symmetric, so the matrix that defines it is skew-symmetric and has determinant $\pm 1$ (in fact, it has determinant $+1$).

```magma
> A := MatrixAlgebra(RationalField(),4);
> I := A![IntersectionPairing(x,y) : x in Z, y in Z]; I;
[ 0  1  0  1]
[-1  0  1  1]
[ 0 -1  0  0]
[-1 -1  0  0]
> I + Transpose(I) eq 0;
true
> Determinant(I);
1

```

The Hecke operators are compatible with the intersection pairing in the sense that $(T_n x, y) = (x, T_n y).$

```magma
> T2 := HeckeOperator(M37,2);
> IntersectionPairing(Z[1]*T2,Z[2]);
1
> IntersectionPairing(Z[1],Z[2]*T2);
1

```

It is note the case $(T_n x, T_n y) = (x, y)$ for all $n$, $x$, and $y$.

```magma
> IntersectionPairing(Z[1]*T2,Z[2]*T2);
-2

```

The existence of the intersection pairing implies that $H_1(X_0(N),{\mathbb{Z}})$ is isomorphic, as a module over the Hecke algebra, to its linear dual ${\operatorname{Hom}}(H_1(X_0(N),{\mathbb{Z}}),{\mathbb{Z}})$.
