# Prove $ax^2+bx+c=0$ has no rational roots if $a,b,c$ are odd

If $a,b,c$ are odd, how can we prove that $ax^2+bx+c=0$ has no rational roots?

I was unable to proceed beyond this: Roots are $x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}$ and rational numbers are of the form $\frac pq$.

• This is incorrect, as roots are real if $b^2\geq 4ac$ Maybe you mean rational? Mar 24, 2013 at 14:10
• You are like saying: I give you this problem. DO IT!
– JSCB
Mar 24, 2013 at 14:12

You should think about factoring the polynomial rather than finding its roots. If $ax^2 + bx + c$ has a rational root, then its other root must also be rational, and then it factors in some way like this: $$ax^2 + bx + c = (Ax + B)(Cx + D) \quad A,B,C,D \in \mathbb{Z}$$ Then $a = AC$ and $c = BD$, so if both are odd, then all of $A,B,C,D$ are odd. But then we also have $b = AD + BC$, which is the sum of odd integers, and therefore is even.

• Interestingly, this gives a quite straightforward proof that $\sqrt5$ is irrational, by considering $x^2 + 3x + 1$, whose roots by the quadratic formula are $(-3 \pm \sqrt5)/2$ and irrational by the above. This technique seems to be fairly limited, though: you certainly can't make it work for the much more famous $\sqrt2$ (why?). Nov 22, 2015 at 17:18
• How are we claiming that A, B, C, D are all necessarily integers? If we factor a out of the expression in its factored form, we'll have a resultant factored form of (x-p)(x-q) for the equation as per given information. Then for A, B, C, D to be integers, we must have the condition that multiplying a to the factored form in some ratio (perhaps multiplying a/k and k to the 2 factors) gives integer A, B, C, D. How is this shown if possible? Otherwise how is it safe to assume A, B, C, D are integers and not fractions? Jun 20, 2021 at 9:25
• Gauss's lemma says that the polynomial has to factor over the integers if it does over the rationals. Jun 21, 2021 at 14:43
• Could you please complete your argument citing other necessary corollaries if required? All I know is Gauss's Lemma deals with irreducibility and not reducibility. Is it implicit somehow? Kindly explain, it'd mean a lot. Jul 4, 2021 at 22:42

Consider a quadratic equation of the form $a\cdot x^2 + b\cdot x + c = 0$. The only way, it can have rational roots IFF there exist two integers $\alpha$ and $\beta$ such that

$$\alpha \cdot \beta = a\cdot c\tag1$$ $$\alpha + \beta = b\tag2$$ Explanation\left\{ \begin{align} if\,\alpha\cdot \beta &= a\cdot c,\\ \frac{\alpha}{a} &= \frac{c}{\beta}\\ a\cdot x^2 + b\cdot x + c& = a\cdot x^2 + (\alpha + \beta)\cdot x + c\\ & = a\cdot x^2 + \alpha\cdot x + \beta\cdot x + c\\ & =a\cdot x(x + \frac{\alpha}{a}) + \beta\cdot (x + \frac{c}{\beta}))\\ & =a\cdot x(x + \frac{\alpha}{a}) + \beta\cdot (x + \frac{\alpha}{a}))\\ & =(x+\frac{\alpha}{a})\cdot (a\cdot x + \beta)\\ &\text {As a Quadratic equation has only two roots,}\\ &\text {there would be no other way to factorize the equation} \end{align}\right. $$\text{Reason }\alpha,\beta\in\mathbb{Z}\begin{cases} \text{Given a Ring R, with two operations }\left\{⋅,+\right\},\text{ on }\mathbb{Q}\\ \text{and if } \alpha,\beta \in \mathbb{Q},\alpha\cdot \beta \in \mathbb{Z},\alpha+\beta\in\mathbb{Z}\\ \Rightarrow\alpha,\beta \in \mathbb{Z}\\ \text{ where } \mathbb{Z}\subset\mathbb{Q} \end{cases}$$ If $(a,b,c)$ are odd then $\alpha \cdot \beta$ is odd and $\alpha + \beta$ is odd, but you cannot have two integers whose product and sum are odd.

So by contradiction we prove that the equation cannot have rational roots

• Could you elaborate on your IFF statement? Mar 24, 2013 at 16:00
• Aaha I noted this down you cannot have two integers whose product and sum are odd.
– ABC
Mar 24, 2013 at 16:35
• The proof is incomplete (or incorrect), since the claim that $\alpha$ and $\beta$ are integers (vs. rationals) is not justified. For further explanation see my second answer (the one using the AC-method). Mar 25, 2013 at 0:47
• @MathGems: I thought it was obvious. I have added few more lines in support of this. Mar 25, 2013 at 3:13
• I see that you've removed the erroneous proof of the claim and replaced it by the claim itself - still, alas, unjustified. Why don't you simply remark that the claim (if two rationals have integral sum and product then they are both integers) is an immediate consequence of the Rational Root Test. Then your proof will be both correct and complete. Mar 26, 2013 at 17:55

Suppose that $a,b,c$ are odd. $ax^2+bx+c=0$ has rational roots iff the discriminant is the square of an integer. That is, there is an integer $d$ so that $d^2=b^2-4ac$. Since $a,b,c$ are odd, $d$ must also be odd.

Note that the right hand side of $$(b-d)(b+d)=4ac\tag{1}$$ has exactly two factors of $2$. However, since $b$ and $d$ are both odd, $2d\equiv2\pmod{4}$ and so one of $b-d$ and $b+d$ is $0\bmod{4}$ and the other is $2\bmod{4}$. Thus, the left hand side of $(1)$ has at least three factors of $2$. Contradiction.

By Gauss's lemma It suffices to consider the domain of $x$ as the integers. If $x$ is even or odd then $ax^{2}+bx+c=x(ax+b)+c$ is odd hence not equal to $0$.

• @Henrik "This does not provide an answer to the question." What? This very much provides an answer. That the answer is brief (the probable cause for its appearance in the Review list) should be irrelevant. And the fact that the argument was already proposed in other answers is another matter.
– Did
Dec 16, 2016 at 7:14

You can actually prove this in quite an elementary way without even knowing anything about the roots of the quadratic equation. Suppose, on the contrary, that we have rational root $\dfrac {p}{q}$. Then your equation is equivalent to $ap^2+bpq+cq^2=0$. You have that $a,b,c$ are all odd. I will denote odd as an $O$ and even as an $E$.

This breaks into four cases.

1) if $p=O$ and $q=E$ then you have $O+E+E=O=0$, which is impossible

2) if $p=E$ and $q=O$ then you have $E+E+O=O=0$, which is impossible

3) if $p=O$ and $q=O$ then you have $O+O+O=O=0$, which is impossible

4) if $p=E$ and $q=E$ then you have$E+E+E=E=0$. which could be possible ($0$ is an even number), so we treat this case below

Suppose $p=2k$ and $q=2l$ is a solution, then you have that $(p,q)$ is a solution of the equation if and only if $(k,l)$ is a solution, if $k=2e$ and $l=2f$ then you have that $(p,q)$ is a solution if and only if $(e,f)$ is a solution, proceeding in this way you can see that solution, if it exists, must be of the form $(p,q)=(g2^r,h2^s)$ and this also cannot be a solution beacuse this reduces to one of the first 3 cases.

Hint $\$ By the Rational Root Test, any rational root is integral, hence it follows by

Theorem Parity Root Test $\$ A polynomial $\rm\:f(x)\:$ with integer coefficients has no integer roots if its constant coefficient and coefficient sum are both odd.

Proof $\$ The test verifies that $\rm\ f(0) \equiv 1\equiv f(1)\ \ (mod\ 2)\:,\$ i.e. that $\rm\:f(x)\:$ has no roots modulo $2$, hence it has no integer roots. $\$ QED

This test extends to many other rings which have a "sense of parity", i.e. an image $\cong \Bbb Z/2,\:$ for example, various algebraic number rings such as the Gaussian integers.

• The lead coefficient is not necessarily $1$, so how does the Rational Root Test tell us that rational roots are integral?
– robjohn
Mar 26, 2013 at 18:32
• @robjohn There is a big pending edit to this post that will hopefully appear shortly. I've been waiting to see whether or not the accepted answer is edited for corrections. Many of the answers have gaps, so I plan to discuss the matter in general. Mar 26, 2013 at 18:44

If $\frac{p}{q}$ is a root then $a\frac{p^2}{q^2}+b\frac{p}{q}+c=0\Rightarrow ap^2+bpq+cq^2=0$. Now we may assume that $p,q$ are not both even; $a,b,c$ are odd, whence contradiction ($p(ap+bq)=-cq^2$ with $p$ even $c,q$ odd or $q(bp+cq)=-ap^2$ with $q$ even $a,p$ odd or ...).

• In my opinion, this is the simplest and most novel of all the answers. But it's very poorly written. The problem is elementary, probably asked to a student who is new to proving things, so it would be very helpful to not only exemplify the "trick" that's used, but also how to write a good and complete proof the "Correct"(TM) way. Then we can upvote ;-) Oct 8, 2019 at 1:15

$x= \dfrac{-b+ \sqrt{b^2-4ac}}{2a}$ or $\dfrac{-b- \sqrt{b^2-4ac}}{2a}$

If $x=\dfrac{p}{q} \implies b^2-4ac=k^2$, and $k$ is odd. ($odd-even=odd$).

Considering $a,b,c$ odd.

$k^2 \equiv 1 \mod 8$

$b^2 \equiv 1 \mod 8$

$4ac \equiv 4 \mod 8$

$b^2-4ac=-3 \mod 8 \implies 5 \mod 8$, a contradiction.(Either of $a$ or $c$ has to be even), since $k^2 \equiv 1 \mod 8$

$\therefore$ You don't get rational roots when all are odd.

• Would you need a constant $a$ at the front of the left hand side of that equation there? i.e. $a(x-\frac{p_1}{q_1})(x-\frac{p_2}{q_2})$ Mar 24, 2013 at 14:21
• You asked "Why the downvote?" On which version? We are at version 5, version 1 was not an answer, in later versions which parts were a proof and which parts were making circles around the question was unclear, and now the pre-Aliter part is not useful... All in all, you might want to use a draftbook and to post only when you have a full solution.
– Did
Mar 24, 2013 at 15:11
– Did
Mar 24, 2013 at 16:36
• Well, my previous answer needed a little modification.Right? Even I showed sum and product can't be both odd. But my explanation was flawed. And which modus operandi are you talking about? Mar 24, 2013 at 17:23
• I thought that was clear enough but let me repeat it: stop posting half digested "solutions", use a draftbook, post only when you have a full solution. (And as a bonus: use the @ thing when you comment on somebody's comment.)
– Did
Mar 25, 2013 at 23:23

Here is a proof that is elementary, i.e. requires no knowledge of modular arithmetic. First we use the AC method to reduce to a monic quadratic, i.e. one with leading coefficient $= 1.$

$$\rm\begin{eqnarray} 0\: =\ f(x)\, = &&\rm\ \, a\,x^2+\,b\,x+c\\ \rm \Rightarrow\ \ 0 = a f(x)\, = &&\rm\! (ax)^2\! + b (ax) + ac\\ \rm \Rightarrow\ \ 0 =\, F(X) = &&\rm\ \ \, X^2 \,+\ \color{#C00}b\,\ X\ \,+ \color{#0A0}{ac},\quad X = ax\end{eqnarray}$$

Suppose $\rm\,f(x_i)=0\,$ for $\rm\:\color{brown}{x_i\in\Bbb Q}.\:$ Then $\rm\,F(X_i)=0\,$ for $\rm\: X_i = a\, x_i\in\Bbb Q.\:$ By the Rational Root Test, the rational roots $\rm\,X_i$ are integers. Since their product $\rm = \color{#0A0}{ac}\:$ is odd, the roots are both odd, so their sum is even. This contradicts: by Vieta, the root sum $\rm\, = -\color{#C00}b\,$ is odd, by hypothesis. Hence $\rm\:\color{brown}{x_i \not\in \Bbb Q}.$

Remark $\$ This yields a conceptual view of the calculations in Abhijit's answer (which, alas, is incomplete, since it does not justify the reduction from rational to integer roots).

The AC-method generalizes to higher degree polynomials (see the above-linked answer). It is intimately connected to various refinement-based views of unique factorization.

Recall that the square of an odd number is always equivalent to $1$ modulo $8$.

If $a,b,c$ are all odd, then

$$b^2 - 4 a c \equiv 5 \pmod 8$$

and thus, $b^2 - 4ac$ cannot be the square of an integer (and thus cannot be the square of a rational number). Therefore the roots are irrational.

• Now that I've written this, I see a downvoted and a deleted answer that I had overlooked employ the same observation. I assume the reason is presentation, so I'll leave my answer in. Although... I don't understand the issues with the answer that got deleted.
– user14972
Mar 25, 2013 at 4:10

Proof by contradiction, by someone who just started doing proofs, using a similar contradiction proof to "$$\sqrt 2$$ is irrational". Edit note: You do not need to know mods or virtually anything other than introductory proof by contradiction to do this method.

Let $$a,b,c$$ be odd. Suppose there is a rational number $$p/q$$ that can be plugged in for x such that there is a rational solution. Assume $$p, q$$ have no common factors. (This is where the contradiction will occur!). $$0 = ax^2 + bx + c$$ has roots $$x = \frac{-b \pm \sqrt{b^2 - 4ac} }{2a}$$ Plugging in $$p/q$$ for x gives $$\frac{p}{q} = \frac{-b \pm \sqrt{b^2 - 4ac} }{2a}$$ Since $$b$$ is odd, $$b^2$$ is the product of odd and odd, meaning $$b^2$$ is odd. Since $$a$$ and $$c$$ are odd, the product of $$a$$ and $$c$$, odd and odd, is odd. Therefore $$4ac$$ is the product of even and odd which is even. So, $$b^2 - 4ac$$ is odd - even, which is odd. $$\sqrt{b^2-4ac}$$ must be a square number for there to be a rational solution. Therefore $$n^2$$ = $$\sqrt{b^2-4ac}^2. So, n^2$$ = $${b^2-4ac}$$. We know $$b^2-4ac$$ is odd, so $$n^2$$ is odd. If $$n^2$$ is odd then n is odd, and if n is odd then the entire $$\sqrt{b^2-4ac}$$ is odd. So, $$-b$$ $$\pm$$ $$\sqrt{b^2-4ac}$$ is odd plus odd, which is even. Almost there, hang in there! 2a is even by definition. If p = -b $$\pm$$ $$\sqrt{b^2-4ac}$$ and $$q = 2a$$, then $$p$$ is even and $$q$$ is even. If $$p,q$$ are even, they are by definition divisible by 2. Therefore, $$p,q$$ have a common factor. CONTRADICTION!

Let me know if this works:).

Assume the your root z is rational (= q/r where at at most one of q, r is even)

Re-write the equation with z on the left hand size and 1/z * c/a - b/a on the other. Substitute q/r for z, and put the left hand side into a fraction.

enter image description here

If neither q or r are even then numerators don't match (q != rc - qb because odd != odd + odd) and if only one is even then the denominator doesn't match (r != qa because odd != even * odd and even != odd * odd)

Therefore, z is not rational.