In algebra, the rational root theorem (or rational root test, rational zero theorem, rational zero test or p/q theorem) states a constraint on rational solutions of a polynomial equation a n x n + a n − 1 x n − 1 + ⋯ + a 0 = 0 {\displaystyle a_{n}x^{n}+a_{n-1}x^{n-1}+\cdots +a_{0}=0} with integer coefficients a i ∈ Z {\displaystyle a_{i}\in \mathbb {Z} } and a 0 , a n ≠ 0 {\displaystyle a_{0},a_{n}\neq 0} . Solutions of the equation are also called roots or zeros of the polynomial on the left side.
The theorem states that each rational solution x = p q {\displaystyle x={\tfrac {p}{q}}} written in lowest terms (that is, p and q are relatively prime), satisfies:
The rational root theorem is a special case (for a single linear factor) of Gauss's lemma on the factorization of polynomials. The integral root theorem is the special case of the rational root theorem when the leading coefficient is an = 1.