---
title: "Resultants and Discriminants"
canonical: "https://docs.magma-maths.org/v2.30-1/BasicRings/MultivariatePolynomialRings/resultant-discriminant.html"
source: "https://docs.magma-maths.org/v2.30-1/BasicRings/MultivariatePolynomialRings/resultant-discriminant.md"
part: "Basic Rings"
chapter: "Multivariate Polynomial Rings"
breadcrumbs:
  - {"title": "Magma Handbook", "source": "https://docs.magma-maths.org/v2.30-1/index.md"}
  - {"title": "Basic Rings", "source": "https://docs.magma-maths.org/v2.30-1/BasicRings/index-basic-rings.md"}
  - {"title": "Multivariate Polynomial Rings", "source": "https://docs.magma-maths.org/v2.30-1/BasicRings/MultivariatePolynomialRings/index-multivariate-polynomial-rings.md"}
prev: {"title": "Factorization and Irreducibility", "source": "https://docs.magma-maths.org/v2.30-1/BasicRings/MultivariatePolynomialRings/factorization-irreducibility.md"}
next: {"title": "Polynomials over the Integers", "source": "https://docs.magma-maths.org/v2.30-1/BasicRings/MultivariatePolynomialRings/integer.md"}
intrinsics:
  - {"name": "Resultant", "signature": "Resultant(f, g, i): RngMPolElt, RngMPolElt, RngIntElt -> RngMPolElt"}
  - {"name": "Resultant", "signature": "Resultant(f, g, v): RngMPolElt, RngMPolElt, RngMPolElt -> RngMPolElt"}
  - {"name": "Discriminant", "signature": "Discriminant(f, i): RngMPolElt, RngIntElt -> RngMPolElt"}
  - {"name": "Discriminant", "signature": "Discriminant(f, v): RngMPolElt, RngMPolElt -> RngMPolElt"}
---

# Resultants and Discriminants

<a id="function-resultant-rngmpolelt-rngmpolelt-rngintelt"></a>
## `Resultant(f, g, i): RngMPolElt, RngMPolElt, RngIntElt -> RngMPolElt`

<a id="function-resultant-rngmpolelt-rngmpolelt-rngmpolelt"></a>
## `Resultant(f, g, v): RngMPolElt, RngMPolElt, RngMPolElt -> RngMPolElt`

The resultant of multivariate polynomials $f$ and $g$ in $P=R[x_1,\ldots, x_n]$ with respect to the variable $v=x_i$, which is by definition the determinant of the Sylvester matrix for $f$ and $g$ when considered as polynomials in the single variable $x_i$. The result will be an element of $P$ again. There are two ways to indicate with respect to which variable the integral is to be taken: either one specifies $i$, the integer $1\leq i\leq n$ that is the number of the variable (upon creation of $P$, corresponding to `P.i`) or the variable $v$ itself (as an element of $P$). The algorithm used is the modular interpolation method, as given in [[GCL92](https://docs.magma-maths.org/v2.30-1/references.md#cite-gcl), pp. 412--413].

<a id="function-discriminant-rngmpolelt-rngintelt"></a>
## `Discriminant(f, i): RngMPolElt, RngIntElt -> RngMPolElt`

<a id="function-discriminant-rngmpolelt-rngmpolelt"></a>
## `Discriminant(f, v): RngMPolElt, RngMPolElt -> RngMPolElt`

The discriminant $D$ of $f\in R[x_1, \ldots, x_n]$ is returned, where $f$ is considered as a polynomial in $v=x_i$. The result will be an element of $P$ again. The coefficient ring $R$ must be a domain, or the leading coefficient of $f$ in $v$ must be a unit. There are two ways to indicate with respect to which variable the integral is to be taken: either one specifies $i$, the integer $1\leq i\leq n$ that is the number of the variable (upon creation of $P$, corresponding to `P.i`) or the variable $v$ itself (as an element of $P$).
