Using Goursat's lemma for groups, a simple representation and the invariant factor decompositions of the subgroups of the group Z m × Z n are deduced, where m and n are arbitrary positive integers. As consequences, explicit formulas for the total number of subgroups, the number of subgroups with a given invariant factor decomposition, and the number of subgroups of a given order are obtained.