Why does the discriminant tell us how many zeroes a quadratic equation has?
Solution 1:
Disclaimer: Throughout this answer, when I say "root" I mean "real root". The fact that when there are no real roots there are two complex roots is a special case of the Fundamental Theorem of Algebra. The fact that if there are any real roots then there are no complex roots follows from some algebraic tricks (you can write the quadratic as a product of linear factors, for example, and complex roots must come in conjugate pairs, etc.). I now focus on the role of the discriminant.
Answer: The graph of the equation $y=ax^{2}+bx+c$ (with $a\neq0$) is a parabola. A parabola has a single turning point, called its vertex.
Assume $a>0,$ so the vertex of the parabola is a global minimum. By sketching the graph of the equation, you can clearly see that there are three possible cases:
- if the vertex lies above the $x$-axis, then there are no roots;
- if the vertex lies on the $x$-axis, then there is exactly one root;
- if the vertex lies below the $x$-axis, then there are two roots.
It turns out that the $x$-coordinate of the vertex is $-\frac{b}{2a},$ and the $y$-coordinate is therefore $$a\left(-\frac{b}{2a}\right)^{2}+b\left(-\frac{b}{2a}\right)+c = \frac{4ac-b^{2}}{4a}.$$ Hence, the $y$-coordinate of the vertex is zero (and hence there is only one root) precisely when $4ac-b^{2}=0.$ The $y$-coordinate is positive precisely when $4ac-b^{2}>0$ (remember: we assumed $a>0$ for now), that is, $b^{2}-4ac<0,$ and then we have no roots. The $y$-coordinate is negative precisely when $4ac-b^{2}<0,$ that is, $b^{2}-4ac>0,$ and then we have two roots.
If $a<0$ then the conclusions of 1 and 3 are swapped, and similar arguments follow through.
Addendum: A similar geometric case analysis can be used to provide discriminants of higher degree polynomials (provided you know how to calculate the turning points). On the other hand, you then have more turning points, and I'd bet the number of cases increases rapidly, so that even for quartics the analysis is probably fairly involved.
Solution 2:
The crux is simply the properties of the square root function. Let $d = b^2-4ac$ be the discriminant, then
- If $d>0$, then $\sqrt{d}$ is a (positive) real number.
- If $d = 0$, then $\sqrt{d}=0$.
- If $d<0$, then $\sqrt{d} = i\sqrt{-d}$ is $i$ times a non-zero real number, i.e. a complex number which is not real.
In the first case we add/subtract a non-zero a positive real number, which results in two different real values.
In the second case we add/subtract zero (which doesn't change the number), leaving the result $x = \frac{-b}{2a}$, a single real number (which may be called a repeating zero, or a zero with multiplicity).
In the third case we add/subtract a complex number, hence the result is complex.
Solution 3:
If the equation is $ax^2+bx+c=0$, with $a\ne0$, it is equivalent to $$ 4a^2x^2+4abx+4ac=0 $$ that can also be rewritten as $$ 4a^2x^2+4abx+b^2=b^2-4ac $$ or, recognizing the square on the left-hand side, $$ (2ax+b)^2=b^2-4ac $$ Now, if $b^2-4ac<0$, we cannot find a real number $x$ such that $(2ax+b)^2=b^2-4ac$, because $(2ax+b)^2\ge0$.
If $b^2-4ac=0$, the equation becomes $(2ax+b)^2=0$, that is, $2ax+b=0$, which has a single solution $x=-\frac{b}{2a}$.
If $b^2-4ac>0$, then the equation splits into two: $$ 2ax+b=\sqrt{b^2-4ac},\qquad 2ax+b=-\sqrt{b^2-4ac} $$ so we have two distinct real solutions.
Solution 4:
This is probably going to be too complicated for the original poster, but I guess this can provide some insight.
Let $m$ and $n$ be two integers greater than $1$, $k$ be a field and let $P\in k[X]_{\leqslant n-1}$ and $Q\in k[X]_{\leqslant m-1}$. Finally, let us consider the following linear transformation: $$\varphi\colon\left\{\begin{array}{ccc}k[X]_{\leqslant m-1}\times k[X]_{\leqslant n-1} & \rightarrow & k[X]_{\leqslant m+n-1}\\(U,V) & \mapsto & PU+QV\end{array}\right..$$ Notice that $\varphi$ is invertible if and only if $P$ and $Q$ are coprime polynomials. Indeed, since $\varphi$ is linear and its domain and codomain have the same dimension over $k$, it suffices to examine when the map $\varphi$ is surjective. The result then follows from Bézout's theorem.
However, $P$ and $Q$ are coprime if and only if they have no common roots in an extension field of $k$.
Finally, $P$ and $Q$ have no common root in an extension field of $k$ if and only if $\varphi$ is invertible if and only if its determinant is nonzero.
Specifying to our case, let $m=3$, $n=2$, $P=aX^2+bX+c$ and $Q=P'=2aX+b$. In that case, let us compute $\det(\varphi)$ in the basis $\{(X^2,0),(X,0),(1,0),(0,X),(0,1)\}$ and $\{X^4,X^3,X^2,X,1\}$, one has: $$\det(\varphi)=\left|\begin{pmatrix}a&0&0&0&0\\b&a&0&0&0\\c&b&a&2a&0\\0&c&b&b&2a\\0&0&c&0&b\end{pmatrix}\right|=a^3(4ac-b^2).$$ Finally, if $a\neq 0$, $P$ is coprime with $P'$ i.e. has simple roots if and only if $b^2-4ac\neq 0$.
If you want to learn more check out resultant and discriminant. Notice that this approach will work for any degree at the price of harder computations.
Solution 5:
The discriminant can be defined not only for quadratic, but also for higher degree polynomials as follows: Suppose we know that a polynomial $$ x^n+a_{n-1}x^{n-1}+\ldots+a_1x+a_0$$ has $n$ roots $x_1,\ldots,x_n$. Then the polynomial can be rewritten as $$ (x-x_1)(x-x_2)\cdots (x-x_n)$$ and the Vieta formulas allow us to express the $a_i$ in terms of $x_1,\ldots, x_n$. The discriminant is then defined as the product of all differences between distinct roots: $$\tag1 D=(-1)^{n-1}\prod_{i\ne j}(x_i-x_j).$$ This product is symmetric in the $x_i$ (i.e., does not change if we swap two roots in the enumeration). By a very important theorem, this means that $D$ can be expressed in terms of $a_0,\ldots,a_{n-1}$. For example, for a quadratic polynomial we obtain the well-known $D=a_{1}^2-4a_0$.
But what does $D$ tell us? First of all, if any two of the roots coincide, one of the factors in $(1)$ is zero and hence $D=0$. Additionally, for the case $n=2$, we simply have $D=(x_1-x_2)^2$ and this must be positive if $x_1,x_2$ are distinct real numbers. And vice versa, if $D>0$ then we can compute a supposed value for $x_1-x_2$ as $\sqrt D$ and then, knowing that $x_1+x_2=-a_1$ by Vieta again, $x_1=\frac{(x_1+x_2)+(x_1-x_2)}{2}=\frac{-a_1+\sqrt D}2$