Let $n$ be an integer. Show that $\sqrt{n}$ is rational if and only if $n$ is a perfect square (i.e., the square of an integer).
How would I do this proof. In a simple manner.
If n is perfect square then the square root n is a rational number.
So if n is a perfect square there is a integer m such that $m(m)=n^2$
So then I guess I can do the logik from contrapostive.
If square root of n is irrational then not n is perfect square.
But how could I prove this?