---
title: "Homomorphisms"
canonical: "https://docs.magma-maths.org/v2.30-1/GlobalFields/EtaleAlgebras/homs.html"
source: "https://docs.magma-maths.org/v2.30-1/GlobalFields/EtaleAlgebras/homs.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": "Attributes", "source": "https://docs.magma-maths.org/v2.30-1/GlobalFields/EtaleAlgebras/attr.md"}
next: {"title": "Elements", "source": "https://docs.magma-maths.org/v2.30-1/GlobalFields/EtaleAlgebras/elements.md"}
intrinsics:
  - {"name": "HomsToC", "signature": "HomsToC(A): AlgEtQ -> SeqEnum[Map]"}
  - {"name": "Hom", "signature": "Hom(A, B, img): AlgEtQ, AlgEtQ, SeqEnum[AlgEtQElt] -> Map"}
  - {"name": "DiagonalEmbedding", "signature": "DiagonalEmbedding(K, V): AlgEtQ, AlgEtQ -> Map"}
  - {"name": "NaturalAction", "signature": "NaturalAction(K, V): AlgEtQ, AlgEtQ -> Map"}
examples:
  - "ex-58e95c"
  - "ex-aab1bc"
---

# Homomorphisms

<a id="function-homstoc-algetq"></a>
## `HomsToC(A): AlgEtQ -> SeqEnum[Map]`

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

Returns the sequence of homomorphisms from the algebra $A$ to a complex field ${{\C}}$. The precision of ${{\C}}$ is given by the optional parameter `Precision`. The default value is 30.

<a id="example-ex-58e95c"></a>
## `Example: Complex Embeddings of an Etale Algebra (ex-58e95c)`

```magma
> _<x> := PolynomialRing(Integers());
> A := EtaleAlgebra(x^2+2);
> homs := HomsToC(A : Precision := 30);
> #homs;
2
```

<a id="function-hom-algetq-algetq-seqenum-algetqelt"></a>
## `Hom(A, B, img): AlgEtQ, AlgEtQ, SeqEnum[AlgEtQElt] -> Map`

```magma
CheckMultiplicative: BoolElt                    Default: false
CheckUnital        : BoolElt                    Default: false
ComputeInverse     : BoolElt                    Default: true
```

Given étale algebras $A$ and $B$ and a sequence `img` of elements of $B$ with length equal to the absolute dimension of $A$, returns the ${{\Q}}$-algebra homomorphism sending the `AbsoluteBasis(A)` to `img`. If `ComputeInverse` is true and the map is invertible, preimages are defined. If `CheckMultiplicative` (resp. `CheckUnital`) is `true`, multiplicativity (resp. unitality) is checked.

<a id="function-diagonalembedding-algetq-algetq"></a>
## `DiagonalEmbedding(K, V): AlgEtQ, AlgEtQ -> Map`

<a id="function-naturalaction-algetq-algetq"></a>
## `NaturalAction(K, V): AlgEtQ, AlgEtQ -> Map`

Let $K=K_1\times\cdots\times K_n$ be a product of distinct number fields and $V=K_1^{s_1}\times\cdots\times K_n^{s_n}$. Returns the natural component-wise diagonal embedding $K\to V$.

<a id="example-ex-aab1bc"></a>
## `Example: Homomorphism into a Product Algebra (ex-aab1bc)`

```magma
> _<x> := PolynomialRing(Integers());
> A := EtaleAlgebra((x^2+2)*(x^2+3));
> B := EtaleAlgebra(Components(A));
> // Build a hom by mapping AbsoluteBasis(A) into B component-wise
> img := [ B!Components(AbsoluteBasis(A)[i]) : i in [1..AbsoluteDimension(A)] ];
> m := Hom(A,B,img : CheckMultiplicative := false, CheckUnital := false,
> ComputeInverse := true);
> // Diagonal embedding on a suitable power algebra
> V, embs, projs := DirectProduct([A,A]);
> d := DiagonalEmbedding(A,V);
> d(One(A));
<1, 1, 1, 1>
```
