let $(G, \cdot)=(\mathbb{Q}^x, \cdot) = (\{\frac{p}{q}\mid\frac{p}{q} \neq 0\}, \cdot)$ and $\varphi: G \to G$ where $\varphi$ interchanges 2,3 in the prime power factorization and $\varphi$ is the identity mapping for all rational numbers such that their numerator and denominator are relatively prime to 2 and 3 i.g. $\varphi(3^22^4)=2^23^4$ Prove $\varphi$ is a group homomorphism
let $\alpha, \beta \in G$ where they have the prime factorizations $\alpha = 2^{k_1}3^{l_1}t$ and $\beta = 2^{k_2}3^{l_2}r$ where $t,r$ are relatively prime to 2 and 3. Further, $k_i, l_j \in \mathbb{Z}$.
now,
$\varphi(\alpha\beta)=\varphi(2^{k_1}3^{l_1}t \cdot 2^{k_2}3^{l_2}r) = \varphi(2^{k_1+k_2}3^{l_1+l_2}tr) = 2^{l_1+l_2}3^{k_1+k_2}tr = 2^{l_1}3^{k_1}t \cdot 2^{l_2}3^{k_2}r = \varphi(\alpha)\cdot\varphi(\beta)$
so clearly it is a homomorphism. and herein lies my question. If I were to do $\varphi$ again I return to the original elements $\alpha, \beta$ in other words $\alpha = \varphi(\varphi(\alpha))$ so it is it's own inverse. And prime factorization is unique up to the order of the factors so clearly this would be bijective. is it sufficient to conclude from this that is is an automorphism and thus an isomorphism, or is it necessary to show injective and surjective ?
Jason in his comment has completely answered your specific question. I'd like to say that if you stick to positive rationals, unique factorization theorem can be interpreted as: $\mathbf{Q_{>0}^*}$ is a free abelian group on the set of prime numbers. Your map $\varphi$ is simply a permutation(actually a transposition) of two basis elements and so leads to a unique automorphism of that group. All rationals is a direct product of positive rationals with a cyclic group of order 2, and there is no difficulty in extending this as an automorphism.