# Is this a valid proof? If $a$ and $b$ are rational, $a^b$ is rational.

1st: I took the contrapositive. If $a^b$ is irrational, then a and b are irrational.

2nd: I found an example to disprove my contrapositive. Let $a = 2$ Let $b = 1/2$ Both are rational.

$a^b = 2^{(1/2)} = \sqrt{2}$, which is irrational.

It's too difficult to do html formatting on my phone, so I apologize in advance. Thanks.

• I fixed your formatting and made it in MathJax format. – Yash Jain Jan 28 '18 at 4:04
• You have an error in taking the contrapositive: Not ($a$ and $b$ are rational) = ($a$ is irrational) or ($b$ is irrational). But in fact, your counterexample works directly without bothering with the contrapositive. – Joffan Jan 28 '18 at 4:09
• Similar question (although no exactly same). – user 170039 Jan 28 '18 at 6:44

Technically, your proof is fine. You showed that for all a and b are rational numbers, a^b is not always rational, by counterexample. Unless you're going to prove the statement by contraposition, finding the contrapositive is unnecessary. Just for future reference, the contrapositive of "if a and b then d", is "if ~d then ~a or ~b" (this is due to DeMorgan's Law).

Your counter example is completely valid way to prove that your statement is false.

Forall rational $a,b$, $a^b$ is also rational

We will say that $\lnot=$ the negative, so the negative of the statement is:

$\lnot($Forall rational $a,b$, $a^b$ is also rational$)$

By DeMorgan's Law:

exists rational $a,b$, $\lnot(a^b$ is also rational$)$

The negative of rational is irrational so we left with

exists rational $a,b$, $a^b$ is irrational.

So a counter example proves the negative of the statement, i.e disprove the statement