---
title: "Maps between Rings"
canonical: "https://docs.magma-maths.org/v2.30-1/CommutativeAlgebra/PolynomialRingIdealOperations/maps.html"
source: "https://docs.magma-maths.org/v2.30-1/CommutativeAlgebra/PolynomialRingIdealOperations/maps.md"
part: "Commutative Algebra"
chapter: "Polynomial Ring Ideal Operations"
breadcrumbs:
  - {"title": "Magma Handbook", "source": "https://docs.magma-maths.org/v2.30-1/index.md"}
  - {"title": "Commutative Algebra", "source": "https://docs.magma-maths.org/v2.30-1/CommutativeAlgebra/index-commutative-algebra.md"}
  - {"title": "Polynomial Ring Ideal Operations", "source": "https://docs.magma-maths.org/v2.30-1/CommutativeAlgebra/PolynomialRingIdealOperations/index-polynomial-ring-ideal-operations.md"}
prev: {"title": "Syzygies", "source": "https://docs.magma-maths.org/v2.30-1/CommutativeAlgebra/PolynomialRingIdealOperations/syzygy-matrix.md"}
next: {"title": "Symmetric Polynomials", "source": "https://docs.magma-maths.org/v2.30-1/CommutativeAlgebra/PolynomialRingIdealOperations/symmetric.md"}
intrinsics:
  - {"name": "PolyMapKernel", "signature": "PolyMapKernel(f): Map -> RngMPol"}
  - {"name": "IsInImage", "signature": "IsInImage(f, p): Map, RngMPolElt -> [ BoolElt ]"}
  - {"name": "IsSurjective", "signature": "IsSurjective(f): Map -> [ BoolElt ]"}
  - {"name": "Extension", "signature": "Extension(phi, I): Map, RngMPol -> RngMPol"}
  - {"name": "Implicitization", "signature": "Implicitization(phi): Map -> RngMPol"}
examples:
  - "ex-a72e07"
---

# Maps between Rings

Magma includes functions for working with maps between multivariate polynomial rings. Let $R=K_1[x_1,\ldots,x_n]$ and $S=K_2[y_1,\ldots, y_m]$ be a polynomial rings over the fields $K_1$, $K_2$, and $f : R \to S$ a ring homomorphism.

<a id="function-polymapkernel-map"></a>
## `PolyMapKernel(f): Map -> RngMPol`

Return the kernel of the map $f$ as an ideal in the domain $R$, i.e., the set $\{ a \in R | f(a) = 0 \}.$ This is basically the computation of the relation ideal for the polynomials defining the map and is as described in [`RelationIdeal`](https://docs.magma-maths.org/v2.30-1/CommutativeAlgebra/PolynomialRingIdealOperations/elimination.md#function-dpoly-ideal-relationideal).

<a id="function-isinimage-map-rngmpolelt"></a>
## `IsInImage(f, p): Map, RngMPolElt -> [ BoolElt ]`

Given a polynomial $p$ in $S$, return whether $p$ is in the image of the map $f$. The algorithm is the one described on p. 82 of [[AL94](https://docs.magma-maths.org/v2.30-1/references.md#cite-adamsloustaunau)].

<a id="function-issurjective-map"></a>
## `IsSurjective(f): Map -> [ BoolElt ]`

Return whether the map $f$ is surjective. Uses the function above to check whether each codomain variable lies in the image.

<a id="function-extension-map-rngmpol"></a>
## `Extension(phi, I): Map, RngMPol -> RngMPol`

The extension of the ideal $I$ by $\phi$, where $\phi$ is a homomorphism from the generic of $I$. That is, the ideal generated by the image of $I$ under $\phi$.

<a id="function-implicitization-map"></a>
## `Implicitization(phi): Map -> RngMPol`

Suppose the polynomial map $\phi: K^n \to K^m$ is a parametrization of a variety $V$, i.e., $V$ is the image of $\phi$ in $K^m$. This function constructs the ideal of $S$ corresponding to $V$. The map $\phi$ maps $(z_1, \dots, z_n) \mapsto (f_1(z_1), \dots, f_m(z_m))$ where the $z_i$ are the coordinates of $K^n$. Let $f: S \to R$ be the map of polynomial rings defined by $(y_1, \dots, y_m) \mapsto (f_1(y_1), \dots, f_m(y_m))$. Then `Implicitization(f)` is the ideal of $S$ corresponding to $V$. If $V$ is not a true variety, the function returns the smallest variety containing $V$ (the Zariski closure of $V$). The algorithm used is given on p. 97 of [[CLO96](https://docs.magma-maths.org/v2.30-1/references.md#cite-clo)]

<a id="example-ex-a72e07"></a>
## `Example: Implicitization of a Monomial Map (ex-a72e07)`

We demonstrate the use of the function `Implicitization` for the variety defined by $\phi: Q[x,y] \to Q[r,u,v,w]$, $(x,y) \mapsto (x^4, x^3y, xy^3, y^4)$. This example is taken from [[AL94](https://docs.magma-maths.org/v2.30-1/references.md#cite-adamsloustaunau), Ex. 2.5.4].

```magma
> R<x, y> := PolynomialRing(Rationals(), 2);
> S<r, u, v, w> := PolynomialRing(Rationals(), 4);
> f := hom<S -> R |x^4, x^3*y, x*y^3, y^4>;
> Implicitization(f);
Ideal of Polynomial ring of rank 4 over Rational Field
Lexicographical Order
Variables: r, u, v, w
Basis:
[
    -r^2*v + u^3,
    r*v^2 - u^2*w,
    -u*w^2 + v^3,
    -r*w + u*v
]
```
