---
title: "Decomposing and Factoring Abelian Varieties"
canonical: "https://docs.magma-maths.org/v2.30-1/ModularArithmeticGeometry/ModularAbelianVarieties/decomp.html"
source: "https://docs.magma-maths.org/v2.30-1/ModularArithmeticGeometry/ModularAbelianVarieties/decomp.md"
part: "Modular Arithmetic Geometry"
chapter: "Modular Abelian Varieties"
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 Abelian Varieties", "source": "https://docs.magma-maths.org/v2.30-1/ModularArithmeticGeometry/ModularAbelianVarieties/index-modular-abelian-varieties.md"}
prev: {"title": "Arithmetic of Abelian Varieties", "source": "https://docs.magma-maths.org/v2.30-1/ModularArithmeticGeometry/ModularAbelianVarieties/arithabvar.md"}
next: {"title": "Building Blocks", "source": "https://docs.magma-maths.org/v2.30-1/ModularArithmeticGeometry/ModularAbelianVarieties/building-blocks.md"}
intrinsics:
  - {"name": "Decomposition", "signature": "Decomposition(A): ModAbVar -> SeqEnum"}
  - {"name": "A", "signature": "A(n): RngIntElt, ModAbVar -> ModAbVar"}
  - {"name": "Factorisation", "signature": "Factorisation(A): ModAbVar -> List"}
  - {"name": "Factorization", "signature": "Factorization(A): ModAbVar -> List"}
  - {"name": "DecomposeUsing", "signature": "DecomposeUsing(R): HomModAbVar -> SeqEnum"}
  - {"name": "DecomposeUsing", "signature": "DecomposeUsing(phi): MapModAbVar -> SeqEnum"}
examples:
  - "ex-e61813"
  - "ex-189402"
  - "ex-27db11"
  - "ex-f1a775"
---

<a id="decomp"></a>
<a id="sec-decomp"></a>
# Decomposing and Factoring Abelian Varieties

By the Poincare reducibility theorem, every abelian variety is isogenous to a product of simple abelian subvarieties. If $A$ is a modular abelian variety over ${\mathbb{Q}}$, then $A$ is isogenous to a product of simple abelian varieties $A_f$ attached to newforms. The `Decomposition` and `Factorization` commands compute such decompositions.

## Decomposition

<a id="function-decomposition-modabvar"></a>
### `Decomposition(A): ModAbVar -> SeqEnum`

Given an abelian variety $A$, return a sequence $[B_i]$ of simple modular abelian varieties, whose product is isogenous to $A$. Each $B_i$ is equipped with an embedding into $A$ such that the sum of the images of the $B_i$ is equal to $A$. This embedding is the first element of the output of [`Embeddings`](https://docs.magma-maths.org/v2.30-1/ModularArithmeticGeometry/ModularAbelianVarieties/modabvar.md#function-modabvar-embed), given a $B_i$.

<a id="function-a-rngintelt-modabvar"></a>
### `A(n): RngIntElt, ModAbVar -> ModAbVar`

The $n$th factor in `Decomposition(A)`, denoted $A(n)$ where $A$ is an abelian variety.

<a id="example-ex-e61813"></a>
### `Example: Decomposing a Product of Jacobians (ex-e61813)`

We decompose $A=J_0(37)\times J_0(22)$, then find the embedding into $A$ of a factor which is isogenous to $J_0(11)$.

```magma
> A := JZero(37) * JZero(22);
> D := Decomposition(A); D;
[
    Modular abelian variety 37A of dimension 1, level 2*11*37 and
    conductor 37 over Q,
    Modular abelian variety 37B of dimension 1, level 2*11*37 and
    conductor 37 over Q,
    Modular abelian variety N(11,814,1)(11A) of dimension 1,
    level 2*11*37 and conductor 11 over Q,
    Modular abelian variety N(11,814,2)(11A) of dimension 1,
    level 2*11*37 and conductor 11 over Q
]
> B := D[3];
> Embeddings(B);
[*
Homomorphism from N(11,814,1)(11A) to JZero(37) x JZero(22) given on
integral homology by:
[ 0  0  0  0  1  0 -1  3]
[ 0  0  0  0  0  1 -2  3]
*]
```

## Factorization

<a id="function-factorisation-modabvar"></a>
### `Factorisation(A): ModAbVar -> List`

<a id="function-factorization-modabvar"></a>
### `Factorization(A): ModAbVar -> List`

Given an abelian variety $A$, compute pairwise non-isogenous simple newform abelian varieties $A_f$ whose product, with multiplicities, is isomorphic to $A$. A list of pairs $\langle B,[\phi, \ldots]\rangle$ is returned, where $B$ is an isogeny simple abelian variety and $[\phi, \ldots]$ is a sequence of maps from $B$ into $A$ (whose length is the “multiplicity”), such that the product of all images of all $B$ is isogenous to $A$, and the sum of the dimensions of the images of $B$ is the dimension of $A$. Moreover, the $B$ are pairwise non-isogenous. To obtain a list of the images of the $B$ canonically embedded into $A$, use `Decomposition(A)`.

<a id="example-ex-189402"></a>
### `Example: Factorization of a Product of Jacobians (ex-189402)`

```magma
> A := JZero(37) * JZero(22);
> Factorization(A);
[*
<Modular abelian variety 37A of dimension 1, level 37 and
conductor 37 over Q, [
    Homomorphism N(37,814,1) from 37A to JZero(37) x JZero(22) given on
    integral homology by:
    [ 1 -1  1  0  0  0  0  0]
    [ 1 -1 -1  1  0  0  0  0]
]>,
<Modular abelian variety 37B of dimension 1, level 37 and
conductor 37 over Q, [
    Homomorphism N(37,814,1) from 37B to JZero(37) x JZero(22) given on
    integral homology by:
    [1 1 1 0 0 0 0 0]
    [0 0 0 1 0 0 0 0]
]>,
<Modular abelian variety 11A of dimension 1, level 11 and
conductor 11 over Q, [
    Homomorphism N(11,814,1) from 11A to JZero(37) x JZero(22) given on
    integral homology by:
    [ 0  0  0  0  0  1 -2  3]
    [ 0  0  0  0  1 -1  1  0],
    Homomorphism N(11,814,2) from 11A to JZero(37) x JZero(22) given on
    integral homology by:
    [ 0  0  0  0 -1  0  2 -2]
    [ 0  0  0  0 -1  2 -1  0]
]>
*]
```

## Decomposition with respect to an Endomorphism or a Commutative Ring

The following commands use the elements of a commutative subring of endomorphisms to decompose a modular abelian variety $A$ into a direct sum of abelian subvarieties by taking kernels (which are analogous to generalized eigenspaces).

<a id="function-decomposeusing-hommodabvar"></a>
### `DecomposeUsing(R): HomModAbVar -> SeqEnum`

Decompose an abelian variety $A$ using the commutative ring of endomorphisms generated by the space of homomorphisms $R$ of $A$.

<a id="function-decomposeusing-mapmodabvar"></a>
### `DecomposeUsing(phi): MapModAbVar -> SeqEnum`

Decompose an abelian variety $A$ using the endomorphism $\phi$ of $A$.

<a id="example-ex-27db11"></a>
### `Example: Decomposition Using a Hecke Operator (ex-27db11)`

```magma
> T2 := HeckeOperator(JZero(100),2);
> DecomposeUsing(T2);
[
    Modular abelian variety of dimension 1 and level 2^2*5^2 over Q,
    Modular abelian variety of dimension 5 and level 2^2*5^2 over Q,
    Modular abelian variety of dimension 1 and level 2^2*5^2 over Q
]
> W := AtkinLehnerOperator(JZero(100),100);
> DecomposeUsing(W);
[
    Modular abelian variety of dimension 3 and level 2^2*5^2 over Q,
    Modular abelian variety of dimension 4 and level 2^2*5^2 over Q
]
```

## Additional Examples

<a id="example-ex-f1a775"></a>
### `Example: Simple Factors of J0(46) (ex-f1a775)`

We compute a decomposition of $J_0(46)$ as a product of simple abelian subvarieties.

```magma
> J := JZero(46); J;
Modular abelian variety JZero(46) of dimension 5 and level 2*23 over Q
> Decomposition(J);
[
    Modular abelian variety 46A of dimension 1, level 2*23 and
    conductor 2*23 over Q,
    Modular abelian variety N(23,46,1)(23A) of dimension 2, level
    2*23 and conductor 23^2 over Q,
    Modular abelian variety N(23,46,2)(23A) of dimension 2, level
    2*23 and conductor 23^2 over Q
]
```

Thus $J$ decomposes as a product $E\times A \times B$, where $E$ is an elliptic curve of conductor $46$, and $A$ and $B$ are two isogenous images of $J_0(23)$.

```magma
> J(1);
Modular abelian variety 46A of dimension 1, level 2*23 and
conductor 2*23 over Q
> Conductor(J(1));
46
> Factorization(Conductor(J(2)));
[ <23, 2> ]
```

The `Factorization` command gives an explicit decomposition with embeddings of each factor into $J_0(46)$.

```magma
> Factorization(Conductor(J(2)));
[ <23, 2> ]
> Factorization(J);
[*
<Modular abelian variety 46A of dimension 1, level 2*23 and
conductor 2*23 over Q, [
    Homomorphism from 46A to JZero(46) given on integral homology
    by:
    [ 1  0 -2 -1 -1  1  1  1 -2  1]
    [ 0  1 -1 -1  0  0  0  1 -1  0]
]>,
<Modular abelian variety 23A of dimension 2, level 23 and
conductor 23^2 over Q, [
    Homomorphism N(23,46,1) from 23A to JZero(46) given on integral
    homology by:
    [-1  1 -1  1  0 -1 -1  1 -1  2]
    [ 0  0 -1  2 -2 -1  0  0  1  0]
    [ 0  0  0  1 -2  0  0  1  0  0]
    [ 0  1  0 -1  0  0  1  0  0  0],
    Homomorphism N(23,46,2) from 23A to JZero(46) given on integral
    homology by:
    [ 0 -1  0  0  1 -1  0  1  0  0]
    [-1  0  0  0  0 -1  2 -1  1 -1]
    [-1  1 -1  0  0  0  2 -2  2 -2]
    [ 0  0 -1  2 -1  0  0  0  0 -1]
]>
*]
```
