For all integers $n$ and $q$, prove that if the square root of $n$ is rational then the square root of $n^q$ is rational.
Having some troubles figuring out the proper logic behind this.
For all integers $n$ and $q$, prove that if the square root of $n$ is rational then the square root of $n^q$ is rational.
Having some troubles figuring out the proper logic behind this.
Hint: $\sqrt{n^q} = \left(\sqrt{n}\right)^q$
Edit: as JMoravitz noted, this implicitly uses the fact that $\sqrt{n}$ is assumed to rational, which restricts the values to $n\geq 0$.
If the square root of $n$ is rational then there exists $a,b \in \mathbb N$ such that $$ n^{1/2} = \frac{a}{b} \Rightarrow n^{q/2} = \frac{a^q}{b^q} .$$
Then, since $a^q,b^q \in \mathbb N$, it follows that $n^{q/2}$ is rational.
Rephrasing, if n is a ratio of perfect squares n^q would be a ratio of perfect squares. The proof follows trivially.