Show that every fraction whose square root is rational takes the form $kp^2/kq^2$.
What i've done:
We're given that $$\sqrt{\frac{a}{b}}=\frac{p}{q}$$ Take $p/q$ as a fraction in lowest terms,then by squaring we get (assuming that $a,b$ $>0$): $$\frac{a}{b}=\frac{p^2}{q^2}$$ Since $p^2/q^2$ is also a fraction in lowest terms( since if we had $p^2/ q^2 =xs/xt$ we would have a contradiction about $p/q$ being in lowest terms),we have that every other fraction,say $c/d$, which is equal to $\sqrt{a/b}$ must be of the form $kp^2/kq^2$ .
Question: Is this valid as a proof,if not where does it fail ?If you can provide also other proofs about the proof in question i'd appreciate.
P.S: i apologize if my latex syntax isn't really appropriate.