Is there a simple proof of the fact that if free groups $F(S)$ and $F(S')$ are isomorphic, then $\operatorname{card}(S)=\operatorname{card}(S')?$ [duplicate]

Theorem. If $F(S)$ and $F(S')$ are isomorphic free groups with bases $S$ and $S'$ respectively, then $\operatorname{card}(S)=\operatorname{card}(S').$

I know a proof of this fact that uses the abelianizations of the groups. It seems a bit random to me. Is there a proof that uses only basic properties of free groups? Perhaps it would be less vague to put it this way: is there a proof that a student could possibly find who has just read the definition of a free group as a set of words over an alphabet and knows that it can also be seen as a group with a certain universal property?

I will be glad to accept an upvoted answer saying that no such proof is known. (And therefore doesn't exist.)


I would like to convince you that the proof by abelianization is perfectly natural. To me, a major guiding principle of mathematics is

If a problem looks hard, try to reduce it to linear algebra, which is easy.

Now, if two free groups are isomorphic then their abelianizations, the corresponding free abelian groups, must also be isomorphic, and as free $\mathbb{Z}$-modules, we know that the study of free abelian groups comes pretty close to linear algebra. In fact, by tensoring with $\mathbb{Q}$ (or with $\mathbb{F}_p$ for any prime $p$ as observed in the comments) we can reduce completely to linear algebra, since two $\mathbb{Q}$-vector spaces which are isomorphic must have bases of the same cardinality.

More generally, abelian groups are in many ways easier to study than nonabelian groups, so a good way to get a handle on an arbitrary group in general is to study its abelianization. For example, the abelianization of a fundamental group $\pi_1(X)$ is a homology group $H_1(X)$. Similarly, the most accessible part of the representation theory of a group $G$ is its $1$-dimensional representations, which correspond to representations of its abelianization. This basic but fundamental observation is, among other things, the appropriate context in which to view class field theory.

As another concrete example of how much easier it is to work with abelian groups, it is undecidable whether two presentations of two groups determine isomorphic groups. However, if the presentations are finite, then it is decidable whether their abelianizations are isomorphic because one can simply run a constructive proof of the structure theorem. Thus an easy way to tell that two presentations of two groups don't determine isomorphic groups is to apply the structure theorem to their abelianizations.


Jonas and Arturo both also make very good points in the comments about using the universal property. I would summarize their comments as

Free groups on sets of different cardinalities must be nonisomorphic because they have different universal properties.

There are lots of ways to see this, for example by observing that $\text{Hom}(F(S), \mathbb{Z}/2\mathbb{Z})$ is a vector space of dimension $|S|$. This is in particular a very short way to prove that two free groups on distinct finite sets must be non-isomorphic since one does not even need to know any linear algebra and can get away with just computing the cardinality of the Hom set.

However, as Arturo also cautions in the comments, this intuition can be misleading. Taken too far it suggests, incorrectly, that every ring has the invariant basis number (IBN) property.