In algebra, the discriminant of a polynomial is a polynomial function of its coefficients, which allows deducing some properties of the roots without computing them.1
You are probably aware of well-known formula of discriminant for quadratic polynomial , which is and use this formula to compute the roots.
However, the discriminant actually allows us to deduce some properties of the roots without computing them. In case of quadratic polynomial, it is zero if and only if the polynomial has a double root, it is positive if the polynomial has two real roots, and it is negative if roots are complex.
The calculator below computes the discriminant and you can find a bit more theory on discriminants right under it.
The discriminant for a polynomial of degree n: can be defined either in terms of the quotient of the resultant or in terms of the roots.
In terms of the roots, the discriminant is equal to
Technically, one can derive the formula for the quadratic equation without knowing anything about discriminant. And then, if you plug derived expressions for the roots into the definition above, you will end up with the .
In terms of the quotient of the resultant the discriminant is equal to
where Res is the resultant of A and the first derivation of A'. The resultant, in short, is the determinant of the Sylvester matrix of A and A'.
In case of quadratic polynomial the A is and the A' is . If you indeed write down Sylvester matrix for these two polynomials and derive the determinant, you again will end up with the .
Higher degree discriminant computation
Using the second definition you can derive formulas for polynomial of higher degrees (the link below has formulas for degree 3 and degree 4) but they are quite complex.
OEIS sequence A007878 lists 5 terms for polynomials of 3 degree, 16 tems for 4 degree, 59 terms for 5 degree, and finally 3815311 terms for polynomials of 12 degree.
The calculator below computes the discriminant of a higher degree polynomial from the resultant of a polynomial and its derivative