# Is my proof that the square root of all imperfect squares are irrational correct?

I was answering a Quora question about whether $$\sqrt{13}$$ is irrational or not (link if needed), and I tried to prove that, in fact, the square root of all imperfect squares are irrational.

This is the first proof I have ever attempted, not knowing anything about them before-hand, and I barely know the mathematical symbols, never-mind how to properly set out a proof. So, keeping in mind that I am a complete newbie, can you tell me whether my proof is in fact correct or not, and if it isn't, where I went wrong and how I could improve it next time.

Also, if I chose the wrong symbol, please point out the where the mistake was and what the correct symbol would have been.

Start of Proof

Let's suppose that $$n \in \mathbb{N} = \mathbb{Z}^{+}$$ is not a perfect square.

This is going to be a proof by contradiction, so we are going to start out by assuming that $$\sqrt{n}$$ is indeed a rational number, that can be expressed in the irreducible fraction $$\frac{A}{B}$$ where $$A, B \in \mathbb{Z}^{+}$$ and $$B \neq 1 \because \iff B = 1, \sqrt{n} = A$$ which means $$n = A^{2}$$ which means $$n$$ is a perfect square.

$$\sqrt{n} = \frac{A}{B}$$

We can then square both sides to get:

$$n = \frac{A^{2}}{B^{2}}$$

Since $$\frac{A}{B}$$ is an irreducible fraction, $$A$$ and $$B$$ must not share any factors. When we square a number, we merely repeat its factors, therefore $$A^{2}$$ and $$B^{2}$$ must also not share any factors except $$1$$, making the fraction $$\frac{A^{2}}{B^{2}}$$ also irreducible.

Bacause it is irreducible, this means $$\frac{A^{2}}{B^{2}} \notin \mathbb{Z}^{+} \because B^{2} > B \forall B > 1$$ and $$B \in \mathbb{Z}^{+}$$ and $$B \neq 1$$.

Since $$n = \frac{A^{2}}{B^{2}}$$, this means that $$n \notin \mathbb{Z}^{+}$$ also.

$$\because n \notin \mathbb{Z}^{+}, \sqrt{n} \notin \mathbb{Z}^{+}, \sqrt{n} \neq \frac{A}{B}$$

As we had previously defined $$n$$ to be a positive integer, this is a contradiction. Therefore, our assumption that $$\sqrt{n}$$ could be expressed as the ratio of two integers was incorrect. Hence $$\sqrt{n}$$ is irrational $$\forall n \in \mathbb{N} = \mathbb{Z}^{+}$$ where $$n$$ is not a perfect square.

$$\mathbb{Q.E.D.}$$

End of Proof

Thanks for taking the time to read my proof. I would appreciate any and all feedback. As said, I am completely new at this so please show me where I went wrong and how to improve if I did in fact go wrong.

~Edits~:

• Changed the penultimate statement $$\because n \notin \mathbb{Z}^{+}, \sqrt{n} \notin \mathbb{Z}^{+}, n \neq \frac{A}{B}$$ by adding a radical to the last $$n$$ that was previously missing: $$\because n \notin \mathbb{Z}^{+}, \sqrt{n} \notin \mathbb{Z}^{+}, \sqrt{n} \neq \frac{A}{B}$$

• Added a concise contradiction as opposed to ending the proof by simply stating that $$\because n \notin \mathbb{Z}^{+}, \sqrt{n} \notin \mathbb{Z}^{+}, \sqrt{n} \neq \frac{A}{B}$$ without looping back to the opening when we defined $$n$$ as an integer.

• Further reinstated why $$\frac{A}{B} \notin \mathbb{Z}^{+}$$ by adding reasoning that $$\because B^{2} > B \forall B > 1$$ and $$B \in \mathbb{Z}^{+}$$ and $$B \neq 1$$, along with the fact that $$\frac{A^{2}}{B^{2}}$$ is irreducible.

Credit to Mathew Daly for helping me improve the summary.

• This is the first time I've ever heard of a number that is not a perfect square refered to as an "imperfect square". – fleablood Aug 21 '19 at 2:13
• I think there is circular logic in here, but if there is (and that is a big if) it will be tough to find. In any case, this is a lovely first post, correct or not. Welcome. – The Count Aug 21 '19 at 2:15
• It's not really circular so much as assuming much has been proven to make the proof unnecessary. We are assuming integers have unique factorizations and all rationals have a unique expression in lowest terms. Those are not trivial things to prove. But once they are proven this follows immediately. I think the OP argued well. – fleablood Aug 21 '19 at 2:20
• Indeed, after checking out the link I posted, I believe we have a correct, if unorthodox, proof. It might get some pushback from people who are used to such facts being proved in a certain way, but if you are totally new to this than this is extremely impressive, at least to me. – The Count Aug 21 '19 at 2:21
• It boils down to "When we square a number, we merely repeat its factors, therefore $A^2$ and $B^2$ must also not share any factors except 1". I think that needs to be more formally expressed. But it is correct. I had forgotten I had put an answer on the page. My answer was essentially the OP's proof but I specifically spelled out that any prime factor of $A$ must be a prime factor of $B$. But that's essentially the OP's argument. – fleablood Aug 21 '19 at 2:26

I will mention one (easily corrected) logical error and one stylistic piece of advice that could make the proof more readable. But the upshot is that this is a well-argued proof by any standard, and especially impressive for a first effort.

When you said that $$A^2$$ and $$B^2$$ share no factors aside from 1, that does not imply that $$\frac{A^2}{B^2}$$ is not an integer. You merely showed that it is a simplified rational number. That is an important step, but ultimately, you need to add that $$B^2\neq 1$$. As I said earlier, this is nearly trivial to address, since $$B^2>B$$ for all $$B>1$$. But it is worth addressing key points in proofs even if they are trivial.

Stylistically, I felt a bit let down when you hit the contradiction. It's kind of a climax of the proof, so you should feel free to emphasize it. More importantly, you want to specifically point out the contradiction and the original assumption that you now know to be false (as this is a proof that's long enough that we've likely forgotten the beginning by now). If I had written this, I might have ended it like this:

As we had previously defined $$n$$ to be a positive integer, this is a contradiction. Therefore, our assumption that $$\sqrt n$$ could be expressed as the ratio of two integers was incorrect. Hence $$\sqrt n$$ is irrational.

• Thanks for the feedback, I am pleased to hear that I did well for my first proof, I felt like I must have made a few large mistakes before I published it to here. I will definitely take note of the stylistic changes you have mentioned for any further proofs I do. Also, I get what you are saying about implicitly stating that $B^{2} > 1$, but is this needed been as I previously stated that $B \in \mathbb{Z}^{+}$ and $B \neq 1$? Wouldn't one naturally relate that $B^{2} > B \forall B > 1$ which means $B^{2} > 1$? – BenWornes Aug 21 '19 at 3:00
• It's a balancing act. You don't want to bore your audience, but you also don't want to suggest that you didn't consider important things. In this case, showing that a fraction isn't an integer has two steps -- showing that they don't have any non-trivial factors and showing that the denominator isn't zero. You put the right amount of effort in the first step in your proof, and you put the right amount of effort into the second step in what you just wrote in your comment. – Matthew Daly Aug 21 '19 at 3:16
• I see, thanks for taking the time to read and reply to my post! – BenWornes Aug 21 '19 at 3:29
• I hope that the edits I just made helped make the proof better, I took much thought from your answer, thanks. – BenWornes Aug 21 '19 at 4:38
• @Matthew The inference $B>1\,\Rightarrow\, B^2>1\,$ is much more trivial than $\,\gcd(A,B)=1\,\Rightarrow\, \gcd(A^2,B^2)=1.\,$ Justification of the former might be omitted, but the latter should never be omitted (at this level) since it employs deep properties of the integers (e.g. Fundamental Theorem of Arithmetic) that are often wrongly assumed to hold more generally than they do (or wrongly assumed not to need any justification) - see my answer. – Bill Dubuque Aug 21 '19 at 17:48

You may have the right idea, but for the proof to be complete and rigorous you need to more clearly justify the following crucial inference:

When we square a number, we merely repeat its factors, therefore $$A^2$$ and $$B^2$$ must also not share any factors".

As it stands, your justification "when we square a number, we merely repeat its factors" could be interpreted in a way that it is true in any number system (ring). But the result is not true that generally. Likely you have in mind an argument that uses more specific divisibility properties that hold true for integers, e.g. the fundamental theorem of arithmetic (existence and uniqueness of prime factorizations) or closely related properties such as Euclid's Lemma, gcd laws, etc. It is essential to explicitly mention such properties in order to obtain a well-founded argument.

But so little is said (e.g. not even any mention of primes) that there is no way for the reader to accurately judge the intent and correctness of the argument. It is quite common for beginners to wrongly believe that such properties are trivially true for all number systems, or to believe that a proof is (intuitively) "obvious" but then not know how to rigorously prove it when the gap is revealed.

Let's consider a simple counterexample - the Hilbert naturals $$\,\Bbb H = 1+4\,\Bbb N = 1,5,9,13,\ldots$$ Here $$\,3\not\in\Bbb H\,\Rightarrow\,\gcd(9,21)=1\,$$ but $$\,\gcd(9^2,21^2) = 9\gcd(9,49)=9\,$$ by $$\,9,49\in\Bbb H.\,$$ So your quoted claim fails here. You may find it instructive to study why it fails. Also unique prime factorization fails, e.g. two distinct $$\Bbb H\text{--prime}$$ factorizatioms$$\ 9\cdot 49 = 21^2$$ [arising from $$\,3^2 7^2 = (3\cdot 7)^2$$ in $$\Bbb N$$].

The level of detail that should be required in arguments like this is subjective and context dependent. In a first course in proofs an instructor may be most concerned with teaching general proof strategies so may gloss over tangents on number-theoretical intricacies. But in a course in number theory or algebra these intricacies are the heart of the matter. If one doesn't master them then one will soon be led astray in more general number systems (e.g. quadratic algebraic numbers) where some of the familiar properties of integers (like those above) no longer hold true. There empirical inference based upon integer arithmetical intuition may fail miserably. Instead we must rely on deductive inference based on fundamental divisibility properties and their logical relationships. One of the main goals of a course in elementary number theory is to abstract out these essential arithmetical properties so they can be applied correctly in more general number systems (e.g. the basic results thats for integral domains we have Euclidean $$\Rightarrow$$ PID $$\Rightarrow$$ UFD $$\Rightarrow$$ GCD $$\Rightarrow$$ Schreier, and no arrow reverses).

At first glance this may seem overkill for integers. But the need for such rigor and abstraction becomes clear when we leave the familiar domain of integers and enter arithmetical domains where intuition fails miserably. Indeed, lacking such rigorous foundations even eminent mathematicians made major mistakes in the past (e.g. some attempted proofs of FLT wrongly assumed without proof that some rings of algebraic integers had divisibility properties similar to integers).

These matters have been discussed here in the past, with varying degrees of success. You may find it of interest to read some prior discussions on such matters, e.g. here (beware that one mathematician deemed the thread to be terrifying!) But it does cover the essential points, and illustrates the innate difficulties involved in such subjective pedagogical discussions with a very diverse audience.