# Discriminant Calculator

Created by Anna Szczepanek, PhD
Reviewed by Dominik Czernia, PhD and Jack Bowater
Last updated: Apr 23, 2024

Welcome to our discriminant calculator! Use it shamelessly whenever you need to quickly find the discriminant of polynomials with between two and five degrees, i.e., quadratic, cubic, quartic, or quintic polynomials. Do you need to learn what the discriminant is in math? Or what the math formula for the discriminant looks like? Scroll down!

In the sections that follow, we give the math definition of the discriminant and explain how to find the discriminant of a given polynomial. We even dedicate an entire section to the discriminant of a quadratic equation, as we know that they are used a lot! π However, we don't stop at the second degree but discuss all degrees up to five.

π‘ If you just want to solve a quadratic equation, our completing the square calculator or quadratic formula calculator may be better suited to your needs.

## What is the discriminant? β discriminant math

Before attacking a formal math definition of the discriminant, let's briefly discuss the general idea.

Assume we have a real polynomial $p$ of degree $n$, where $n \geq 2$:

$p(x) = a_nx^n + \ldots + a_1x + a_0$

The discriminant of $p$ is a real number that describes various properties of the roots of $p$. You can calculate it from the coefficients of $p$ (actually, it's a polynomial function of those coefficients).

Most importantly, the discriminant allows us to quickly check whether $p$ has multiple roots without actually calculating these roots: $p$ has at least one multiple root if, and only if, the discriminant is equal to zero.

π‘ We owe the term discriminant to the English mathematician James Joseph Sylvester, who introduced it in 1851.

#### What are multiple roots?

We say that a complex number $x_0$ is a root of multiplicity $k$ of $p$ if you can divide $p$ without a remainder by:

$(x β x_0)^k,$

but not by:

$(x β x_0)^{k+1}$

In other words, it's a root if there exists a polynomial $q$ such that:

$p(x) = (x β x_0)^k \, q(x),$

and $q(x_0) β 0$.

• If $k = 1$, then we say that $x_0$ is a simple root;

• If $k β₯ 2$, then we say that $x_0$ is a multiple root; and

• In particular, if $k = 2$, then we say that $x_0$ is a double root.

π‘ The multiplicity of a root is the number of times that root occurs in the factorization of $p$ into linear terms (which is possible due to the fundamental theorem of algebra).
In other words, the multiplicity of $x_0$ is the power to which $(x - x_0)$ is risen to when we factorize the polynomial over the field of complex numbers.

#### Example

The roots of:

$x^3 - 8x^2 + 21x - 18,$

are $2$ and $3$. You can factorize this polynomial as:

$(x - 2)(x β 3)^2,$

so $2$ is the simple root, and $3$ is the double root.

## How to find the discriminant? Math definition & formula

Once you have a general idea of what a discriminant is in math, let's move on to a formal math definition of discriminants. We will define the discriminant in terms of the roots of a polynomial.

The fundamental theorem of algebra implies that, in the field of complex numbers, a polynomial with real coefficients:

$p(x) = a_nx^n + \ldots + a_1x + a_0$

has exactly $n$ roots $x_1, \ldots, x_n$ (these roots are not necessarily all unique!). We define the discriminant of $p$ as:

$D(p) = a_n^{2n-2} \prod_{i

where:

• $D(p)$ is a homogenous polynomial of degree $2(n - 1)$ in the coefficients of $p$; and

• $D(p)$ is a symmetric function of the roots of $p$, which assures that the value of $D(p)$ is independent from the order in which we labeled the roots of $p$.

Equivalently, we can define the discriminant of a polynomial as the determinant of the so-called of this polynomial and its derivative. Alternatively, we can express the discriminant as the determinant of a certain symmetric matrix, which is defined recursively. We use these approaches when we want to compute the discriminant and don't know the roots of the polynomial we are considering.

π Go to our determinant calculator if you're not yet familiar with this concept.

## Properties of the discriminant

From the math formula for discriminants given in the previous sections, we can deduce several essential properties of discriminants.

Let $D(p)$ be the discriminant of $p$, as we defined above. As for the values of $D(p)$:

• Since $p$ is a real polynomial, $D(p)$ is always a real number;

• $D(p) = 0$ if, and only if, $p$ has a multiple root; and

• $D(p) > 0$ if, and only if, the number of non-real roots of $p$ is a multiple of four (zero included).

In particular:

• If all the roots are real and simple, then $D(p) > 0$.

As for the invariance of the discriminant, we have:

• $D(p)$ is invariant under translation:

If $q(x) = p(x + a)$, then $D(q) = D(p)$.

• $D(p)$ is invariant (up to scaling) under homothety:

If $q(x) = p(a * x)$, then $D(q) = a^{n(n-1)}D(p)$.

## Discriminant of a quadratic equation formula

Consider the quadratic polynomial $ax^2 + bx + c$. The formula for its discriminant is:

$b^2 - 4ac$

As we all well remember, the square root of this discriminant turns up in the formula for the roots of the quadratic polynomial:

$\frac{-b Β± \sqrt{b^2 - 4ac}}{2a}$

Without computing the roots, we can deduce the following from the sign of the discriminant:

• $D > 0$ if, and only if, the polynomial has two distinct real roots;

• $D < 0$ if, and only if, the polynomial has a pair of conjugate complex roots; and

• $D = 0$ if, and only if, the polynomial has a double root.

Moreover, if the coefficients $a$, $b$, and $c$ are rational, then both roots of the polynomial are rational if, and only if, $D$ is the square of a rational number.

Geometrically, in terms of the parabola in the real plane, we have

• $D > 0$ if, and only if, the parabola doesn't intersect the horizontal axis;

• $D < 0$ if, and only if, the parabola intersects the horizontal axis at two points; and

• $D = 0$ if, and only if, the parabola touches (is tangent to) the horizontal axis.

## Discriminants of higher degree polynomials

As we've seen, the discriminant of a general quadratic has just two terms. However, as the degree of the polynomial increases, the discriminant becomes more and more complicated:

• The discriminant of a general cubic has $5$ terms;
• The discriminant of a quartic has $16$ terms;
• The discriminant of a quintic has $59$ terms;
• The discriminant of a sextic has $246$ terms; and
• The discriminant of a septic has $1103$ terms.

These numbers form the . Go there to see a few subsequent terms.

#### Discriminant of a cubic polynomial

Consider the cubic polynomial $ax^3 + bx^2 + cx + d$. Its discriminant formula reads:

$\small\quad \begin{split} b^2c^2 - 4ac^3 - 4b^3d - 27a^2d^2\\ +\ 18abcd \end{split}$

We have,

• $D > 0$ if, and only if, the roots are three distinct real numbers;

• $D < 0$ if, and only if, there is one real root and two complex conjugate roots; and

• $D = 0$ if, and only if, at least two roots are equal (one root of multiplicity $3$ or two distinct real roots, one of which is a double root).

#### Discriminant of a quartic polynomial

Consider the quartic polynomial $ax^4 + bx^3 + cx^2 + dx + e$. The formula for its discriminant reads:

$\small\begin{split} 256a^3e^3 - 192a^2bde^2 - 128a^2c^2e^2\\ + 144a^2cd^2e - 27a^2d^4 + 144ab^2ce^2\\ - 6ab^2d^2e - 80abc^2de + 18abcd^3\\ + 16ac^4e - 4ac^3d^2 - 27b^2e^2\\ + 18b^3cde - 4b^3d^3 - 4b^2c^3e\\ + b^2c^2d^2 \end{split}$
• $D > 0$ if, and only if, there are four distinct real roots or four distinct non-real roots (two pairs of conjugate complex roots);

• $D < 0$ if, and only if, there are two distinct real roots and two distinct non-real roots (one pair of conjugate complex roots); and

• $D = 0$ if, and only if, there are two or more equal roots. There are 6 possibilities:

1. Three distinct real roots, of which one is double;

2. Two distinct real roots, both of which are double;

3. Two distinct real roots, of which one has a multiplicity of three;

4. One real root with a multiplicity of four;

5. One real double root and a pair of non-real complex conjugate roots; and

6. One pair of double non-real complex conjugate roots.

#### Discriminants of a quintic polynomial

We don't give the formula as it has... 59 terms, and each term is a monomial of degree eight in six variables π€―

So, you might be wondering how to find the discriminant of a quintic polynomial...

Fortunately, there's our discriminant calculator, which has this formula implemented π Use it whenever you need to consider a quintic polynomial!
After you've done that, apply the following set of rules to deduce the properties of your polynomial:

• $D > 0$ if, and only if, there are five distinct real roots or one real root and two pairs of non-real complex conjugate roots;

• $D < 0$ if, and only if, there are three distinct real roots and one pair of non-real complex conjugate roots; and

• $D = 0$ if, and only if, there are two or more equal roots. There are 4 possibilities:

1. Six different cases with real roots only.

2. Two distinct real roots, one of which is double, and one pair of non-real complex conjugate roots.

3. One real root of multiplicity three and one pair of non-real complex conjugate roots; and

4. One real single root and one pair of non-real complex conjugate double roots.

## How to use this discriminant calculator?

To use the discriminant calculator, follow the steps below:

1. Start by picking the degree of the polynomial you want to consider. You can choose polynomials with degrees between $2$ and $5$, so quadratic (degree two), cubic (degree three), quartic (degree four), or quintic (degree five) polynomials.

For instance, if your task is to determine the discriminant of a quadratic equation, choose second as the degree.

2. Input all coefficients of your polynomial, including those equal to zero.

3. Enjoy the result, which our discriminant calculator returns immediately! π

Anna Szczepanek, PhD
Polynomial's degree
Second
aβxΒ² + aβx + aβ
Enter all coefficients
aβ
aβ
aβ
Discriminant
If you want to use the discriminant to estimate the roots of a quadratic equation, try our quadratic formula calculator!
People also viewedβ¦

### BMR - Harris-Benedict equation

Harris-Benedict calculator uses one of the three most popular BMR formulas. Knowing your BMR (basal metabolic weight) may help you make important decisions about your diet and lifestyle.

### Black Friday

How to get best deals on Black Friday? The struggle is real, let us help you with this Black Friday calculator!

### Compatible numbers

Estimate the best compatible numbers for your arithmetic operations using our compatible numbers calculator.

### Scatter plot

This scatter plot calculator will allow you to visualize any set of 2D data points.