I would like to know whether I have proved this statement correctly using contradiction and if not get some tips or pointers on how to improve it/make it correct.
We are asked to prove that there are infinitely $n \in \mathbb{Z^+}$ such that $\sqrt{n}$ is irrational.
Proof: $$\text{We assume, to the contrary, that there are infinitely many } n \text{ } (n \in Z^+) \text{ such that } \sqrt{n} \text{ is rational.} \\\text{Then, } \sqrt{n}=\frac{a}{b} \text{, } n=\frac{a^2}{b^2} \text{ where } a \text{ and } b \text{ are integers and } \frac{a}{b} \text{ has been reduced to lowest terms.} \\\text{Hence, } a^2=nb^2 \text{ and } b^2=\frac{1}{n}a^2\\\text{We know if } n\mid a^2 \text{ then } n\mid a \text{. It follows that } a=nk, k\in\mathbb{Z} \\ b^2=\frac{1}{n}(nk)^2=nk^2 \text{ and thus } n\mid b^2 \text{ and thus } n \mid b \\ \text{Hence, } n = \frac{nb^2}{nk^2} \\ \text{This is a contradiction given that we have assumed }a \text{ and } b \text{ to be reduced to lowest terms. }\blacksquare$$ ps. This isn't homework. Answers are in the back of my book but I want to improve.