# Proof by counterexample

If $$n$$ is prime, then $$\sqrt{n}$$ is irrational. Prove this statement.

If I were to prove this using proof by contradiction, I would do:

Suppose $$n$$ is prime and $$\sqrt{n}$$ is rational. Let $$\sqrt{n}=\frac{a}{b}$$ where $$a,b\in \mathbb{R}$$ and have no common factor other than 1.

And then I would go on and get a contradiction like $$a$$ is even and $$b$$ is even.

However, I was wondering if I could also use proof by counterexample:

($$n$$ is prime) $$\Rightarrow$$ ($$\sqrt{n}$$ is irrational)

The negation of this statement is:

($$n$$ is prime) $$\land$$ ($$\sqrt{n}$$ is rational)

A counter example to this is $$n=2$$.

Therefore, this statement is disproved and hence, its negation is proven to be true.

Is this also a valid proof?

• Hope my answer below clarifies it. Mar 5, 2021 at 19:10

The claim is in plain text

"For every prime $$n$$, $$\sqrt{n}$$ is irrational."

The negation is in plain text

"There is some prime $$n$$, such that $$\sqrt{n}$$ is rational."

This is not a statement about all primes, but only about some prime. Therefore we cannot disprove it by a single counterexample.

To see the flaw : Assume $$\sqrt{5}$$ would be rational. Then the statement would be false since $$5$$ is prime, but $$\sqrt{5}$$ would not be irrational. You see, that the case $$n=2$$ is not enough.

• The main point is that I forgot about "For every prime" becoming "There is some prime" in its negation. Thank you for pointing that out. Mar 5, 2021 at 19:19