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.
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 ≥ 2:
p(x) = aₙxⁿ + ... + a₁x + a₀.
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.
If you're unsure what multiple roots are, check the next part of this article; otherwise, you may go straight to the definition of the discriminant
|💡 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₀, is a root of multiplicity
p if you can divide
p without a remainder by:
(x − x₀)ᵏ
but not by:
(x − x₀)ᵏ⁺¹.
In other words, it's a root if there exists a polynomial
q such that:
p(x) = (x − x₀)ᵏ * q(x)
q(x₀) ≠ 0.
k = 1, then we say that
x₀is a simple root;
k ≥ 2, then we say that
x₀is a multiple root; and
- In particular, if
k = 2, then we say that
x₀is a double root.
|💡 The multiplicity of a root is the number of times that root occurs in the factorization of |
In other words, the multiplicity of
The roots of:
x³ - 8x² + 21x - 18
3. You can factorize this polynomial as:
(x - 2)(x − 3)²,
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ₙxⁿ + ... + a₁x + a₀
x₁, ..., xₙ (these roots are not necessarily all unique!). We define the discriminant of
D(p) = aₙ²ⁿ⁻² ∏(xᵢ - xⱼ)²,
where the product
∏ is taken over all
i < j.
D(p)is a homogenous polynomial of degree
2(n - 1)in the coefficients of
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
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.
Properties of the discriminant
From the math formula for discriminants given in the previous sections, we can deduce several essential properties of discriminants.
D(p) be the discriminant of
p, as we defined above. As for the values of
pis a real polynomial,
D(p)is always a real number;
D(p) = 0if, and only if,
phas a multiple root; and
D(p) > 0if, and only if, the number of non-real roots of
pis a multiple of four (zero included).
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:
q(x) = p(x + a), then
D(q) = D(p).
D(p)is invariant (up to scaling) under homothety:
q(x) = p(a * x), then
D(q) = aⁿ⁽ⁿ⁻¹⁾D(p).
Discriminant of a quadratic equation formula
Consider the quadratic polynomial
ax² + bx + c. The formula for its discriminant is:
b² - 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 ± √(b² - 4ac)] / (2a)
Without computing the roots, we can deduce the following from the sign of the discriminant:
D > 0if, and only if, the polynomial has two distinct real roots;
D < 0if, and only if, the polynomial has a pair of conjugate complex roots; and
D = 0if, and only if, the polynomial has a double root.
Moreover, if the coefficients
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 > 0if, and only if, the parabola doesn't intersect the horizontal axis;
D < 0if, and only if, the parabola intersects the horizontal axis at two points; and
D = 0if, and only if, the parabola touches (is tangent to) the horizontal axis.
Remember that you can solve quadratic equations by completing the square!
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
- The discriminant of a quartic has
- The discriminant of a quintic has
- The discriminant of a sextic has
- The discriminant of a septic has
These numbers form the OEIS sequence A007878. Go there to see a few subsequent terms.
Discriminant of a cubic polynomial
Consider the cubic polynomial
ax³ + bx² + cx + d. Its discriminant formula reads
b²c² - 4ac³ - 4b³d - 27a²d² + 18abcd.
D > 0if, and only if, the roots are three distinct real numbers;
D < 0if, and only if, there is one real root and two complex conjugate roots; and
D = 0if, and only if, at least two roots are equal (one root of multiplicity
3or two distinct real roots, one of which is a double root).
Discriminant of a quartic polynomial
Consider the quartic polynomial
ax⁴ + bx³ + cx² + dx + e. The formula for its discriminant reads:
256a³e³ - 192a²bde² - 128a²c²e² + 144a²cd²e -
27a²d⁴ + 144ab²ce² - 6ab²d²e - 80abc²de +
18abcd³ + 16ac⁴e - 4ac³d² - 27b⁴e² +
18b³cde - 4b³d³ - 4b²c³e + b²c²d².
D > 0if, and only if, there are four distinct real roots or four distinct non-real roots (two pairs of conjugate complex roots);
D < 0if, and only if, there are two distinct real roots and two distinct non-real roots (one pair of conjugate complex roots); and
D = 0if, and only if, there are two or more equal roots. There are 6 possibilities:
three distinct real roots, of which one is double;
two distinct real roots, both of which are double;
two distinct real roots, of which one has a multiplicity of three;
one real root with a multiplicity of four;
one real double root and a pair of non-real complex conjugate roots; and
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 > 0if, and only if, there are five distinct real roots or one real root and two pairs of non-real complex conjugate roots;
D < 0if, and only if, there are three distinct real roots and one pair of non-real complex conjugate roots; and
D = 0if, and only if, there are two or more equal roots. There are 4 possibilities:
six different cases with real roots only;
two distinct real roots one of which is double, and one pair of non-real complex conjugate roots;
one real root of multiplicity three and one pair of non-real complex conjugate roots; and
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:
Start by picking the degree of the polynomial you want to consider. You can choose polynomials with degrees between
5, so a 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.
Input all coefficients of your polynomial, included those equal to zero.
Enjoy the result, which our discriminant calculator returns immediately! 😁