# Prove that $\sqrt p$ is irrational for all prime $p$

Woah! What the hell happened to me, I’m all *serif* and *academic* ! … huh.

Well anyway, today I thought it’d be fun to share this little proof, plus try to pull off the TeX look just for the hell of it! :p

I’m going to slow this off using proof by contradiction, by the way.

*Proof*

Assume that $\sqrt p$ is rational - that is $\sqrt p = \frac a b$, where $a$ and $b$ are coprime integers.

*Author’s note:* coprime means that they do not share any common factors.

It is a sensible part of the definition of rational, as it enforces that rational numbers should be given in their simplest form, which should be simple-ish to do for all true rational numbers.

No rational number must *necessarily* have coprime numerator and denominator.

### If $a$ divides by $p$:

$a$ is of the form $kp, k\in\mathbb Z$

$a^2=(kp)^2=k^2 p^2$$pb^2=k^2 p^2$$b^2=k^2 p$For this to be true, $b^2$ must divide by $p$, $\therefore b$ must divide by $p$.

This would mean that $a$, $b$ share factor $p$, so are not coprime! ↯

### If $a$ does not divide by $p$:

$a$ is of the form $kp+n, k\in\mathbb Z, n$ does not divide by $p$.

$pb^2 = (kp+n)^2 = k^2 p^2 + 2nkp + n^2$$b^2 = k^2 p + 2nk + \frac{n^2} p$$n$ does not divide by $p \therefore n^2$ does not divide by $p$.

$\therefore \frac{n^2} p$ is not an integer, $\therefore b^2$ is not an integer, $\therefore b$ is not an integer! ↯

### Conclusion

$a$ cannot divide by $p$, but also cannot *not* divide by $p$.

This is impossible, so $\sqrt p$ cannot be rational!

$\therefore \sqrt p$ is irrational for all prime $p$ $\square$

So, uh, back to normal!

That was a proof that I managed to find earlier after a lot of playing, and I was very pleasantly surprised with how the second half pretty much just fell into place once I had the first half sorted.

This was very fun to think about and devise, hopefully its not too dense / different to what people were maybe expecting me to post about!

Seems I’m drifting from tech and stuff towards math…

Anywho, hope to cya back here soon!

— Yellowsink