# Contrapositive of“If $h \in \mathbb Q$ then $\exists a,b \in \mathbb Z$ such that $h=\frac{a}{b}$”

I think the contrapositive of "If $h \in \mathbb Q$ then $\exists a,b \in \mathbb Z$ such that $h=\frac{a}{b}$" is "If $\nexists a,b \in \mathbb Z$ such that $h=\frac{a}{b}$ then $h \notin \mathbb Q$. But I'm not sure if I'm correct because I know that the statement "If $h \notin \mathbb Q$ then $\nexists a,b \in \mathbb Z$ such that $h=\frac{a}{b}$" is true which makes me think that my answer isn't correct.

• Correct; the contrapositive of "if $P$, then $Q$" is "if not-$Q$, then not-$P$". – Mauro ALLEGRANZA Oct 16 '17 at 13:11
• And the "natural language" version makes sense: if $h$ is rational, then we can express it as the ratio of two integers. – Mauro ALLEGRANZA Oct 16 '17 at 13:12
• @MauroALLEGRANZA Thanks! – Hai Oct 16 '17 at 13:13