We’ve discussed the Rational Root Theorem in the past, but not a theorem that is often taught along with it, namely Descartes’ Rule of Signs, which predicts the numbers of positive and negative zeros (roots) of a polynomial. Both are ascribed to Rene Descartes; both are often taught without proof. Here we’ll introduce the theorem, see some illuminating examples, discover some subtleties in its meaning, and then explore why it is true.
What the rule says
We’ll start with this question, from 1998:
Descartes - Rule of Signs I don't understand Descartes' Rule of Signs. I'm trying to find the number of positive and negative real zeros for a polynomial: 4 3 2 -3x +7x -4x +5x-8 = 0 Can you help me solve this please? I don't even know where to start.
Descartes’ Rule of Signs, as you can tell, is a theorem that tells you something about how many positive or negative real zeros a polynomial might have (also called roots of the equation as shown; we won’t be consistently distinguishing the words). What does it say?
Doctor Barrus explained:
Hi, Rachaun - To apply Descartes' Rule of Signs to a polynomial, here is what you do: First, make sure the the polynomial is arranged in _descending order_; that is, make sure the powers on the variable (in your case, x) are ordered from greatest to least. Your polynomial, -3x^4 + 7x^3 - 4x^2 + 5x - 8 (where ^ means exponentiation), is already in this order.
If we’d been given, say, \(7x^3+5x-3x^4-4x^2-8\), we’d have to rearrange it to \(-3x^4+7x^3-4x^2+5x-8\).
Next, list the signs on the terms. For your polynomial, we'd get
-3x^4 + 7x^3 - 4x^2 + 5x - 8
- + - + -
We can either focus on the signs in the polynomial itself, \({\color{Red}-}3x^4{\color{Red}+}7x^3{\color{Red}-}4x^2{\color{Red}+}5x{\color{Red}-}8\), or write them separately as \(\left\langle- + – + -\right\rangle\). Don’t forget the sign of the leading term, which, if positive, will not be written!
Note also that if any coefficients are zero (for instance, if there is no square term), we just ignore them; we are listing the signs of the non-zero coefficients, in order.
Now, count the number of sign changes between successive terms. For example, we change from negative to positive between the first two terms. This is one change. For the whole polynomial, we get
-3x^4 + 7x^3 - 4x^2 + 5x - 8
\ / \ / \ / \ /
* * * *
where * denotes a sign change.
In this case, every coefficient changes the sign; in other cases, there might be no changes \(\left\langle+ + + + +\right\rangle\), or just a couple \(\left\langle+ – – + +\right\rangle\). You may find it helpful to mark changes as you count them: \(\left\langle+|- -|+ +\right\rangle\) has two changes. Here, it’s \(\left\langle-|+|-|+|-\right\rangle\).
Counting positive roots
Thus, in this polynomial, there are 4 sign changes. This number, the number of sign changes, is the maximum number of possible positive real roots to the polynomial equation. The actual number of roots is this number minus an even number. So the equation -3x^4 + 7x^3 - 4x^2 + 5x - 8 = 0 has 4 sign changes. Thus, the number of positive real roots is either 0, 2, or 4, since 4 - 0 = 4 4 - 2 = 2 4 - 4 = 0 Descartes' rule of signs doesn't tell us anything more about the exact number of positive roots.
So we write down the number of sign changes, and subtract 2 repeatedly to see other possibilities.
In fact, for our polynomial there are no positive roots, as its graph shows:

But another polynomial with the same pattern of signs might have 2 positive roots, like \(-x^4+3x^3-3x^2+3x-2\):

or 4 positive roots, like \(-2x^4+15x^3-40x^2+45x-18\):

So the rule doesn’t tell us everything, but it does tell us there aren’t 1 or 3 positive zeros.
Counting negative roots
Next, substitute -x in for x everywhere. In this example, we put -3(-x)^4 + 7(-x)^3 - 4(-x)^2 + 5(-x) - 8 and expand this to -3x^4 - 7x^3 - 4x^2 - 5x - 8 (All I did was operate on the minus signs according to the powers: (-x)^2 = (-x)(-x) = x^2 (-x)^3 = (-x)(-x)(-x) = -x^3 etc.)
The result is to change the signs of all odd-degree terms.
What this does is to reflect the polynomial across the y-axis, changing positive roots to negative and vice versa:

Now follow the same process as above for counting the number of sign changes. The number of sign changes in this new polynomial is the maximum number of negative real roots. The actual number of roots is this number minus an even number. This new polynomial has 0 sign changes, since every term is negative. Therefore, there are 0 negative real roots to the equation -3x^4 + 7x^3 - 4x^2 + 5x - 8 = 0. These bits of information should help you determine where the solutions of the equation are.
More examples
Since that example turned out to be a little dull, let’s try another. Suppose we are given $$x^4-5x^3+5x^2+5x-6.$$ Since the signs are \(\left\langle+|-|+ +|-\right\rangle\), with 3 sign changes, we may have either 3 or 1 positive root. Here is the graph, showing that there are in fact three.

And when we change odd signs, we get \(\left\langle+ + +|- -\right\rangle\), so there must be one negative root, as we see.
But here is the graph of $$x^4-5x^3+5x^2+5x-2,$$ where I’ve just added 4 (without changing the sign pattern):

This shows how the number of positive roots can change from 3 to 1 while still having 3 sign changes. That’s why the rule works like that!
You can see how this rule may be helpful in solving equations using the Rational Root Theorem: If we know, say, that there can be no more than one negative root, and we’ve already found one, then we don’t need to try any more negative numbers. Another way to reduce the set of numbers to try is discussed in Bounds on Zeros of a Polynomial, where we can decide whether to try any larger numbers than we already have.
On the other hand, now that it’s so easy to graph an equation, neither has much practical use! It’s mostly a fascinating curiosity.
Applying the rule
Now consider this question from 2000:
Signs of Roots of 6th-Degree Polynomials I've been having some problems with Descartes' Rule of Signs. Can you explain to me why, in a 6th-degree polynomial, the roots can't have two real positive roots, two real negative roots, and two imaginary roots? My teacher told me it's related to the sum and product of the roots. We were told that the maximum number of positive roots is three, and the maximum number of negative roots is three. This is what the possibilities look like, according to her. Real (+) (-) Imaginary 3 3 0 1 3 2 3 1 2 If there are more I really don't know.
This, as we’ll see, is not true; we can’t be sure what the teacher actually said (was there some additional assumption?), but we can explore a little.
Doctor Rob answered:
Thanks for writing to Ask Dr. Math, Chris.
There are polynomials of degree 6 with real number coefficients that have two positive real roots, two negative real roots, and two complex roots. One such polynomial is:
x^6 - 4*x^4 - x^2 + 4.
The roots are 1, 2, -1, -2, i, and -i.
He will have found this by choosing those roots, and expanding $$(x-1)(x-2)(x+1)(x+2)(x-i)(x+i)=x^6-4x^4-x^2+4$$
In this example, the pattern of signs is \(\left\langle+|- -|+\right\rangle\); note that we ignore zero coefficients (which have no sign). This gives either 2 or 0 possible positive roots, and since the function has even symmetry, it must also have 2 or 0 negative roots. This implies that it must have at least 2 non-real roots, as in fact it does.
Here is its graph:

So if the teacher was right, there must have been some further condition she had stated.
That tells me that your teacher is referring to a specific polynomial of degree 6 that has a different pattern of signs in its coefficients. Perhaps it was a polynomial like:
f(x) = x^6 - 3x^5 - 7x^4 + 6x^3 + 2x^2 - x - 12
This polynomial has three sign changes in the sequence of its coefficients:
+ - - + + - -
^ ^ ^
That tells you, by Descartes' Rule of Signs, that there are at most three positive real roots, and furthermore, that the number of positive real roots differs from three by an even number. That means that the number of positive real roots is either three or one (because 2 and 0 differ from 3 by an odd number).
As for negative roots, we change the signs on odd powers, as before:
By considering
f(-x) = x^6 + 3x^5 - 7x^4 - 6x^3 + 2x^2 + x - 12
which also has three sign changes in the sequence of its coefficients,
+ + - - + + -
^ ^ ^
you see that f(-x) also has either three or one positive real roots, so f(x) has three or one negative real roots. That gives you four possible setups:
Positive Negative Complex
3 3 0
3 1 2
1 3 2
1 1 4
(For the particular f(x) I gave above as an example, the last of these possibilities holds. For other examples, any of the other of these could happen.)
So Chris omitted one possibility. Here is the graph of the example, showing the one positive and one negative roots: $$x^6-3x^5-7x^4+6x^3+2x^2-x-12$$

Doctor Rob doesn’t appear to have chosen this polynomial based on simple given roots; everything is probably irrational, and can’t be found exactly. According to Wolfram Alpha, they are approximately \(-2.01344\), \(4.29128\), -0.61371- 0.79049i\), \(-0.61371+0.79049i\), \(0.97479-0.66070i\), and \(0.97479+0.66070i\).
A polynomial with the same sign pattern, but with 3 positive and 3 negative roots, is $$8x^6-12x^5-34x^4+39x^3+44x^2-27x-18$$

But what if zero is a root?
Finally, here’s a question about a special case, from 2006:
Importance of Constant Term in Descartes' Rule of Signs? Any third degree polynomial must have at least one real root. Is it possible to disprove this using Descartes' rule of signs and the polynomial p(x) = x^3 + x? Using Descartes, p(x) has 0 positive roots and p(-x) has 0 negative roots. Therefore it must have three imaginary roots! But p(x) has integer coefficients, and the conjugate root theorem says all polynomials with integer coefficients must have an even number of imaginary roots. The original question was: Does a third degree polynomial exist that has no real zeros? My student answered p(x) = x^3 + x and proved it using Descartes' rule. All definitions of Descartes mention nothing about having to have a constant. You can disprove the example by factoring out the x, however I am curious as my student used this example to answer the question on a test.
Interesting!
By the Rule of Signs, \(x^3+x\), with no sign changes, has no positive and no negative roots, as stated.
But it’s easy to see that this polynomial does in fact have a real root, namely 0. You can factor it as $$x^3+x=x(x^2+1)$$, or you can graph it:

This also illustrates why any cubic must have at least one real zero: They always start in one quadrant and move to the opposite one, crossing the x-axis.
But the student is convinced there is no real zero because of the Rule of Signs. How can we correct this reasoning? The last paragraph is the key.
I answered this one, having observed the same issue in my own teaching:
Hi, Alice. I recently noticed that the text I am using fails to point out what is happening in a problem much like this. When the constant term is zero, at least one of the roots is ZERO, since you can factor out an x. Descartes' Rule of Signs mentions only POSITIVE and NEGATIVE roots! So it tells us that your equation has 0 positive roots and 0 negative roots, but that does not mean there are no REAL roots; 0 is a real number, and is a root. Perhaps we should add in "Peterson's Rule of Zeros": Count the number of missing terms starting at the constant to find the multiplicity of zero as a root, and now you have the full count of real roots. So your student was misusing Descartes by assuming that if there are no positive or negative roots, there are no real roots. In the example, p(x) = x(x^2+1) = x(x+i)(x-i) has one real root (zero) and two imaginary roots (i and -i).
When we teach this rule, we focus so much on positive and negative roots that a student can be forgiven for forgetting about zero as a root!
I haven’t found my notes from 20 years ago, in order to see just what was said; but one textbook I have (maybe the one I referred to) includes this exercise, the first on the topic:
In Exercises 79-86, use Descartes’ Rule of Signs to determine the possible numbers of positive and negative zeros of the function:
79. \(g(x)=5x^5+10x\)
The answer in the back of the book is
79. No real zeros
Of course, it has no positive zeros and no negative zeros, but it does have one real zero: 0. So it appears that the author (of this answer, at least) was thinking as our student did!
Alice replied:
Dr. Peterson - Thanks so much for pointing out what should've been obvious to me! I'm giving my student credit on the test anyway for making me go to the lengths of asking Dr. Math! Alice
What’s obvious is not always obvious …
What about multiplicity of roots?
There’s another subtlety to consider: When we count the roots, what do we do with repeated roots (multiplicity greater than 1)?
Here’s an example: The polynomial \((x-2)^2(x+1)=x^3-3x^2+4\) looks like this:

The Rule of Signs tells us that, since there are two changes of sign, there should be either 2 or 0 positive roots. But there is only one, namely \(x=2\). However, this root has multiplicity 2, so it counts as two roots. And it makes sense that any theorem about roots should take multiplicity into account.
By the way, notice what happens if we subtract 1 from our function, making \(x^3-3x^2+3\):

We didn’t change the number of sign changes; but the one double root changed to two distinct roots. This illustrates why a double root counts as two.
What if we instead add 1? Now we have \(x^3-3x^2+5\):

Again the number of sign changes is unchanged, but the one double root changed to no positive roots. This illustrates, again, why we may have to reduce the expected number of roots by an even number.
Why the rule works
I haven’t found any occasions on which we have discussed why this rule is true; and every textbook in which I’ve seen it covered just presents it as, essentially, magic. But if we explore the concept a little more, we can get some ideas.
Degree 1
First, consider a linear (degree 1) polynomial: \(ax+b\). Clearly, this has exactly one real root, namely \(-\frac{b}{a}\). This one root is positive exactly when a and b have opposite signs – that is, there is one change of sign! So this fits the rule.
Degree 2
What about a quadratic (degree 2) polynomial, \(ax^2+bx+c\)? Again, we can solve exactly for the roots, namely \(x_1=\frac{-b-\sqrt{b^2-4ac}}{2a}\) and \(x_2=\frac{-b+\sqrt{b^2-4ac}}{2a}\). How many of these two roots are positive?
First, if we divide such a polynomial by a, changing the leading coefficient to 1, this will not change the number of sign changes, or the number of positive real roots. So we can assume \(a=1\). Now the roots become \(x_1=\frac{-b-\sqrt{b^2-4c}}{2}\) and \(x_2=\frac{-b+\sqrt{b^2-4c}}{2}\).
We now have four cases in terms of the signs of a, b, and c: $$1:+\;+\;+\\2:+\;+\;-\\3:+\;-\;+\\4:+\;-\;-$$
The average of the roots is \(x_0=\frac{-b}{2}\), which is positive when b is negative (that is, when there is a sign change between a and b), and negative when b is positive.
Now consider the discriminant, \(b^2-4c\). When c is negative, this is greater than \(b^2\), so we add and subtract \(\sqrt{b^2-4c}\), a number greater than \(|b|\), so that the two roots will have opposite signs, giving us one positive root. So in cases 2 and 4, with one sign change, there is one positive root.
On the other hand, when c is positive, we either get no real roots at all (because the discriminant \(b^2-4c\) is negative), or the number we will be adding and subtracting, \(\sqrt{b^2-4c}\), will be smaller than \(|b|\), so the two roots have the same sign. So in cases 1 and 3, with zero or two sign changes, we have zero or two positive roots.
So the Rule of Signs works for quadratics. That’s encouraging.
Extending it to higher degrees
But we can’t do that for all polynomials (in fact, for degrees greater than 4, there is no possibility of a root formula), so let’s start over. We know it works for degrees 1 and 2; we can use mathematical induction to show that this property continues for higher degrees. I won’t try for a formal proof here, but just experiment to see how it makes sense in some examples.
So, suppose we have a polynomial for which the Rule of Signs works. I’ll illustrate by starting with the quadratic \(x^2+x-2\), which has one sign change and one positive root. What happens when we introduce another root, by multiplying our polynomial by \((x-c)\)?
First, let’s add a positive root by multiplying by \((x-2)\):
$$\begin{array}{r l}
{\color{Green}{x^2+x}}\;{\color{Red}{-\,2}}\\
\underline{\times\phantom{+x^2+}x-2}\\
{\color{Red}{-2x^2-2x}}\;{\color{Green}{+\,4}}\\
\underline{{\color{Green}{x^3+\;x^2}}\;{\color{Red}{-\,2x}}\phantom{\;\,+4}}\\
{\color{Green}{x^3}}\;\;{\color{Blue}{-\;x^2}}\;\,{\color{Red}{-4x}}\;\,{\color{Green}{+4}}
\end{array}$$
We observe that multiplying by the negative constant \(-2\) changes all the signs; as a result, wherever there is a sign change in the original, the column to the left of that sums two terms with the same sign, resulting in a sign (here, the \(-4\)) different from the term to the right (here, the constant \(+4\)). So sign changes are preserved. But also, there is another, new, sign change after the \(x^3\). Observe that all signs in the result are determined by the signs in the partial products (because two of the same sign are added) except the \(-x^2\), shown in blue, which might have been either positive or negative because it is obtained by adding products of two opposite signs – but whether it were positive or negative, it would produce a new sign change because it lies between a positive and a negative term. (Both \(\left\langle+ +|-\right\rangle\) and \(\left\langle+|- -\right\rangle\) have one sign change.)
So we have increased the number of positive roots by 1, and also increased the number of sign changes by 1, maintaining the rule.
Now let’s add a negative root by multiplying by \(x+3\):
$$\begin{array}{r l}
{\color{Green}{x^3}{\color{Red}{-x^2-4x}}\;{\color{Green}{+4}}}\\
\underline{\times\phantom{x^3-\;+x^2+}x+3}\\
{\color{Green}{3x^3}}\,{\color{Red}{-\;3x^2-12x}}{\color{Green}{\;+12}}\\
\underline{{\color{Green}{x^4}\,{\color{Red}{-\;\;x^3-4x^2}}\;\,{\color{Green}{+\;\;4x}}}\phantom{\;+12}}\\
{\color{Green}{\;x^4}}\;{\color{Blue}{+2x^3}}\,{\color{Red}{-\;7x^2}}\,{\color{Blue}{\;-\;\;8x}}{\color{Green}{\;+12}}
\end{array}$$
Here we have two terms (in blue) whose sign depends on specific values, yet which, again, do not affect the number of sign changes, because each lies between positive and negative terms; so each will produce one sign change regardless. So we necessarily have the same two sign changes, along with the same two positive roots.
But suppose we had more than two of the same sign in a row, as in \((x+1)(x-2)(x^2+1)=x^4-x^3-x^2-x-2\). This has one sign change and one positive root; if we multiply by \(x-3\) we get two positive roots, 2 and 3. We expect two sign changes, and that’s what we get:
$$\begin{array}{r l}
{\color{Green}{x^4}}{\color{Red}{\;-\;\;x^3-\;\;\,x^2-\;x-2}}\\
\underline{\times\phantom{x^4\;-\;\;x^3-\;\;\,x^2-\;}x-3}\\
{\color{Red}{-3x^4}}{\color{Green}{\;+3x^3+3x^2+3x+6}}\\
\underline{{\color{Green}{x^5}}{\color{Red}{\,-\;\;x^4-\;x^3-\;\;x^2-2x}}\phantom{\;\,+6}}\\
{\color{Green}{x^5\,}}{\color{Red}{-4x^4}}\,{\color{Blue}{-\,2x^3-\,2x^2}}\;{\color{Blue}{+\;\;x}}{\color{Green}{\;+\,6}}
\end{array}$$
But here we end up with several terms in a row (blue) that might have either sign if magnitudes change, and changing the sign of any of those could add more sign changes. The important thing is that this will always add an even number of sign changes. And that’s exactly what the Rule of Signs requires!
In fact, we’ll see that happen if we change the new root from 3 to \(\frac{3}{2}\):
$$\begin{array}{r l}
{\color{Green}{x^4}}{\color{Red}{\;-\;\;x^3-\;\;\,x^2-\;x-2}}\\
\underline{\times\phantom{x^4\;-\;\;x^3-\;\;\,x^2-}2x-3}\\
{\color{Red}{-3x^4}}{\color{Green}{\;+\;3x^3+3x^2+3x+6}}\\
\underline{{\color{Green}{2x^5}}{\color{Red}{-2x^4-2x^3-2x^2-4x}}\phantom{\;\,+6}}\\
{\color{Green}{2x^5}}{\color{Red}{-5x^4}}\;\,{\color{Blue}{+\;\;x^3+\;\;x^2}}\,{\color{Blue}{-\;\;\,x}}{\color{Green}{\;+\,6}}
\end{array}$$
Now there are four sign changes, but only two roots; this still satisfies the Rule of Signs. Here are these three functions, the original quartic in black (1 sign change), the first quintic in red (2 sign changes), and the second quintic in green (4 sign changes):

This should at least suggest that the rule makes sense. For an actual proof along these lines, see Descartes’ Rule of Signs, by Scott E. Brodie on the Cut the Knot website, an old favorite. A very different proof, using calculus, can be found in Wikipedia, or (a little easier to read) in the Brilliant Wiki.
