Presentation for the product of two cyclic groups I'm reading about generators and relations and an example that has come up is the following. Let $A$ and $B$ be two cyclic groups with generators $a$ (of order $j$) and $b$ (of order $k$), respectively. Their product $A\times B$ is generated by all products of the form $a^m b^n$ with relations
$$
a^j = 1 \qquad b^k = 1 \qquad ab = ba
$$
My question is how to understand the last relation, $ab = ba$. Should I think of this as coming from the isomorphism $A \times B \cong B \times A$, or is there a more fundamental reason for this relation?
 A: Suppose $a_1, a_2 \in A$ and $b_1, b_2 \in B$
The only way you can have $(a_1 b_1)(a_2 b_2) = (a_1 a_2)(b_1 b_2)$ is if $b_1 a_2 = a_2 b_1$
The book is really stating that $A$ and $B$ are subsets of a larger group, say $G$ (this is the only way "the produc $a^ub^v$"  can make sense) and that the mapping $A \times B \to AB$ defined by $(x,y) \to xy$ is an isomorphism. But then
$(a,b)(c,d) = (ac, bd)$ get sent into (ab)(cd) = (ac)(bd)$. Etcetera.
A: The final relation always holds in any direct product, of any two groups:

Let $G$ be the direct product of $A$ and $B$. Then for all $a\in A$, $b\in B$ we have $ab=ba$.

The fact that the two groups are cyclic is irrelevant. Remember that there are two ways of viewing direct products, internally and externally. Let's show this relation holds for both views.
Firstly, externally: Let $G=A\times B$, where $A$ and $B$ are arbitrary groups. Then for all $a\in A$, $b\in B$ we have $$(a, 1_B)(1_A, b)=(a,b)=(1_A, b)(a, 1_B)$$so the elements of the groups pairwise commute.
In terms of the internal direct product: let $G=AB$ with $A, B\lhd G$ and $A\cap B=\{1\}$, where $A$ and $B$ are arbitrary groups. Then for all $a\in A$, $b\in B$ we have that $a^{-1}b^{-1}ab=a^{-1}a_1$ for some $a_1\in A$, by normality of $A$. Similarly, $a^{-1}b^{-1}ab=b_1b$ for some $b_1\in B$. Therefore, $a^{-1}b^{-1}ab\in A\cap B$, and so $a^{-1}b^{-1}ab=1$. Hence, $ab=ba$ as required.
As the question specifically mentions presentations: this means that if $A$ has presentation $\langle \mathbf{x}\mid\mathbf{r}\rangle$ and $B$ has presentation $\langle \mathbf{y}\mid\mathbf{s}\rangle$ then the direct product $A\times B$ has presentation $$\langle \mathbf{x, y}\mid\mathbf{r, s}, xy=yx\:\forall x\in\mathbf{x}, y\in\mathbf{y}\rangle$$(we only need to stipulate that the generators commute; that the rest of the elements commute follows).
