# Square Root of Prime is Irrational

## Theorem

The square root of a prime number is irrational.

## Proof 1

Let $p$ be prime.

Aiming for a contradiction, suppose that $\sqrt p$ is rational.

Then there exist natural numbers $m$ and $n$ such that:

\(\ds \sqrt p\) | \(=\) | \(\ds \frac m n\) | ||||||||||||

\(\ds \leadsto \ \ \) | \(\ds p\) | \(=\) | \(\ds \frac {m^2} {n^2}\) | |||||||||||

\(\ds \leadsto \ \ \) | \(\ds n^2 p\) | \(=\) | \(\ds m^2\) |

Any prime in the prime factorizations of $n^2$ and $m^2$ must occur an even number of times because they are squares.

Thus, $p$ must occur in the prime factorization of $n^2 p$ an odd number of times.

Therefore, $p$ occurs as a factor of $m^2$ an odd number of times, a contradiction.

So $\sqrt p$ must be irrational.

$\blacksquare$

## Proof 2

Let $p \in \Z$ be a prime number.

Consider the polynomial:

- $\map P x = x^2 - p$

over the ring of polynomials $\Q \sqbrk X$ over the rational numbers.

From Difference of Two Squares:

- $x^2 - p = \paren {x + \sqrt p} \paren {x - \sqrt p}$

Because $p$ is prime, $\sqrt p$ is not an integer.

From Polynomial which is Irreducible over Integers is Irreducible over Rationals it follows that $\paren {x + \sqrt p}$ and $\paren {x - \sqrt p}$ do not have rational coefficients.

That is:

- $\sqrt p$ is not rational.

Hence the result.

$\blacksquare$

## Also see

- The special case of $p = 2$ is a well-known mathematical proof.