Omni Calculator logo

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 pp of degree nn, where n2n \geq 2:

p(x)=anxn++a1x+a0p(x) = a_nx^n + \ldots + a_1x + a_0

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

Most importantly, the discriminant allows us to quickly check whether pp has multiple roots without actually calculating these roots: pp 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 x0x_0 is a root of multiplicity kk of pp if you can divide pp without a remainder by:

(xx0)k,(x − x_0)^k,

but not by:

(xx0)k+1(x − x_0)^{k+1}

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

p(x)=(xx0)kq(x),p(x) = (x − x_0)^k \, q(x),

and q(x0)0q(x_0) ≠ 0.

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

  • If k2k ≥ 2, then we say that x0x_0 is a multiple root; and

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

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

Example

The roots of:

x38x2+21x18,x^3 - 8x^2 + 21x - 18,

are 22 and 33. You can factorize this polynomial as:

(x2)(x3)2,(x - 2)(x − 3)^2,

so 22 is the simple root, and 33 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)=anxn++a1x+a0p(x) = a_nx^n + \ldots + a_1x + a_0

has exactly nn roots x1,,xnx_1, \ldots, x_n (these roots are not necessarily all unique!). We define the discriminant of pp as:

D(p)=an2n2i<j(xixj)2,D(p) = a_n^{2n-2} \prod_{i<j} (x_i - x_j)^2,

where:

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

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

Equivalently, we can define the discriminant of a polynomial as the determinant of the so-called Sylvester matrix 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)D(p) be the discriminant of pp, as we defined above. As for the values of D(p)D(p):

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

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

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

    In particular:

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

As for the invariance of the discriminant, we have:

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

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

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

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

Discriminant of a quadratic equation formula

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

b24acb^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:

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

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

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

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

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

Moreover, if the coefficients aa, bb, and cc are rational, then both roots of the polynomial are rational if, and only if, DD is the square of a rational number.

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

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

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

  • D=0D = 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 55 terms;
  • The discriminant of a quartic has 1616 terms;
  • The discriminant of a quintic has 5959 terms;
  • The discriminant of a sextic has 246246 terms; and
  • The discriminant of a septic has 11031103 terms.

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

Discriminant of a cubic polynomial

Consider the cubic polynomial ax3+bx2+cx+dax^3 + bx^2 + cx + d. Its discriminant formula reads:

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

We have,

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

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

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

Discriminant of a quartic polynomial

Consider the quartic polynomial ax4+bx3+cx2+dx+eax^4 + bx^3 + cx^2 + dx + e. The formula for its discriminant reads:

256a3e3192a2bde2128a2c2e2+144a2cd2e27a2d4+144ab2ce26ab2d2e80abc2de+18abcd3+16ac4e4ac3d227b2e2+18b3cde4b3d34b2c3e+b2c2d2\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>0D > 0 if, and only if, there are four distinct real roots or four distinct non-real roots (two pairs of conjugate complex roots);

  • D<0D < 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=0D = 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>0D > 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<0D < 0 if, and only if, there are three distinct real roots and one pair of non-real complex conjugate roots; and

  • D=0D = 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 22 and 55, 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!
Check out 40 similar algebra calculators 🔡
Absolute value equationAbsolute value inequalitiesAdding and subtracting polynomials… 37 more
People also viewed…

Coffee kick

A long night of studying? Or maybe you're on a deadline? The coffee kick calculator will tell you when and how much caffeine you need to stay alert after not sleeping enough 😀☕ Check out the graph below!

Equilateral triangle area

The equilateral triangle area calculator gives you the area of an equilateral triangle from either its side length or height.

Perimeter of a right triangle

The perimeter of a right triangle calculator is, as the name indicates, a tool to determine the perimeter of a right-angled triangle.

Secretary problem (Valentine's day)

Use the dating theory calculator to enhance your chances of picking the best lifetime partner.
Copyright by Omni Calculator sp. z o.o.
Privacy, Cookies & Terms of Service