Source: Geometric Group Theory: An Introduction, Clara Löh, but is a standard exercise.
Problem: Let be a set. Then, up to isomorphism, there is at most one group freely generated by .
Proof: Let and be groups with free generating set . Let and be the inclusion maps from into and respectively. By the universal property of free groups, there are unique homomorphisms and such that for all , . Hence and are homomorphisms which fix . Using the universal property again, there is a unique homomorphism from to itself which fixes – the identity map. Hence, because of uniqueness, is the identity map. An analogous argument shows that is the identity map, and therefore is an isomorphism.
Commutative diagram showing the above, with curly arrows
denoting inclusion in the usual places in universal property diagrams