# Thread: proof of all square roots of integers being either irrational or integers

1. ## proof of all square roots of integers being either irrational or integers

how do we prove that the square root of any integer is either irrational or an integer?

3. ## Re: proof of all square roots of integers being either irrational or integers

Originally Posted by professor25
how do we prove that the square root of any integer is either irrational or an integer?
Suppose that $p\in\mathbb{Z}^+$ and is not a square. For proof by contradiction suppose that $\sqrt{p}=\frac{a}{b}$ where each of $a~\&~b$ is a positive integer. That means $b\sqrt{p}=a\in\mathbb{Z}^+$ So let $T=\{n\in\mathbb{Z}^+:n\in\mathbb{Z}^+\}$ Because $b\in T$ then $T\ne\emptyset$. Every nonempty set of positive integers contains a least number (well ordering), call it $K$. Using properties of floor function let $H = \left\lfloor p \right\rfloor$ so that $p<\sqrt{p}-H<1$ (note the strict inequalities are due to the hypothesis that $p$ is not a square.) Multiply by $K$. $K\sqrt{p}-KH<H$

Can you see that $(K\sqrt{p}-KH)\in\mathbb{Z}^+\text{ and is }<K$.
Can you explain why $p(K\sqrt{p}-KH)\in\mathbb{Z}^+$.

Note that this is a much stronger result than you ask for.
It shows that every $\sqrt{n}$ is irrational if $n$ is a positive non-square integer.

4. ## Re: proof of all square roots of integers being either irrational or integers

P.S. EDIT let $\large{T=\{n\in\mathbb{Z}^+:n\sqrt{p}\in\mathbb{Z }^+\}}$

5. ## Re: proof of all square roots of integers being either irrational or integers

Proof by contradiction that the square root of any integer is an integer or irrational number: Suppose the square root of any non square number is a rational number. sqrt(n)=a/b, a,b are positive integers, b doesn't =0. nb^2=a^2. if b=1 then sqrt(n)=a which is a perfect square so b doesn't equal 1 and since sqrt(n)>1 then a>b>1
By the unique factorization of integers theorem every positive integer greater than 1 can be expressed as the product of its primes. a can be expressed as a product of primes and for every prime number factor in a each prime factor will be raised to any even number of primes in a^2. we can also express b as a product of primes and for every prime number in b each prime factor will be raised to any even number of primes in b^2. we can also express n as a product of primes and since n is not a square number there is at least one prime number that has an odd number of primes. therefore there exists at least one prime in the number nb^2 that has an odd number of primes.
since nb^2=a^2, then this contradicts the fact that the prime p occurs to odd power in the unique factorization of nb^2 but to even power in the unique factorization of a^2

I see that there is some prime in nb^2 which has an odd power while all the primes in a^2 are of even power which is a contradiction. the odd prime is from either the n term alone or if n has common primes with b^2 then the prime p will be of odd power

6. ## Re: proof of all square roots of integers being either irrational or integers

thank you!
I'm sorry I'm not seeing the left hand of the inequality p<sqrt{p}-H

7. ## Re: proof of all square roots of integers being either irrational or integers

Originally Posted by professor25
thank you!
I'm sorry I'm not seeing the left hand of the inequality p<sqrt{p}-H
I think we are having major problems with LaTeX. As is read that post there are several mistakes.
The idea is the $\left\lfloor a \right\rfloor \leqslant a < a + 1$ OR $0\le a-\left\lfloor a \right\rfloor < 1$
These are standard facts about the floor function(greatest integer).

Because $p$ is not a square then $\left\lfloor {\sqrt p } \right\rfloor \ne \sqrt p$ which means $0 < {\sqrt p }-\left\lfloor {\sqrt p } \right\rfloor < 1$

8. ## Re: proof of all square roots of integers being either irrational or integers

Originally Posted by professor25
thank you!
I'm sorry I'm not seeing the left hand of the inequality p<sqrt{p}-H
I think we are having major problems with LaTeX. As is read that post there are several mistakes.
The idea is the $\left\lfloor a \right\rfloor \leqslant a < a + 1$ OR $0\le a-\left\lfloor a \right\rfloor < 1$
These are standard facts about the floor function(greatest integer).

Because $p$ is not a square then $\left\lfloor {\sqrt p } \right\rfloor \ne \sqrt p$ which means $0 < {\sqrt p }-\left\lfloor {\sqrt p } \right\rfloor < 1$

Recall what $K$ is.. then explain $K{\sqrt p }-K\left\lfloor {\sqrt p } \right\rfloor < K$

You want to explain why $K{\sqrt p }-K\left\lfloor {\sqrt p } \right\rfloor$ is a positive integer.

You want to explain why $\left\lfloor {\sqrt p } \right\rfloor\cdot\left( K{\sqrt p }-K\left\lfloor {\sqrt p } \right\rfloor\right)$ is a positive integer.

In the reply I used $H=\left\lfloor {\sqrt p } \right\rfloor$ get around LaTex.

9. ## Re: proof of all square roots of integers being either irrational or integers

Thanks very much!
Since $0<{\sqrt p }-\left\lfloor {\sqrt p } \right\rfloor < 1$ then
$K{\sqrt p }-K\left\lfloor {\sqrt p } \right\rfloor < K$

but how are
$K{\sqrt p }-K\left\lfloor {\sqrt p } \right\rfloor$ and
$\left\lfloor {\sqrt p } \right\rfloor\cdot\left( K{\sqrt p }-K\left\lfloor {\sqrt p } \right\rfloor\right)$
integers since $0<{\sqrt p }-\left\lfloor {\sqrt p } \right\rfloor < 1$ is a non-integer between 0 and 1?
Do you mean that K is the lowest integer 1?

10. ## Re: proof of all square roots of integers being either irrational or integers

Originally Posted by professor25
I assume you mean that K is the lowest integer 1?
Let's use an example. Suppose $\sqrt{p} = \dfrac{1000000}{25000000}$
We know that $25000000 \in T$. But, is that the least element of $T$? Certainly not. This fraction reduces to $\dfrac{1}{25}$, and it just so happens that $K=25$ is the least element of $T$. 1 is NOT the least element of $T$ unless $\sqrt{p}$ is an integer.

11. ## Re: proof of all square roots of integers being either irrational or integers

Originally Posted by professor25
but how are
$K{\sqrt p }-K\left\lfloor {\sqrt p } \right\rfloor$ and
$\left\lfloor {\sqrt p } \right\rfloor\cdot\left( K{\sqrt p }-K\left\lfloor {\sqrt p } \right\rfloor\right)$
integers since $0<{\sqrt p }-\left\lfloor {\sqrt p } \right\rfloor < 1$ is a non-integer between 0 and 1?
$K\sqrt{p}$ is an integer because $K$ is the smallest element of $T = \{n \in \mathbb{Z}^+| n\sqrt{p} \in \mathbb{Z}^+\}$, which is the set of all positive integers such that the product with $\sqrt{p}$ is a positive integer. $K\lfloor \sqrt{p} \rfloor$ is the product of a positive integer with a nonnegative integer. The product of two integers is an integer. Finally, the difference of two integers is an integer. So since $K\sqrt{p}\in \mathbb{Z}$ and $K\lfloor \sqrt{p} \rfloor \in \mathbb{Z}$, we have $K\sqrt{p}-K\lfloor \sqrt{p} \rfloor$ is an integer.

Then, to see that $\sqrt{p}\left(K\sqrt{p} - K\lfloor \sqrt{p} \rfloor \right)$ is a positive integer, we have: $Kp - K\sqrt{p}\lfloor \sqrt{p} \rfloor$. Since $Kp$ is the product of two integers, it is an integer. Since $K\sqrt{p}$ is an integer because $K \in T$, then $(K\sqrt{p}) \lfloor \sqrt{p} \rfloor$ is the product of two integers, so it is an integer. And again, the difference of two integers is an integer.

But, since $L = \left(K\sqrt{p}-K\lfloor \sqrt{p} \rfloor\right)$ is a positive integer, and $L < K$ and $L\sqrt{p} \in \mathbb{Z}^+$, this contradicts our choice of $K$ as the smallest element of $T$. This contradiction means that the initial assumption (that $\sqrt{p}$ could be represented as $\dfrac{a}{b}$ for two positive integers $a,b$) is false. If $p$ is an integer that is not a perfect square, then its square root must be irrational.

12. ## Re: proof of all square roots of integers being either irrational or integers

Originally Posted by professor25
but how are
$K{\sqrt p }-K\left\lfloor {\sqrt p } \right\rfloor$ and
$\left\lfloor {\sqrt p } \right\rfloor\cdot\left( K{\sqrt p }-K\left\lfloor {\sqrt p } \right\rfloor\right)$
integers since $0<{\sqrt p }-\left\lfloor {\sqrt p } \right\rfloor < 1$ can be a non-integer between 0 and 1?
I assume you mean that K is the lowest integer 1?
I did say, recall what $K$ is. $K$ is the smallest positive integer such that $K\cdot\sqrt{p}$ is also a positive integer.
Being the smallest means $\left( {\forall j \in {\mathbb{Z}^ + }} \right)\left[ {j < K \Rightarrow j\cdot \sqrt{p}\notin {\mathbb{Z}^ + }} \right]$ (Do you see that $j$ is smaller than $K~?$)

NOW: $\bf{K\left\lfloor {\sqrt p } \right\rfloor ~\&~K\sqrt{p}}$ are positive integers (o.k. ?)
Clearly since $0<{\sqrt p }-\left\lfloor {\sqrt p } \right\rfloor < 1$ we have since $0<{K\sqrt p }-K\left\lfloor {\sqrt p } \right\rfloor < K$

SO ${K\sqrt p }-K\left\lfloor {\sqrt p } \right\rfloor$ is a positive integer less than $K$.
\begin{align*}\left({K\sqrt p }-K\left\lfloor {\sqrt p } \right\rfloor\right)\sqrt{p}&=Kp-(K\sqrt{p})\left\lfloor {\sqrt p } \right\rfloor\in\mathbb{Z}^+ \\ \end{align*}

13. ## Re: proof of all square roots of integers being either irrational or integers

yes thank you for the beautiful proof!!!!
is it really a stronger result, doesn't it just prove the non existence of (a/b)^2=p?

14. ## Re: proof of all square roots of integers being either irrational or integers

Originally Posted by professor25
is it really a strong result, doesn't it just prove the non existence of (a/b)^2=p?
It proves that for all $n \in \left(\mathbb{Z}^+ \setminus \{m^2 | m\in \mathbb{Z}\}\right)$, $\sqrt{n}$ is irrational. That is stronger than simply saying that the square root of any positive integer is either an integer or a rational number (how do you determine which it is)? This gives you a strict means to partition the positive integers into two sets, one whose square roots are all integers and the other whose square roots are all irrational.

15. ## Re: proof of all square roots of integers being either irrational or integers

Originally Posted by professor25
yes thank you for the beautiful proof!!!!
is it really a stronger result, doesn't it just prove the non existence of (a/b)^2=p?
If $q$ is a positive integer that is not a square, then $\sqrt{q}$ is irrational.
As such it is more inclusive than the existential positive: some P is Q, $\sqrt{2}$ is irrational.