I was given the question:
Prove that if $x$ is irrational, then $\frac1x$ is irrational
I did this through contraposition, namely:
if $\frac1x$ is rational, it can be written in the form $\frac ab$ where b is nonzero.
Thus, $\frac1x = \frac ab$ which gives $ x = \frac ba$, so $x$ is also rational, hereby indirectly proving that the original statement is true.
I couldn't find this proven in the way I did when looking for it on the internet, so where did I go wrong?