38

The quadratic formula states that:

$$x = \frac {-b \pm \sqrt{b^2 - 4ac}}{2a}$$

The part we're interested in is $b^2 - 4ac$ this is called the discriminant.

I know from school that we can use the discriminant to figure out how many zeroes a quadratic equation has (or rather, if it has complex, real, or repeating zeroes).

If $b^2-4ac > 0$ then the equation has 2 real zeroes.
If $b^2-4ac < 0$ then the equation has 2 complex zeroes.
If $b^2-4ac = 0$ then the equation has repeating zeroes.



But I don't uderstand why this works.

Travis
  • 3,604
  • 9
    As a friendly reminder to the downvoter, could you please add in the comments why you downvoted? – SAJW Jan 31 '17 at 00:00
  • 4
    A quadratic equation always has two zeroes. (May be equal) The discriminant shows whether they are real or not. – Henricus V. Jan 31 '17 at 06:16
  • @HenryW.: Interesting. How many zeroes does $\lvert x\rvert$ have? – tomasz Jan 31 '17 at 15:58
  • 2
    @tomasz $|x|$ is not quadratic. If you are talking about $x^2$, it has two identical zeroes (or a zero of multiplicity two). – Henricus V. Jan 31 '17 at 15:59
  • I'm asking what it means for an equation to have two equal zeroes. – tomasz Jan 31 '17 at 16:14
  • @tomasz, if it has two equal zeroes, it means that there are too solutions, ie: $(b-0) \div 2$ and $(b+0)\div 2$, both of which produce the zeroes. – Travis Jan 31 '17 at 16:21
  • @Tomasz: To extend Henry's remark: A quadratic always has two zeros (may be equal), a cubic always has three zeroes (may be equal), and quartic always has four zeroes (may be equal), and so on. What in the world is the connection of $|x|$ to these statements? – Tito Piezas III Jan 31 '17 at 16:39
  • 2
    @tomasz The zeroes here are in terms of holomorphic functions. If $f$ has two zeroes at $z_0$, then $f(z)/(z-z_0)^2$ has a removable singularity at $z_0$. – Henricus V. Jan 31 '17 at 16:48
  • 1
    @TitoPiezasIII: The connection is that $x\mapsto|x|$ is a function, just like $x\mapsto x^{2}.$ – Will R Jan 31 '17 at 19:02
  • 1
    @HenryW.: My point was that whether or not $x^2=0$ has two zeroes depends on what you mean by "a zero". If you mean "an element at which the equation holds/the function vanishes", there is only one zero. I also don't agree that the important feature of the discriminant is that it tells you whether the roots are equal or not. Clearly, what OP is asking about is not whether the roots are real or complex, but rather how many there are (in the obvious sense). – tomasz Jan 31 '17 at 20:51
  • @HenryW.: And even under the "counting multiplicities" interpretation, I the more important feature of disciminant is that it vanishes exactly when there is a multiple root (see C. Falcon's answer below), and there is no need to go to holomorphic functions for that. Indeed, it makes perfect sense for polynomials over an arbitrary field. My real point was that I think your comment was patronizing and unhelpful. I may have been guilty of the same in being so curt, though, so I guess I apologize for that. – tomasz Jan 31 '17 at 20:54
  • Is it still called a zero if it's complex? Maybe it's just been too long since I've done it, but I learned the discriminant tells you if there's 0, 1 or 2 zeroes. – corsiKa Jan 31 '17 at 22:52
  • @corsiKa, it tells you if there are 0, 1, or 2 real zeroes – Travis Jan 31 '17 at 23:09
  • Because it's the thing under $\pm \sqrt{...}$. – hobbs Feb 01 '17 at 02:26
  • 4
    Why does the discriminant tell us how many zeroes a quadratic equation has? - Because he likes to snitch. :-$)$ – Lucian Feb 02 '17 at 10:46

9 Answers9

46

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:

  1. if the vertex lies above the $x$-axis, then there are no roots;
  2. if the vertex lies on the $x$-axis, then there is exactly one root;
  3. if the vertex lies below the $x$-axis, then there are two roots.

enter image description here

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.

Will R
  • 9,154
  • This is exactly what I was planning to post when I read the question. I love simple geometric answers; too bad they don't get more attention. :) – Wildcard Jan 31 '17 at 03:23
  • I like constructive and geometric takes a lot, too. – J. M. ain't a mathematician Jan 31 '17 at 04:53
  • 4
    By the way, this geometric reasoning also tells you why completing the square works. When you complete the square you effectively make the substitution $u=x+\frac{b}{2a};$ the vertex of the resulting parabola in the $(u,y)$-plane has $u$-coordinate zero, and the constant term you get is the new $y$-intercept, which is just the $y$-coordinate I analyzed in this answer. – Will R Feb 01 '17 at 18:13
41

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.

Carsten S
  • 8,883
Eff
  • 13,304
23

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.

egreg
  • 244,946
  • Did Évariste Galois use the same approach? – Stephan Jan 31 '17 at 10:57
  • 5
    @Stephan This is a bit older than Galois. ;-) Completing the square traces back to al Khwarizmi for the modern era, but was already known to ancient Babylonians. – egreg Jan 31 '17 at 11:01
12

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.

C. Falcon
  • 19,553
12

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$

  • 1
    This is the answer that should be excepted because it shows that discriminants in some sense measure the closeness of roots one to another and therefore how many real roots there may be. – Karl Jan 31 '17 at 19:05
  • This is interesting, even if it is probably not exactly what the Original Poster asked for. Suppose all the $a_i$ happen to be real numbers. With your product formula for $D$ it can still happen that some of the factors $(x_i - x_j)$ are imaginary (i.e. complex and irreal). But I suppose some symmetry will make $D$ real? Will the very important theorem you mention establish that the formula for $D$ from $a_0,\ldots,a_{n-1}$ is a polynomial in $n$ variables? – Jeppe Stig Nielsen Feb 01 '17 at 18:50
  • @JeppeStigNielsen Yes; see this theorem. The $a_i$ are the elementary symmetric polynomials in the $x_i$, and $D$ is a symmetric polynomial in the $x_i$. – Servaes Feb 02 '17 at 07:14
7

Well if $a \ne 0$

$ax^2 + bx + c = 0 \iff$

$x^2 + \frac bax = -\frac ca \iff$

$x^2 + \frac bax + \frac {b^2}{4a^2} = \frac {b^2}{4a^2}- \frac ca \iff $

$x^2 + 2*\frac {b}{2a}x +(\frac {b}{2a})^2 = \frac {b^2 - 4ac}{4a^2} \iff $

$(x + \frac b{2a})^2 = \frac {b^2 - 4ac}{4a^2} \iff $

$x + \frac b{2a} = \pm \sqrt{\frac {b^2 - 4ac}{4a^2}} \iff $

$x + \frac b{2a} = \pm \frac {\sqrt{b^2 - 4ac}}{\pm 2a} \iff $

$x + \frac b{2a} = \pm \frac {\sqrt{b^2 - 4ac}}{2a}\iff $

$x = -\frac b{2a} \pm \frac {\sqrt{b^2 - 4ac}}{2a}\iff $

$x = \frac { -b \pm \sqrt{b^2 - 4ac}}{2a}$

Now three things can happen:

1) $b^2 - 4ac < 0$

If so then $\sqrt{b^2 - 4ac}$ is not a real number. So

$x = \frac { -b \pm \sqrt{b^2 - 4ac}}{2a}$ is never a real number.

So $ax^2 +bx +c = 0$ is impossible for any real x.

There are no real solutions.

2) $b^2 - 4ac = 0$

Then $\sqrt{b^2 - 4ac} = 0$

Then $x = \frac { -b \pm \sqrt{b^2 - 4ac}}{2a}$ would mean $x = \frac {-b}{2a}$.

So $ax^2 + bx + c = 0$ is only possible if (and will be possible if) $ x = \frac {-b}{2a}$. And so $ax^2 + bx + c = 0$ has exactly one solution when $x = \frac {-b}{2a}$.

or 3)

$b^2 - 4ac > 0$

Then $\sqrt{b^2 - 4ac} = k > 0$

then $\frac { -b + \sqrt{b^2 - 4ac}}{2a}$ and $\frac { -b - \sqrt{b^2 - 4ac}}{2a}$ are two different numbers.

And $ax^2 + bx + c = 0 \iff x = \frac { -b + \sqrt{b^2 - 4ac}}{2a}$ or $x = \frac { -b - \sqrt{b^2 - 4ac}}{2a}$.

So $ax^2 +bx + c = 0$ has exactly two solutions. They are $x = \frac { -b + \sqrt{b^2 - 4ac}}{2a}$ or $x = \frac { -b - \sqrt{b^2 - 4ac}}{2a}$

fleablood
  • 130,341
  • The square root of a negative number is called complex, and exists just as much as negative numbers. The square root of zero is 0, and is just ignored, and you get solutions anyway. – Travis Jan 31 '17 at 00:19
  • Yes, but you were asking about real solutions. – fleablood Jan 31 '17 at 00:22
  • The square root of 0 = 0 is NOT ignored. $\frac {-b + 0}{2a} = \frac {-b - 0}{2a}$ – fleablood Jan 31 '17 at 00:26
  • So $a x^2 + bx + c = 0 \iff x = \frac{-b \pm \sqrt {b^2 -4ac}}{2a}$ would mean $ax^2 + bx + c = 0 \iff x = \frac{-b}{2a}$. There is one solution. $ \frac{-b \pm 0}{2a}$ is only one value. – fleablood Jan 31 '17 at 00:30
  • 1
    "The square root of a negative number is called complex, and exists just as much as negative numbers." Not exactly true. $-5$ does not exist in $\mathbb N$. $\sqrt 2$ does not exist in $\mathbb Q$ and $\sqrt{-1} $ does not exist in $\mathbb R$ are all valid and true statements. We are talking about real numbers, so it is legitimate to it doesn't exist in the real numbers. In the complex numbers a quadratic equation always has solutions so "no real solutions" wouldn't be a relevant statement if we were talking about complex numbers. – fleablood Jan 31 '17 at 00:40
  • Rings?? Who mentioned rings? You asked about REAL solutions in a REAL context. I answered about real solutions in a real context claiming "if $b^2 - 4ac < 0$ then $\sqrt(b^2 - 4ac)$ does not exist, the numbers $x = (-b \pm \sqrt{b^2 -4ac})/2a$ were impossible and that $ax^2 + bx+c=0$ would be impossible all withing the context of x being a real number. You downvoted me on the basis that I didn't mention complex numbers. Although complex numbers certainly exist and ax^2+bx+c=0 will always have complex solutions when the discriminate is negative werent relevent to the question that was asked. – fleablood Jan 31 '17 at 00:50
  • But the question specifically mentioned complex numbers, and didn't ask in a real context, it asked to prove in an algebraic context. I didn't downvote because you didn't mention complex numbers, I downvoted because you called $\sqrt{n}$ where $n<0$ impossible – Travis Jan 31 '17 at 00:52
  • @Travis: What is the point of prolonging this argument? The post has been edited and you problem you seem to have had with it appears to be gone. – Will R Jan 31 '17 at 00:53
  • @WillR, and I have lifted my downvote since that has happened. – Travis Jan 31 '17 at 00:54
  • Didn't you edit that later? the question as I read it said d > 0 means two real solutions and d = 0 means 1 real solution and d < 0 means no real solutions. Maybe I'm remembering wrong. Anyway the reason is exactly the same in either case. – fleablood Jan 31 '17 at 00:55
  • OMG I have never seen bloggers go on and on about an High School Algebra II issue! – David Dyer Jan 31 '17 at 22:50
3

This question seems like one I would ask, an appeal to common sense. So I answer and face the usual rotten scores.

The discriminant is the number under the radical. Consider putting positive numbers, negative numbers and zero under the radical.

Plus or minus root POSITIVE NINE has two real solutions: positive or negative three. There are two real numbers you can square -- positive three or negative three -- to get positive nine.

Plus or minus root ZERO has one real solution: zero. There is one real number you can square -- zero -- to get zero.

Plus or minus root NEGATIVE NINE has no real solutions. There is no real number that you can square to get negative nine.

Chaim
  • 639
1

The answer to this can be quite elaborate based on the fundamental theorem of algebra. However, it all boils down to this.

The quadratic equation for second grade polynomials always has that +- sign before the discriminant. That means that there are TWO solutions to that. So, for each solution x being r and i the real and imaginary parts respectively:

$$ x_1= r_1+i_1 $$ $$ x_2= r_2+i_2 $$ $$ r_1=r_2={{-b} \over {2a}}$$

For two complex numbers, they are distinct if the substraction of one to the other is not 0.

$$ x_1 - x_2 =i_1-i_2 $$

So, if the imaginary parts are equal, both solutions will be the same and the root polynomial of that solution will appear twice in the polynomial's decomposition (as per the fundamental theorem of algebra). Else, two different solutions will appear.

0

Ask your self how you would solve the quadratic equation

$$ax^2+bx+c=0$$ or

$$x^2+\frac bax+\frac ca=0$$ (to avoid sign issues).

When you plot the curve you immediately see that it has a single minimum and by canceling the derivative,

$$2x+\frac ba=0$$ you confirm this, and get the abscissa of the minimum,

$$x^*=-\frac b{2a}.$$

From there, the ordinate,

$$y^*=\frac{b^2}{4a^2}-\frac ba\frac b{2a}+\frac ca=-\frac{b^2-4ac}{4a^2}=-\frac\Delta{4a^2}.$$

Then for real roots to be possible, this ordinate must be negative so that the parabola crosses the $x$ axis.


In the picture, same abscissa and varying ordinates of the minimum.

enter image description here