---
title: "Complex Multiplication"
canonical: "https://docs.magma-maths.org/v2.30-1/GlobalFields/EtaleAlgebras/complex-mult.html"
source: "https://docs.magma-maths.org/v2.30-1/GlobalFields/EtaleAlgebras/complex-mult.md"
part: "Global Fields"
chapter: "Étale Algebras"
breadcrumbs:
  - {"title": "Magma Handbook", "source": "https://docs.magma-maths.org/v2.30-1/index.md"}
  - {"title": "Global Fields", "source": "https://docs.magma-maths.org/v2.30-1/GlobalFields/index-global-fields.md"}
  - {"title": "Étale Algebras", "source": "https://docs.magma-maths.org/v2.30-1/GlobalFields/EtaleAlgebras/index-etale-algebras.md"}
prev: {"title": "Complex Conjugation", "source": "https://docs.magma-maths.org/v2.30-1/GlobalFields/EtaleAlgebras/complex_conj.md"}
next: {"title": "Totally Real and Positive", "source": "https://docs.magma-maths.org/v2.30-1/GlobalFields/EtaleAlgebras/TotRealTotPos.md"}
intrinsics:
  - {"name": "CMType", "signature": "CMType(seq): SeqEnum[Map] -> AlgEtQCMType"}
  - {"name": "CreateCMType", "signature": "CreateCMType(seq): SeqEnum[Map] -> AlgEtQCMType"}
  - {"name": "CMType", "signature": "CMType(b): AlgEtQElt -> AlgEtQCMType"}
  - {"name": "CreateCMType", "signature": "CreateCMType(b): AlgEtQElt -> AlgEtQCMType"}
  - {"name": "CMPositiveElement", "signature": "CMPositiveElement(PHI): AlgEtQCMType -> AlgEtQElt"}
  - {"name": "CMPosElt", "signature": "CMPosElt(PHI): AlgEtQCMType -> AlgEtQElt"}
  - {"name": "Homs", "signature": "Homs(PHI): AlgEtQCMType -> SeqEnum[Map]"}
  - {"name": "eq", "signature": "PHI1 eq PHI2: AlgEtQCMType, AlgEtQCMType -> BoolElt"}
  - {"name": "Precision", "signature": "Precision(PHI): AlgEtQCMType -> RngIntElt"}
  - {"name": "ChangePrecision", "signature": "ChangePrecision(PHI0, prec): AlgEtQCMType, RngIntElt -> AlgEtQCMType"}
  - {"name": "ChangePrecision", "signature": "ChangePrecision(~PHI, prec): AlgEtQCMType, RngIntElt"}
  - {"name": "AllCMTypes", "signature": "AllCMTypes(A): AlgEtQ -> SeqEnum[AlgEtQCMType]"}
examples:
  - "ex-d5afe8"
---

# Complex Multiplication

Let $A$ be a CM-étale algebra of dimension $2g$ over ${{\Q}}$. Then complex conjugation acts on ${\rm Homs}(A,{\C})$. We denote this action with $\overline{\cdot}$. A *CM-type* $\Phi$ of $A$ is a set of $g$ elements of ${\rm Homs}(A,{\C})$ such that ${\rm Homs}(A,{\C}) = \Phi \sqcup \overline{\Phi}$.

Given a CM-type $\Phi$ and a totally imaginary element $b\in A^\times$, we say that $b$ is $\Phi$-*positive* if ${\operatorname{Im}}(\varphi(b))>0$ for every $\varphi\in \Phi$. Two totally imaginary elements $b$ and $b'$ in $A^\times$ represent the same CM-type $\Phi$ if and only if $b/b'$ is totally real and totally positive.

In Magma a CM-type of a CM-algebra $A$ has type `AlgEtQCMType` and it is determined by $g$ homomorphisms to ${\C}$ or by a $\Phi$-positive element.

<a id="function-cmtype-seqenum-map"></a>
## `CMType(seq): SeqEnum[Map] -> AlgEtQCMType`

Given a sequence $seq$ of homomorphisms from a CM-algebra to CC, one per conjugate pair, it returns the corresponding CMType.

<a id="example-ex-d5afe8"></a>
## `Example: CM Type of an Etale Algebra (ex-d5afe8)`

```magma
> _<x> := PolynomialRing(Integers());
> A := EtaleAlgebra(x^2+1);
> homs := HomsToC(A);
> PHI := CMType([homs[1]]);
> H := Homs(PHI : Precision := 30);
> #H;
1
```

<a id="function-createcmtype-seqenum-map"></a>
## `CreateCMType(seq): SeqEnum[Map] -> AlgEtQCMType`

Given a sequence $seq$ of homomorphisms from a CM-algebra to CC, one per conjugate pair, it returns the corresponding CMType.

<a id="function-cmtype-algetqelt"></a>
## `CMType(b): AlgEtQElt -> AlgEtQCMType`

Given a totally imaginary element $b$, it returns the CMType PHI for which $b$ is PHI-positive, that is, ${\rm Im}(\phi(b))>0$ for every $\phi$ in PHI.

<a id="function-createcmtype-algetqelt"></a>
## `CreateCMType(b): AlgEtQElt -> AlgEtQCMType`

Given a totally imaginary element $b$, it returns the CMType PHI for which $b$ is PHI-positive.

<a id="function-cmpositiveelement-algetqcmtype"></a>
## `CMPositiveElement(PHI): AlgEtQCMType -> AlgEtQElt`

Given a CMType PHI returns a totally imaginary PHI-positive element (which uniquely determines PHI).

<a id="function-cmposelt-algetqcmtype"></a>
## `CMPosElt(PHI): AlgEtQCMType -> AlgEtQElt`

Given a CMType PHI returns a totally imaginary PHI-positive element (which uniquely determines PHI).

<a id="function-homs-algetqcmtype"></a>
## `Homs(PHI): AlgEtQCMType -> SeqEnum[Map]`

```magma
prec: RngIntElt                    Default: 30
```

Given an `AlgEtQCMType` PHI returns the sequence of maps to the complex field. The parameter `prec` (default value 30) determines the precision of the codomains of the maps.

<a id="operation-op-eq-algetqcmtype-algetqcmtype"></a>
## `PHI1 eq PHI2: AlgEtQCMType, AlgEtQCMType -> BoolElt`

```magma
prec: RngIntElt                    Default: 30
```

Returns whether two cm types are equal. This happens if and only if the quotient of (any) two CMPositiveElements is totally real and totally positive.

<a id="function-precision-algetqcmtype"></a>
## `Precision(PHI): AlgEtQCMType -> RngIntElt`

Returns the precision of the given CM-type, that is, the codomain of each homomorphism will be `ComplexField(Precision)`.

<a id="function-changeprecision-algetqcmtype-rngintelt"></a>
## `ChangePrecision(PHI0, prec): AlgEtQCMType, RngIntElt -> AlgEtQCMType`

Changes the precision of the given CM-type, that is, the codomain of each homomorphism will be `ComplexField(Precision)`.

<a id="procedure-changeprecision-algetqcmtype-rngintelt-ref"></a>
## `ChangePrecision(~PHI, prec): AlgEtQCMType, RngIntElt`

Changes the precision of the given CM-type, that is, the codomain of each homomorphism will be `ComplexField(Precision)`.

<a id="function-allcmtypes-algetq"></a>
## `AllCMTypes(A): AlgEtQ -> SeqEnum[AlgEtQCMType]`

```magma
Precision: RngIntElt                    Default: Precision(GetDefaultRealField())
```

Returns all the `AlgEtQCMTypes` of $A$. The parameter `Precision` determined the precision of the codomain of the maps defining the CMTypes.
