If $A$ and $B$ are groups then prove that $A\times B\cong B\times A$ My approach
If $f(a,b)$ where $a\in A$ and $b\in B$ be the transformation from $A\times B$ to $B\times A$ then $f(a,b)=(b, a)$. I proved homorphism like this 
$f((a, b) +(a', b'))=f((a+a',b+b'))=(b+b',a+a')$ .
$f(a,b)+f(a',b')=(b+b',a+a')$ . 
Is this correct or should I prove that 
$f((a, b). (a', b'))=f(a,b).f(a',b')$ . How do I prove onto and one one aren't those very trivial and how do I write the proof? 
 A: Yes, the idea is good.
You take a function $f:A\times B\to B\times A$, $(a,b)\mapsto (b,a)$.
Then you proof that this defines a homomorphism, as you have done it.
Now we need to check if it is bijective.
The easiest way is to give the inverse function $f^{-1}$.
What should this function be? 
The existence of an inverse function implies the bijection.
A: As @Cornman answered you done, just prove 1-1, by showing inverse function is well defined and is homomorphism too. Or show it is onto and has kernel $\{0\}$.
As @CliveNewstead commented, there is no difference between $+$ and $.$ that both shows binary operation. I think you confused by ring! In rings they are two differents binary operations that homomorphisms must satisfy both relation you wrote, and no one implies the other.
A: Your work is correct.
To prove injectiveness, there are two things you could do:


*

*Set theoretic way. If $f(a,b) = f(a',b')$, is $(a,b) = (a',b')$?

*Group theoretic way. Calculate the kernel, i.e. find all $(a,b)$ such that $f(a,b) = (e_B,e_A)$, where $e$'s are the corresponding units of $A$ and $B$. If $\ker f = \{(e_A,e_B)\}$, then $f$ is injective.


To prove surjectiveness, do it as usual. For all $(b',a')\in B\times A$, is there some $(a,b)\in A\times B$ such that $f(a,b) = (b',a')$?
Or you could do it in one go if you can find $f^{-1}$. What could it be? Just a side note, you don't have to prove that $f^{-1}$ is a homomorphism if you know that $f$ is. Inverse of a group homomorphism is always homomorphism. It's a good exercise, try it!
