This site is a work in progress. New lessons are added regularly. Contact us

The Rational Root Theorem

Learning goals

  • State that pp divides the constant and qq the leading coefficient
  • List every candidate ±pq\pm\tfrac{p}{q}, reduced and deduplicated
  • Test candidates by synthetic division, then peel and finish
  • Reduce to integer divisors of the constant when monic
  • Remember the converse is false, since most candidates fail
  • Prove irrationality from a fully failed candidate list

A pattern hiding in the factored form

Take a factored quadratic whose factors have integer coefficients and expand it:

(2x1)(3x+2)=6x2+x2.(2x - 1)(3x + 2) = 6x^2 + x - 2.

Its roots are x=12x = \tfrac{1}{2} and x=23x = -\tfrac{2}{3}. Now look at where each part of those fractions came from. The constant term 2-2 of the expanded polynomial is the product (1)×2(-1)\times 2 of the two constants, so each root’s numerator (11 and 22) divides the constant term. The leading coefficient 66 is the product 2×32 \times 3 of the two xx-coefficients, so each root’s denominator (22 and 33) divides the leading coefficient.

That is not a coincidence of this example. When a polynomial with integer coefficients has a rational root, the fraction’s numerator is always locked to the constant term and its denominator to the leading coefficient. The theorem below says exactly that, and the proof shows why the two end coefficients, and only they, control where rational roots can live.

The theorem

The Rational Root Theorem. Let

P(x)=anxn+an1xn1++a1x+a0P(x) = a_n x^n + a_{n-1}x^{n-1} + \cdots + a_1 x + a_0

be a polynomial whose coefficients an,an1,,a0a_n, a_{n-1}, \ldots, a_0 are all integers, with an0a_n \ne 0. If the rational number pq\tfrac{p}{q}, written in lowest terms (so pp and qq are integers, q1q \ge 1, and gcd(p,q)=1\gcd(p, q) = 1), is a root of P(x)P(x), then

pa0andqan,p \mid a_0 \qquad \text{and} \qquad q \mid a_n,

that is, pp divides the constant term and qq divides the leading coefficient.

Three remarks before the proof. First, the hypothesis matters: the coefficients must be integers. If your equation has fractional coefficients, multiply through by a common denominator first; that changes no roots and produces an integer-coefficient polynomial the theorem can read. Second, the theorem is a one-way implication. It says every rational root must pass the divisibility test; it does not say that every number passing the test is a root. Most passers fail when you actually substitute them in. Third, if a0=0a_0 = 0 the conclusion p0p \mid 0 is true for every integer pp (since 0=p×00 = p \times 0), so the theorem filters out nothing. In that case factor out the largest power of xx first: x=0x = 0 is a root, and the cofactor has a nonzero constant term the theorem can grip.

Proof of the Rational Root Theorem#

Suppose P ⁣(pq)=0P\!\left(\tfrac{p}{q}\right) = 0 with gcd(p,q)=1\gcd(p, q) = 1 and q1q \ge 1. Substituting x=pqx = \tfrac{p}{q} into P(x)=0P(x) = 0 gives

an(pq) ⁣n+an1(pq) ⁣n1++a1 ⁣(pq)+a0=0.a_n\left(\frac{p}{q}\right)^{\!n} + a_{n-1}\left(\frac{p}{q}\right)^{\!n-1} + \cdots + a_1\!\left(\frac{p}{q}\right) + a_0 = 0.

Fractions are awkward to reason about, so clear them: multiply both sides by qnq^n, which is not zero. Each power (pq)k=pkqk\left(\tfrac{p}{q}\right)^{k} = \tfrac{p^k}{q^k} picks up exactly the factor qnkq^{n-k} it needs, and the equation becomes

anpn+an1pn1q++a1pqn1+a0qn=0.a_n p^n + a_{n-1}p^{n-1}q + \cdots + a_1 p\,q^{n-1} + a_0 q^n = 0.

Every term here is an integer, because the coefficients, pp, and qq all are. This single equation yields both conclusions, one from each end.

For the first, move the last term across. Every remaining term contains at least one factor of pp, so pp factors out of the whole bracket:

a0qn=(anpn+an1pn1q++a1pqn1)=p(anpn1+an1pn2q++a1qn1).\begin{aligned} a_0 q^n &= -\left(a_n p^n + a_{n-1}p^{n-1}q + \cdots + a_1 p\,q^{n-1}\right) \\ &= -p\left(a_n p^{n-1} + a_{n-1}p^{n-2}q + \cdots + a_1 q^{n-1}\right). \end{aligned}

The bracket on the right is an integer, so pp divides the product a0qna_0 q^n. Now the lowest-terms hypothesis does its work. If a0=0a_0 = 0 then pa0p \mid a_0 holds trivially, so assume a00a_0 \ne 0 and compare prime factorizations. Because gcd(p,q)=1\gcd(p, q) = 1, no prime divides both pp and qq. The prime factors of qnq^n are exactly the prime factors of qq, so by that coprimality no prime factor of pp appears in qnq^n at all. Take any prime rr that appears in the factorization of pp, say to the exponent ee. Since pp divides a0qna_0 q^n, the factorization of a0qna_0 q^n contains rr at least ee times, and none of those copies can come from qnq^n, which contains no rr whatsoever. All of them therefore sit inside a0a_0. This holds for every prime power in pp, so the entire factorization of pp is contained in that of a0a_0, which is precisely the statement pa0p \mid a_0. (Signs never disturb a divisibility claim, since a factor of 1-1 can be absorbed into the cofactor.)

For the second conclusion, run the same argument from the other end. Move the first term across; every remaining term contains at least one factor of qq:

anpn=(an1pn1q++a1pqn1+a0qn)=q(an1pn1+an2pn2q++a1pqn2+a0qn1).\begin{aligned} a_n p^n &= -\left(a_{n-1}p^{n-1}q + \cdots + a_1 p\,q^{n-1} + a_0 q^n\right) \\ &= -q\left(a_{n-1}p^{n-1} + a_{n-2}p^{n-2}q + \cdots + a_1 p\,q^{n-2} + a_0 q^{n-1}\right). \end{aligned}

So qq divides anpna_n p^n. By the identical prime-factor comparison, with the roles of pp and qq exchanged, no prime factor of qq appears in pnp^n. So, since qq divides anpna_n p^n, every prime power in qq must sit inside ana_n, and qanq \mid a_n.

Notice where each hypothesis earned its keep. Integer coefficients made every term of the cleared equation an integer, so divisibility talk made sense at all. Lowest terms separated the primes of pp from the primes of qq. That separation is what let each divisibility conclusion land on the coefficient rather than on a power of the other variable. And notice, finally, what was proved: a rational root forces the two divisibilities. Nothing in the argument runs backwards, and a fraction that satisfies both divisibilities has no obligation to be a root.

Building the candidate list

The theorem turns root-hunting into a bookkeeping exercise. For a polynomial with integer coefficients and nonzero constant term:

  1. List the positive divisors of the constant term a0a_0. These are the possible numerators pp.
  2. List the positive divisors of the leading coefficient ana_n. These are the possible denominators qq.
  3. Form every quotient pq\tfrac{p}{q}, reduce each to lowest terms, discard duplicates, and attach a ±\pm sign to each survivor.

Take P(x)=2x3+3x28x+3P(x) = 2x^3 + 3x^2 - 8x + 3. The constant term is 33, with divisors 11 and 33; the leading coefficient is 22, with divisors 11 and 22. The quotients are 11,31,12,32\tfrac{1}{1}, \tfrac{3}{1}, \tfrac{1}{2}, \tfrac{3}{2}, so the complete candidate list is

±1,±3,±12,±32.\pm 1, \quad \pm 3, \quad \pm \tfrac{1}{2}, \quad \pm \tfrac{3}{2}.

Eight numbers. Any rational root of PP must be one of these eight; every other rational number in existence is ruled out before you compute a single value.

Two small housekeeping points. Duplicates really do occur: for 2x3x28x+42x^3 - x^2 - 8x + 4 the raw quotients include 22\tfrac{2}{2} and 42\tfrac{4}{2}. Those two reduce to 11 and 22, which are already on the list, leaving 88 distinct candidates rather than 1212. And the signs matter: roots can be negative, so the list always carries both signs even when every coefficient is positive.

Steps 1 and 2 look like two different instructions, but they are one question asked twice: does this whole number divide that coefficient? The figure below is that question with its answer drawn. Set a count of dots and a row width, and the rows either come out even or they do not.

Suppose the constant term is 1212. Set the count to 1212 and walk the row width from 22 up to 66. Rows of 22, 33, 44 and 66 come out even, and the readout names each width as a factor of 1212. Rows of 55 leave two dots hollow, and the readout says plainly that 55 is not a factor. Two divisors sit outside what the figure can draw, the width 11 and the width 1212 itself. Those two divisors are free, because every number is divisible by 11 and by itself. So the numerators are 1,2,3,4,6,121, 2, 3, 4, 6, 12. Now run the same walk on a leading coefficient of 44: set the count to 44. Rows of 22 come out even, while rows of 33 leave one dot hollow, so the denominators are 1,2,41, 2, 4. Every candidate the theorem allows is one of those numerators over one of those denominators, and the hollow dots are the whole of what rules a number out.

Dot array

12 dots in rows of 6 make 2 full rows with none left over. So 12 = 2 times 6. So 6 is a factor of 12. Dots laid out in equal rows, filling from the top left. Dots that do not complete a row are drawn hollow. Use the controls below the figure to change the number of dots or the row width.
Dots Rows of

12 dots in rows of 6 make 2 full rows with none left over. So 12 = 2 times 6. So 6 is a factor of 12.

A number of dots tested against a row width, with any dot short of completing a row drawn hollow. A width that leaves nothing hollow is a divisor of the count, and that single test is what both halves of the candidate list are built from.

Check your understanding

According to the Rational Root Theorem, which of these numbers CANNOT be a root of 4x3x+6=04x^3 - x + 6 = 0?

Answer choices
Candidate filter for 2x^3 + 3x^2 - 8x + 3Infinitely many rationals are filtered by the divisibility conditions into eight candidates, and testing the candidates leaves three actual roots.P(x) = 2x³ + 3x² - 8x + 3every rationalnumber p/q(infinitely many)p divides 3q divides 2candidates±1, ±3,±1/2, ±3/2(8 numbers)test eachcandidaterational roots1, 1/2, -3(3 roots)
The theorem is a filter, not an oracle. For 2x³ + 3x² - 8x + 3 it cuts the infinitely many rationals down to eight candidates; testing each one shows only three are roots.

When the leading coefficient is 1

A polynomial is monic when its leading coefficient is 11. Then the theorem’s second condition q1q \mid 1 forces q=1q = 1, and something pleasantly strong follows. Every rational root of a monic integer-coefficient polynomial is an integer, and that integer must divide the constant term. No fractions can occur at all. This special case is sometimes called the integer root theorem.

It bites quickly. Consider P(x)=x34x+2P(x) = x^3 - 4x + 2. Any rational root must be an integer dividing 22, so the whole candidate list is ±1,±2\pm 1, \pm 2. Substituting gives P(1)=1P(1) = -1, P(1)=5P(-1) = 5, P(2)=2P(2) = 2, and P(2)=2P(-2) = 2. None is zero, so this cubic has no rational roots whatsoever: whatever its roots are, every one of them is irrational or nonreal. Four quick evaluations settled a question about all infinitely many rational numbers.

From candidates to roots

The theorem supplies the shortlist; the tools from earlier in this chapter do the checking. The full workflow for factoring an integer-coefficient polynomial:

  1. Build the candidate list from a0a_0 and ana_n.
  2. Test candidates one at a time. Integers before fractions, small before large: synthetic division is quickest, and by the Remainder Theorem the number at the end of the row is exactly P(c)P(c). So one synthetic division tableau both tests the candidate and, on success, hands you the quotient.
  3. When a candidate cc gives remainder 00, the Factor Theorem converts the discovery into algebra: xcx - c is a factor, and P(x)=(xc)Q(x)P(x) = (x - c)\,Q(x) with QQ one degree lower. Keep hunting inside QQ, and test cc itself again, since roots can repeat.
  4. When the quotient drops to a quadratic, stop hunting. Factor it directly or run the quadratic formula, which finds all remaining roots, rational or not.

Worked example 1 Find every root of 2x3+3x28x+32x^3 + 3x^2 - 8x + 3

The candidate list, built above, is ±1,±3,±12,±32\pm 1, \pm 3, \pm\tfrac{1}{2}, \pm\tfrac{3}{2}. Start with the easiest candidate, x=1x = 1, by direct substitution:

P(1)=2+38+3=0.P(1) = 2 + 3 - 8 + 3 = 0.

A root on the first try. By the Factor Theorem x1x - 1 divides P(x)P(x), and synthetic division by 11 produces the quotient. Bring down the 22; multiply by 11 and add to 33 to get 55. Then multiply by 11 and add to 8-8 to get 3-3; multiply by 11 and add to 33 to get the remainder 00:

123832532530\begin{array}{c|rrrr} 1 & 2 & 3 & -8 & 3 \\ & & 2 & 5 & -3 \\ \hline & 2 & 5 & -3 & \boxed{0} \end{array}

So P(x)=(x1)(2x2+5x3)P(x) = (x - 1)\left(2x^2 + 5x - 3\right). The quotient is a quadratic, so the hunt is over: factor it directly,

2x2+5x3=(2x1)(x+3),2x^2 + 5x - 3 = (2x - 1)(x + 3),

which you can confirm by expanding. The complete factorization is P(x)=(x1)(2x1)(x+3)P(x) = (x-1)(2x-1)(x+3), and the roots are

x=1,x=12,x=3.x = 1, \qquad x = \tfrac{1}{2}, \qquad x = -3.

All three sit on the original candidate list, exactly as the theorem promised. Note the other side of that promise: five of the eight candidates turned out not to be roots. The list narrows the search; it never claims every entry succeeds.

Check your understanding

The number 33 is a root of P(x)=x32x22x3P(x) = x^3 - 2x^2 - 2x - 3. Divide by (x3)(x - 3) using synthetic division. What is the quotient?

Answer choices

Worked example 2 Find every root of 3x35x2+5x23x^3 - 5x^2 + 5x - 2

The constant term 2-2 has divisors 1,21, 2 and the leading coefficient 33 has divisors 1,31, 3, so the candidates are ±1,±2,±13,±23\pm 1, \pm 2, \pm\tfrac{1}{3}, \pm\tfrac{2}{3}.

Half the list can be dismissed by a sign observation. For any x<0x < 0, each of the four terms 3x33x^3, 5x2-5x^2, 5x5x, 2-2 is negative, so P(x)<0P(x) < 0 and no negative number can be a root. Only the four positive candidates need testing:

P(1)=35+52=1,P(2)=2420+102=12,P(1) = 3 - 5 + 5 - 2 = 1, \qquad P(2) = 24 - 20 + 10 - 2 = 12,P ⁣(13)=1959+159189=79.P\!\left(\tfrac{1}{3}\right) = \tfrac{1}{9} - \tfrac{5}{9} + \tfrac{15}{9} - \tfrac{18}{9} = -\tfrac{7}{9}.

Three failures. Test the last candidate, 23\tfrac{2}{3}, by synthetic division, letting the remainder be the verdict:

2335522223330\begin{array}{c|rrrr} \tfrac{2}{3} & 3 & -5 & 5 & -2 \\ & & 2 & -2 & 2 \\ \hline & 3 & -3 & 3 & \boxed{0} \end{array}

The remainder is 00, so 23\tfrac{2}{3} is a root and the quotient row gives P(x)=(x23)(3x23x+3)P(x) = \left(x - \tfrac{2}{3}\right)\left(3x^2 - 3x + 3\right). Pull the common factor 33 out of the quadratic and fold it into the linear factor:

P(x)=(3x2)(x2x+1).P(x) = (3x - 2)\left(x^2 - x + 1\right).

The quadratic ends the hunt. Its discriminant is (1)24(1)(1)=3<0(-1)^2 - 4(1)(1) = -3 < 0, so by the quadratic formula its roots are the complex conjugate pair from the last chapter:

x=1±i32.x = \frac{1 \pm i\sqrt{3}}{2}.

The full set of roots is x=23x = \tfrac{2}{3} together with x=1±i32x = \tfrac{1 \pm i\sqrt{3}}{2}. The rational root theorem could only ever see the first of the three. The conjugate pair lives entirely outside the theorem’s field of view, and only the quadratic formula could catch it.

What the theorem does not say

Two misreadings account for nearly every error with this theorem, and both are worth staring at.

The list contains candidates, not roots. The implication runs from root to divisibility, never backwards. Consider P(x)=x22P(x) = x^2 - 2. The number 22 passes both divisibility checks, since p=2p = 2 divides the constant term 2-2 and q=1q = 1 divides the leading coefficient. Yet P(2)=20P(2) = 2 \ne 0. A place on the list is an invitation to test, nothing more. In practice most candidates fail, and a polynomial may pass through its entire list without a single success.

The theorem sees only rational roots. Finish the x22x^2 - 2 story: its candidates are ±1,±2\pm 1, \pm 2, and P(±1)=1P(\pm 1) = -1, P(±2)=2P(\pm 2) = 2, so all four fail. The correct conclusion is that x22x^2 - 2 has no rational roots. It certainly has roots: x2=2x^2 = 2 holds for x=±2x = \pm\sqrt{2}. Those roots are irrational, so no list of fractions could ever contain them. The theorem is structurally blind to those irrational roots, just as it was blind to the nonreal pair in Worked Example 2. An empty verdict from the candidate list never means “no roots”; it means “no rational ones”.

Read positively, that blindness is a weapon. If every candidate fails, you have proved the polynomial has no rational roots, and that is exactly how mathematicians prove numbers irrational.

Worked example 3 Prove that 5\sqrt{5} is irrational

The number 5\sqrt{5} is, by definition, a root of the integer-coefficient polynomial

P(x)=x25.P(x) = x^2 - 5.

Suppose PP had a rational root. The polynomial is monic, so any rational root would be an integer dividing 55, leaving only four candidates: ±1\pm 1 and ±5\pm 5. Test all four; squaring kills the sign, so two computations cover them:

P(±1)=15=4,P(±5)=255=20.P(\pm 1) = 1 - 5 = -4, \qquad P(\pm 5) = 25 - 5 = 20.

No candidate is a root, so x25x^2 - 5 has no rational roots at all. But 5\sqrt{5} is a root. A number that is a root of a polynomial with no rational roots cannot be rational, so 5\sqrt{5} is irrational.

The same four lines generalize. For any positive integer nn, a rational root of x2nx^2 - n must be an integer dd with d2=nd^2 = n. So when that positive integer nn is not a perfect square, x2nx^2 - n has no rational roots and n\sqrt{n} is irrational. One theorem disposes of 2,3,5,6,\sqrt{2}, \sqrt{3}, \sqrt{5}, \sqrt{6}, \ldots in a single stroke.

Check your understanding

You build the full candidate list for an integer-coefficient polynomial and test every entry. None is a root. What can you conclude?

Answer choices

Common mistakes

Practice

Multiple Choice Questions (MCQ)

Progressively harder sets of questions. Each opens on its own page.

Free Response Questions (FRQ)

Longer questions in parts, to be worked out on paper. Progressive hints, the answer on its own so you can check yourself and try again, then the full worked solution, plus a rubric to mark your own work against.

Free response Work it out on paper 5 questions Start →
More practice (optional)

Extra sets, as hard as the Challenge set. Each one opens on its own page.

More resources (optional)

Other explanations of this lesson, if you want a second take.

A bit of history (Optional)

Draw a square one unit on a side and rule in the diagonal. The school of Pythagoras, teaching in Greece twenty-five centuries ago, insisted that every length is a ratio of two whole numbers. That diagonal refused. Worse, the failure was not confined to one awkward line.

Each new number then demanded a separate fight. A dialogue of Plato’s, the Theaetetus, shows the geometer Theodorus grinding through the square roots of three, five, six and the rest, as far as seventeen. Case by case, one proof apiece. Then, the dialogue reports, he stopped, and nobody knows why. What is plain is that he had no general argument, only a growing stack of particular ones.

The theorem you proved today is that general argument. Hand it the polynomial x2nx^2 - n. The polynomial is monic, so any rational root must be a whole number dividing nn, and its square must be nn exactly. When nn is not a perfect square, no such whole number exists, so n\sqrt{n} is irrational. One divisibility argument settles every case Theodorus fought individually. It also settles every case beyond seventeen that he never reached.

That is what a theorem is worth. It does not make the struggle cleverer. It ends the struggle.