# Can rational numbers have decimals?

I had a question in my exam paper - Which of the following is not a rational number?

a) $\sqrt{25}$

b) $\sqrt{45}$

c) $\sqrt\frac{256}{225}$

d) $\frac{3}{4}$

The answer to this is b. Now, $\sqrt{45} \approx 6.708$. Can someone explain why this not rational? Is it about decimal points?

A rational number is any number that can be expressed in the form of $\frac{p}{q}$, where $p,q$ are integers and $q\neq 0$.

So $\frac{3}{2}$ qualifies as a rational number right? But, in decimal form, $\frac{3}{2}$ is $1.5$ which has decimals. I thought integers don't have decimals, so 1.5 shouldn't be a rational number!

Can someone clear up my mind? Simple terms please :)

Regards.

• Observe that $25=5^2$ and $\frac{256}{225} = \frac{2^8}{9\times 25} = \frac{16^2}{3^2\times 5^2}$, so now do you see why $a)$ and $c)$ are rational numbers? Sep 8, 2014 at 13:16
• That shows options, but doesn't prove that b) is irrational. a, c and d maybe rational, but that doesn't prevent b from being rational. Sep 8, 2014 at 13:17
• For $n=p/q$ to be rational, as you've correctly stated, both $p$ and $q$ have to be integers. But that does not imply that $p/q$ must be an integer as well. Sep 8, 2014 at 13:18
• because sqrt(5) is not a rational, because you cannot represent sqrt(5) in the form p/q. Sep 8, 2014 at 16:50
• In $\sqrt{45} \approx 6.708$ the left side is not rational but the right side is. Approximate equality does not preserve rationality; indeed to know whether a number is rational it is of no use whatsoever to know approximations to it. On the other hand any number written with decimals (necessarily finitely many of them) is rational. But not every rational number is (or rather can be) written with finitely many decimals. Sep 8, 2014 at 16:50

First off, your definition of rational numbers is correct. So $3/2$ is a rational number, but in the definition it does not say that $p/q$ should be an integer, only that both of $p$ and $q$ should. Rational numbers can have decimals and even an infinite decimals, BUT any rational number's decimals will have a repeating pattern at some point whether it be like $$\frac23 = 0.666...$$ or $$\frac{92}{111000} = 0.000\hspace{2px}828\hspace{2px}828\hspace{2px}828...$$ or $$\frac32 = 1.500 \hspace{2px} 000 \hspace{2px} 000...$$ The reason why $\sqrt{45}$ is not rational is not because it has decimals. We have that $$\sqrt{45} = \sqrt{5\cdot 9} = \sqrt{5}\sqrt{9} = 3\sqrt{5},$$ so $\sqrt{45}$ must be irrational if $\sqrt{5}$ is irrational. In fact it is known that $\sqrt{p}$ for all primes $p$ is irrational such as $p=5$, see e.g. this.

Therefore we can say that $\sqrt{45}$ is irrational.

To see why the product of a (non-zero) rational number and an irrational number is irrational, see this.

• Explain why sqrt(5) is irrational? Sep 8, 2014 at 13:23
• @GreatBlitz The square root of any prime number is irrational.
– Eff
Sep 8, 2014 at 13:41
• @user112061 Great answer! Just for completeness, I've added a little note at the bottom. Sep 8, 2014 at 17:44
• In fact, the square root of a non-square integer is never rational (and the square root of a rational number is never rational unless the numerator and denominator, in reduced form, are both squares). This is easy enough to show in the contrapositive: the square of every rational number $a/b$ can be written as $a^2/b^2$, where $a^2$ and $b^2$ share no common factors, and $a^2/b^2$ is therefore in reduced form. Sep 9, 2014 at 0:41

3 out of the 4 options on that exam can be written in $\frac{p}{q}$ form, where p and q are integers. Note that integers can not have decimals. For example:

a) $\sqrt{25} = 5 = \frac{5}{1}$

b) $\sqrt{45} = \frac{?}{?}$

c) $\sqrt{\frac{256}{225}} = \frac{\sqrt{256}}{\sqrt{225}} = \frac{16}{15}$

d) $\frac{3}{4}$

So a, c, and d can be written in $\frac{p}{q}$ form (5,1,16,15,3,4 are all integers) but b cannot. If you think b is rational, then fill in the two question marks with integers and you will find that you cannot.

As shown in this answer, if the solution of $$x^2-45=0\tag{1}$$ is rational, then it is an integer. $x=6$ is too small and $x=7$ is too big, so there is no integer that satisfies $(1)$. Thus, there is no rational number that satisfies $(1)$.

That is, $\sqrt{45}$ is irrational.

• You're stating that $x$ must be an integer in this answer, but that's not true. $x^2-2.25=0$ works just fine ($x=1.5$). $\sqrt{45}$ may be irrational, but that doesn't mean that $\sqrt{x}$ must be an integer. Sep 8, 2014 at 19:12
• @BrianS: From the cited answer, the polynomial needs to be not only monic, but also all its coefficients need to be integers: "any rational number $x$ which satisfies $(2)$ with integer $c_k$ must be an integer". However, $2.25$ is not an integer.
– robjohn
Sep 8, 2014 at 21:48

Whether a number is a rational number does not depend on how it is expressed, but on whether it is possible to write it as $\frac pq$ where $p,q$ are integers and $q\neq 0$.

So any terminating decimal, for example $r=abc.defg$ is a rational number, because $10000r=abcdefg$ and $r=\frac {abcdefg}{10000}$

Also any decimal which eventually repeats represents a rational number, say $r=abc.defgefgefgefg \dots$.

Here we can look at $$10000r-10r=abcdefg.efgefgefg \dots -abcd.efgefgefg \dots=abcdefg-abcd$$

so that $9990r=abcdefg-abcd$

and $r=\frac {abcdefg-abcd}{9990}$

In fact any rational number will either terminate or repeat - think of doing long division to find the decimal expansion. Eventually you will get to remainder $0$, in which case the division ends, or you will eventually arrive at a remainder you have encountered before, in which case the pattern will repeat.

I've sketched this out because you might like to explore these ideas a bit for yourself.

$$\sqrt{45} = \sqrt{9\cdot 5} =3\sqrt{5},$$ but $\sqrt{5}$ isn't rational.

Short proof: if $\sqrt{5}=\dfrac{a}{b}$, $a,b\in\mathbb{N}$, and $GCD(a,b)=1$, then

$$5 = \dfrac{a^2}{b^2},$$ $$a^2 = 5b^2,$$

so $~~5|a^2$ $~~\Rightarrow~~$ $5|a$ $~~\Rightarrow~~$ $5|b^2$ $~~\Rightarrow~~$ $5|b$ $~~\Rightarrow~~$ $GCD(a,b)=5$. Contradiction.

– robjohn
Sep 9, 2014 at 0:52
• @robjohn, I deleted it, because thought that exactly the same (classic) proof is for $\sqrt{2}$, somewhere in Wiki or other widely known resources. Sep 9, 2014 at 7:51
• +1 It is a standard proof, but those are useful.
– robjohn
Sep 9, 2014 at 8:10
• @robjohn, thank you :) Sep 9, 2014 at 8:27
• Additional exercise: Show why this proof fails for $\sqrt4$, hint: somewhere in Greece, an old man found what was to be called the fundamental theorem of arithmetic. Sep 9, 2014 at 17:13

You are correct, a rational number is one that can be expressed in the form $m/n$, where $m,n$ are integers (and $n\ne0$ - also we usually assume they have no common factors).

So 1.5 is a rational number because it can be expressed as 3/2.

Indeed, any finite decimal can be expressed in the form $m/n$ (think about what 0.123 means). Some infinite decimals can too, eg 0.333...

But $\sqrt5$ cannot. There is a standard proof for that. Are you familiar with it?

5 is a prime. Suppose we had $\sqrt5=\frac{a}{b}$. We can take out any common factors, so that $a,b$ are relatively prime. Then $a^2=5b^2$. But that implies that 5 divides $a^2$. Since 5 is prime, it must also divide $a$. Suppose $a=5c$. But now we can divide through by 5 to get $5c^2=b^2$. So exactly the same argument shows that $b$ is divisible by 5. Contradiction.
• Because it can also be expressed as 1/3. You might think that an infinite decimal cannot be a rational number, but it can. 0.333... means $\frac{3}{10}+\frac{3}{10^2}+\frac{3}{10^3}+\dots$ and that infinite series can easily be summed to give 1/3. Sep 8, 2014 at 13:26
• Yes. Note that it only works for a prime. So $\sqrt{n}$ is irrational if for some prime $p$, the highest power of $p$ dividing $n$ is an odd power. So $45=3^25$. The three is irrelevant, but the 5 makes $\sqrt{45}$ irrational. Sep 8, 2014 at 13:41
• You missed a $ to close off your MathJaX at$n\ne0$Sep 8, 2014 at 19:07 A rational has to be able to be shown as a fraction with integers on the numerator and denominator. Some decimals can be written as fractions (examples below)$3=\frac{3}{1}1.5=\frac{3}{2}1.66666...=\frac{5}{3}$The problem arises in the fact that$\sqrt {45} =3 \sqrt{5}$and$3$is rational, but$\sqrt{5}$can't be written in any fraction with integers on the top and bottom. It cant actually be written as a decimal, as you wrote, it isnt equal to 6.708, its close to 6.708, and there is no write-able decimal that it is equal to. Now,$\sqrt{45} \approx 6.708$. Can someone explain why this not rational? Is it about decimal points? Your answer to this is below:$\sqrt{45}$is not rational because it cannot be expressed in the form$\frac{p}{q}$, where$p$and$q$are integers. This also means it can’t be expressed in decimal form with terminating or repeating digits.$\frac{3}{2}$qualifies as a rational number right? Yes. It is in the form$\frac{p}{q}$, and$3$is an integer and$2$is an integer. But, in decimal form,$\frac{3}{2}$is$1.5$which has decimals. I thought integers don't have decimals, so 1.5 shouldn't be a rational number! The problem here is that an integer is not the same thing as a rational number.$\frac{3}{2}$is rational because it’s written in the form$\frac{p}{q}$, and both the$p$and the$q$are integers ($3$and$2$). We’re not saying that$\frac{3}{2}$is an integer. We’re saying that the numerator and the denominator are integers, making$\frac{3}{2}$rational. All integers are rational—but not all rational numbers are integers.$3$is an integer and$2$is an integer. So$\frac{3}{2}\$ is rational but it happens not to be an integer.