For the general definition, suppose
1 an-1 an-2 . . . a0 0 . . . 0 0 1 an-1 an-2 . . . a0 0 . . 0 0 0 1 an-1 an-2 . . . a0 0 . 0 . . . . . . . . . . . . . . 0 0 0 0 0 1 an-1 an-2 . . . a0 n (n-1)a\n-1 (n-2)an-2 . . 1a1 0 0 . . . 0 0 n (n-1)an-1 (n-2)an-2 . . 1a1 0 0 . . 0 0 0 n (n-1)an-1 (n-2)an-2 . . 1a1 0 0 . 0 . . . . . . . . . . . . . . 0 0 0 0 0 n (n-1)an-1 an-2 . . 1a1 0 0 0 0 0 0 0 n (n-1)an-1 an-2 . . 1a1
In the case n=4, this discriminant looks like this:
The discriminant of p(x) is thus equal to the resultant of p(x) and p'(x).
One can show that, up to sign, the discriminant is equal to
In order to compute discriminants, one does not evaluate the above determinant each time for different coefficient, but instead one evaluates it only once for general coefficients to get an easy-to-use formula. For instance, the discriminant of a polynomial of third degree is a12a22 - 4a0a23 -4a13 + 18 a0a1a2 - 27a02.
The discriminant can be defined for polynomials over arbitrary fields, in exactly the same fashion as above. The product formula involving the roots ri remains valid; the roots have to be taken in some splitting field of the polynomial.