I was thinking about the following problem:
Suppose that $G_1 \cong G_2$ are isomorphic groups. Under what conditions on the groups $H_1,H_2$ will we have $$G_1 \times H_1 \cong G_2 \times H_2 ?$$
Obviously, in the finite case we must have $|H_1|=|H_2|$. Also, it is easy to see that $H_1 \cong H_2$ is sufficient. Is it necessary as well?
Thank you!
The Krull-Schmidt theorem implies that if $G_1 \times H_1$ and $G_2 \times H_2$ have both chain conditions and can be written as finite direct products of indecomposable groups (these conditions hold true in particular when the groups are finite), then $G_1 \times H_1$ and $G_2 \times H_2$ are isomorphic if and only if the union of the multisets of isomorphism types of the indecomposable factors of $G_1$ and $H_1$ is equal to the union of the multisets of isomorphism types of the indecomposable factors of $G_2$ and $H_2$. (This is equivalent to the statement that $H_1 \cong H_2$.) An analogous statement holds for larger direct products as well.
I cannot comment on the other answer since I am new here and have low reputation, but I am not convinced that the multiset of irreducible characters is enough to recover the isomorphism class of a finite group. If you disagree, please provide a reference.