# Prove that if $n$ is not the square of a natural number, then $\sqrt{n}$ is irrational. [duplicate]

Possible Duplicate:
$\sqrt a$ is either an integer or an irrational number.

I have this homework problem that I can't seem to be able to figure out:

Prove: If $n\in\mathbb{N}$ is not the square of some other $m\in\mathbb{N}$, then $\sqrt{n}$ must be irrational.

I know that a number being irrational means that it cannot be written in the form $\displaystyle\frac{a}{b}: a, b\in\mathbb{N}$ $b\neq0$ (in this case, ordinarily it'd be $a\in\mathbb{Z}$, $b\in\mathbb{Z}\setminus\{0\}$) but how would I go about proving this? Would a proof by contradiction work here?

Thanks!!

-

2
– copper.hat Aug 31 '12 at 4:54

## marked as duplicate by copper.hat, Sasha, sdcvvc, Andres Caicedo, The Chaz 2.0Aug 31 '12 at 6:16

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

## 3 Answers

Let $n$ be a positive integer such that there is no $m$ such that $n = m^2$. Suppose $\sqrt{n}$ is rational. Then there exists $p$ and $q$ with no common factor (beside 1) such that

$\sqrt{n} = \frac{p}{q}$

Then

$n = \frac{p^2}{q^2}$.

However, $n$ is an positive integer and $p$ and $q$ have no common factors beside $1$. So $q = 1$. This gives that

$n = p^2$

Contradiction since it was assumed that $n \neq m^2$ for any $m$.

-
Oh, I see. We basically use the fact that $n$ must be an integer to draw that the denominator must be 1. Got it, thank you very much! I got up until then and couldn't progress further, but this makes it clear! – roboguy12 Aug 31 '12 at 4:57

2
It is important to explicitly mention that the proof uses unique factorization (or Euclid's Lemma) to deduce that $q = 1$. This can fail in rings lacking such properties. – Gone Aug 31 '12 at 5:07

This can also be done with the rational root test: consider the polynomial equation $$x^2 - n = 0$$

and suppose that it has a rational root. Then, this rational root must be an (integer) factor of $n$. So, if $\sqrt{n}$ is rational, then there exists $t\in \mathbb{N}$ (since $x^2 - n$ is an even function of $x$, we may assume, without loss of generality, that $t>0$) with $t \vert n$ such that $$t^2 - n = 0$$ which is to say $$n = t^2$$ and hence $n$ is the square of a natural number.

In fact, this argument generalizes to showing that if $\sqrt[m]{n}$ is rational, then $n$ is an $m^{th}$ power.

-

Here’s an explanation that I find clearer, and that uses unique factorization explicitly: If a positive number $n$ is not the square of any integer, then when you write it as a product of primes, at least one prime shows up to an odd power. Let one such prime be $p$, and look at the supposed equation $\sqrt{n}=a/b$, with $a$ and $b$ positive integers. This gives $n=a^2/b^2$, hence $nb^2=a^2$. How many times does $p$ show up in the factorization of the left side and of the right? Oddly many times on the left, evenly many on the right. Contradiction to the unique factorization of $nb^2$.

-
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 48, "mathjax_display_tex": 3, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9539137482643127, "perplexity_flag": "head"}