Prove that the group isomorphism $\mathbb{Z}^m \cong \mathbb{Z}^n$ implies that $m = n$ 
Let $m$ and $n$ be two nonnegative integers. Assume that there is a group isomorphism $\mathbb{Z}^m \cong \mathbb{Z}^n$. Prove that $m = n$.

I tried using a contrapositive, ($m \neq n$ implies $\mathbb{Z}^m \ncong \mathbb{Z}^n$), and I think the problem is that there won't be a homomorphism, but did not get anywhere. Is there a better approach to this problem?
 A: You can prove it in the same way that you prove that the dimension of a vector space is well-defined.
Suppose that $m\le n$ and $h:\Bbb Z^m\to\Bbb Z^n$ is an isomorphism. For $k=1,\dots,m$ let $e_k$ be the element $\langle a_1,\dots,a_m\rangle$ such that $a_k=1$ and $a_i=0$ for $i\ne k$. Note for any $\langle a_1,\dots,a_m\rangle\in\Bbb Z^m$,
$$\langle a_1,\dots,a_m\rangle=\sum_{k=1}^ma_ke_k\;,$$
and this representation is unique: if
$$\sum_{k=1}^ma_ke_k=\sum_{k=1}^mb_ke_k\;,$$ then $$\sum_{k=1}^m(a_k-b_k)e_k=\langle \underbrace{0,\dots,0}_m\rangle\;,$$ and therefore $a_1=b_1,\dots,a_m=b_m$. In other words, $\{e_1,\dots,e_m\}$ behaves very much like a basis for a vector space.
Now show that $\{h(e_1),\dots,h(e_n)\}$ behaves like a basis for $\Bbb Z^n$: each $z\in\Bbb Z^n$ can be written uniquely in the form $$z=\sum_{k=1}^ma_kh(e_k)$$ for some integers $a_k$, $k=1,\dots,m$. 
Now get a contradiction when $n>m$ by considering the elements of $\Bbb Z^n$ that are analogous to the $e_k\in\Bbb Z^m$.
A: Highfalutin approach: Suppose we have an isomorphism $f : \Bbb{Z}^m \stackrel{\simeq}{\longrightarrow} \Bbb{Z}^n$. Then we recall that a module over a PID is flat iff it is torsion-free. Considering $\Bbb{Q}$ as an abelian group, it will now follow that the functor $- \otimes_{\Bbb{Z}} \Bbb{Q}$ is an exact functor and so 
$$f \otimes 1 : \Bbb{Z}^m \otimes_{\Bbb{Z}} \Bbb{Q} \to \Bbb{Z}^n \otimes_{\Bbb{Z}} \Bbb{Q}$$
is injective. It is also clearly surjective and hence is an isomorphism. Using the fact that


*

*Tensor products commute with direct sums

*For any $R$ - module $M$ we have a canonical isomorphism $R \otimes_R M\cong M$ which on elementary tensors sends $r \otimes m \to rm$
we conclude that $f \otimes 1$ is an isomorphism between $\Bbb{Q}^m$ and $\Bbb{Q}^n$ and rank - nullity now gives that $m = n$.
More concrete approach:
Let us try to understand via elementary methods why there can be no isomorphism between say $\Bbb{Z}^3$ and $\Bbb{Z}^2$. Suppose there were some isomorphism $f : \Bbb{Z}^2 \to \Bbb{Z}^3$. Then if $x_1,x_2,x_3$ are the canonical basis generators for $\Bbb{Z}^3$ and $y_1,y_2$ that of $\Bbb{Z}^2$ we can find integers $a_{11},a_{12},a_{21},a_{22},a_{31},a_{32}$ such that
$$\sum_{j=1}^2 a_{ij}y_j = x_i$$
for $1 \leq j \leq 3$. More concretely, this means that given any triple $(a,b,c)$ we can find integers $d,e$ such that 
$$\begin{pmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \\ a_{31} & a_{32} \end{pmatrix} \begin{pmatrix} d \\ e \end{pmatrix} = \begin{pmatrix} a \\ b \\ c \end{pmatrix}.$$
Now from elementary row reduction when working over a field we know that this is not going to be possible simply because the number of pivots is only going to be $\leq 2$ and not $3$. But what if we work over the integers? I will now show using a concrete example that we can always get the last row to be zero. This will then give a contradiction because the matrix applied to no pair $(d,e)$ of integers will ever be equal to 
$$\begin{pmatrix} 0 \\ 0 \\ 1\end{pmatrix}.$$
Now for a concrete example. Suppose you take the matrix 
$$\begin{pmatrix} 7  & 6 \\ 5 & 12 \\ 4  & 1 \end{pmatrix}.$$
Let $R_1$ mean row $1$, $R_2$ row $2$ and so on. Then if we do $7R_3 - 4R_1$ and $7R_2 - 5R_1$ we get the matrix
$$\begin{pmatrix} 7  & 6 \\ 0 & 54 \\ 0  & -17 \end{pmatrix}.$$
But now if we do $54R_3 + 17R_2$ the last row will be zero and you get your desired contradiction.
From this concrete example do you see now why there can never be an isomorphism between $\Bbb{Z}^2$ and $\Bbb{Z}^3$. More generally do you see why there can never be an isomorphism between $\Bbb{Z}^m$ and $\Bbb{Z}^n$ for $m\neq n$?
A: Embed $\Bbb Z$ in $\Bbb Q$ and thereby $\Bbb Z^n$ in $\Bbb Q^n$. Now clearly $\Bbb Z^n$ has an $n$-tuple of elements that are linearly independent over $\Bbb Z$ (the standard basis will do as an example), and it does not have any $(n+1)$-tuple that is linearly independent over $\Bbb Z$, since already $\Bbb Q^n$ doesn't admit any $(n+1)$-tuple that is linearly independent over $\Bbb Q$, let alone over $\Bbb Z$. Then you can recover the $n$ in $A\cong\Bbb Z^n$ as the maximum number of linearly independent elements over $\Bbb Z$ one can find in the free Abelian group $A$. Thus $\Bbb Z^m\cong\Bbb Z^n$ implies $m=n$.
A: Once again, I'll give you the outline, you fill in the details.
Suppose that $\mathbb{Z}^m\cong\mathbb{Z}^n$. Then, you see that $\mathbb{Z}^m\otimes_{\mathbb{Z}}\mathbb{Z}_2\cong\mathbb{Z}^n\otimes_{\mathbb{Z}}\mathbb{Z}_2$, which tells you that $\mathbb{Z}_2^m\cong\mathbb{Z}_2^n$, and so $2^m=2^n$--thus $m=n$.
EDIT: Since you don't know tensor products, perhaps this will be more understandable. If $\mathbb{Z}^m\cong\mathbb{Z}^n$, then $\text{Hom}_\mathbb{Z}(\mathbb{Z}^m,\mathbb{Q})\cong\text{Hom}_\mathbb{Z}(\mathbb{Z}^n,\mathbb{Q})$ as $\mathbb{Q}$-vector spaces. But, you can prove that as $\mathbb{Q}$-vector spaces one has that $\text{Hom}_\mathbb{Z}(\mathbb{Z}^k,\mathbb{Q})\cong\mathbb{Q}^k$, and so we have $\mathbb{Q}^m\cong\mathbb{Q}^n$, from where normal vector space theory tells us that $m=n$.
EDIT EDIT: You seemed to only take issue with the previous proof because of the vector spaces. In patticular,you seemed ok with the Hom manipulation. Here's a way to combine the first and the previous proof! Show first that $\text{Hom}(\mathbb{Z}^k,A)\cong A^k$ for any abelian group A. Then apply this fact to show that our problem implies $\mathbb{Z}_2^m\cong\mathbb{Z}_2^n$ again.
A: Let $G=\mathbb{Z}^n$ and $H=\mathbb{Z}^m$. Then $G/2G = (\mathbb{Z}/2\mathbb{Z})^n$. In particular, $|G/2G| = 2^n$. By a similar argument $|H/2H| = 2^m$. If they are isomorphic then $2^n = 2^m$. 
A: Suppose $m\neq n$,
$$\Bbb Z^m\cong\langle x_1,\dots, x_m\mid \{x_ix_j=x_jx_i: i,j\in\{1,\dots m\}\}\rangle,$$
and
$$\Bbb Z^n\cong\langle y_1,\dots, y_n\mid \{y_ry_s=y_sy_r: r,s\in\{1,\dots n\}\}\rangle.$$
In each presentation, kill $z^2$ for each element $z$. Then we get, by abelianness,
$$G:=\Bbb Z^m/\langle \{x_i^2:i\in\{1,\dots, m\} \rangle \cong\langle x_1,\dots, x_m\mid \{x_ix_j=x_jx_i: i,j\in\{1,\dots m\}\}\cup\{x_i^2: i\in\{1,\dots, m\}\}\rangle$$
and
$$H:=\Bbb Z^n/\langle \{y_r^2:r\in\{1,\dots, n\} \rangle \cong\langle y_1,\dots, y_n\mid \{y_ry_s=y_sy_r: i,j\in\{1,\dots n\}\}\cup\{y_r^2: r\in\{1,\dots, n\}\}\rangle.$$
But then
$$G\cong\Bbb Z_2^m\not\cong \Bbb Z_2^n\cong H$$
by this standard result, since $m\neq n$; but we did the same thing to each presentation and yet we got different results. Thus
$$\Bbb Z^m\not\cong\Bbb Z^n.$$
This is the contrapositive of the result in question, so we are done.
