I feel like this cannot be proven. Am I setting up the contrapositive correctly?

221 Views Asked by At

The question ask:

Use proof by contrapositive to show that if a positive integer is the product of  two distinct primes, then its square root is irrational.

So I have not(q) -> not(p) as follows:

If the square root of a positive integer is rational then it is not the product of two distinct primes.

One issue I have is I think I have already found a counter example that goes against this.

Lets say the positive integer was 36.

The Square root of 36 is 6, which is rational.

The prime factorization for 36 would be. 2 * 2 * 3 * 3.

Which would mean it has 2 distinct primes of 2 and 3.

Did I go somewhere wrong with my setup of the contrapositive or my understanding of what 2 distinct primes means?

Thanks in advance.