In mathematics, Descartes' rule of signs, first described by René Descartes in his work La Géométrie, is a technique for getting information on the number of positive real roots of a polynomial. It asserts that the number of positive roots is at most the number of sign changes in the sequence of polynomial's coefficients (omitting the zero coefficients), and that the difference between these two numbers is always even. This implies, in particular, that if the number of sign changes is zero or one, then there are exactly zero or one positive roots, respectively.
By a linear fractional transformation of the variable, one may use Descartes' rule of signs for getting a similar information on the number of roots in any interval. This is the basic idea of Budan's theorem and Budan–Fourier theorem. By repeating the division of an interval into two intervals, one gets eventually a list of disjoint intervals containing together all real roots of the polynomial, and containing each exactly one real root. Descartes rule of signs and linear fractional transformations of the variable are, nowadays, the basis of the fastest algorithms for computer computation of real roots of polynomials (see real-root isolation).

Descartes himself used the transformation for using his rule for getting information of the number of negative roots.

Descartes' rule of signs
Positive roots
The rule states that if the nonzero terms of a single-variable polynomial with real coefficients are ordered by descending variable exponent, then the number of positive roots of the polynomial is either equal to the number of sign changes between consecutive (nonzero) coefficients, or is less than it by an even number. A root of multiplicity is counted as roots.

In particular, if the number of sign changes is zero or one, the number of positive roots equals the number of sign changes.
Negative roots
As a corollary of the rule, the number of negative roots is the number of sign changes after multiplying the coefficients of odd-power terms by −1, or fewer than it by an even number. This procedure is equivalent to substituting the negation of the variable for the variable itself. For example, the negative roots of are the positive roots of
Thus, applying Descartes' rule of signs to this polynomial gives the maximum number of negative roots of the original polynomial.
Example: cubic polynomial
The polynomial
has one sign change between the second and third terms, as the sequence of signs is . Therefore, it has exactly one positive root. To find the number of negative roots, change the signs of the coefficients of the terms with odd exponents, i.e., apply Descartes' rule of signs to the polynomial
This polynomial has two sign changes, as the sequence of signs is , meaning that this second polynomial has two or zero positive roots; thus the original polynomial has two or zero negative roots.
In fact, the factorization of the first polynomial is
so the roots are −1 (twice) and +1 (once).
The factorization of the second polynomial is
So here, the roots are +1 (twice) and −1 (once), the negation of the roots of the original polynomial.
Proof
The following is a rough outline of a proof. First, some preliminary definitions:
Write the polynomial as where we have integer powers , and nonzero coefficients .
Let be the number of sign changes of the coefficients of , meaning the number of such that .
Let be the number of strictly positive roots (counting multiplicity). With these, we can formally state Descartes' rule as follows:
If , then we can divide the polynomial by , which would not change its number of strictly positive roots. Thus WLOG, let .
Nonreal roots
Any nth degree polynomial has exactly n roots in the complex plane, if counted according to multiplicity. So if f(x) is a polynomial with real coefficients which does not have a root at 0 (that is a polynomial with a nonzero constant term) then the minimum number of nonreal roots is equal to
where p denotes the maximum number of positive roots, q denotes the maximum number of negative roots (both of which can be found using Descartes' rule of signs), and n denotes the degree of the equation.
Example: some zero coefficients and nonreal roots
The polynomial
has one sign change; so the maximum number of positive real roots is one. As
has no sign change, the original polynomial has no negative real roots. So the minimum number of nonreal roots is





