I was aware that homomorphism/isomorphism is order-preserving (i.e. $\phi: G \to H$ is an isomorphism $\implies$ ord(g) = ord($\phi(g))$, $\forall g \in G$), but I was not sure whether the converse holds (for finite groups):
Let G, H be groups.
If ord(G) = ord(H), and $\forall$ g $\in$ G, $\exists$ (or $\exists!$) h $\in$ H s.t. ord(g) = ord(h).
(And vise versa, $\forall$ h $\in$ H, $\exists$ (or $\exists!$) g $\in$ G s.t. ord(g) = ord(h).)
Does this imply that G $\cong$ H please?
If not, what will be a counterexample please?
More rigorously, suppose $f: H \to G$ is a bijection s.t. ord(f(x)) = ord(x), $\forall$ x $\in$ G.
Does this imply that f an isomorphism please?
I think it doesn't hold for infinite groups, but for finite groups, I was struggling to either find a direct proof or a counterexample.
I have tried constructing counterexamples by taking the direct product of some non-abelian & non-cyclic groups of lower order, but didn't quite work out.
An example which I considered is $Z_3 \times Z_3 \times Z_3$ and G = <x, y, z> modulo $x^3=y^3=z^3$; yz = zyx; xy = yx; xz= zx
Many thanks in advance!