Sets with the same cardinality generates isomorphic free modules. Let $R$ be a ring with 1.
Prove: If $A$ and $B$ have the same cardinality, then the free module generated by $A$ and $B$ are isomorphic, $F(A) \cong F(B)$.
Here is what I have done:  
$|A| = |B| \implies \exists \text{ bijection }\phi:A\rightarrow B$
Then make a new function $\Phi : A \rightarrow F(B)$ such that $\phi (a) = \Phi (a)\ \forall a \in A$ 
By the universal property, there is an R-module homomorphism $\psi:F(A) \rightarrow F(B)$ such that $\psi(a) = \Phi(a) \forall a \in A$
Surjectivity:
$\forall b \in F(B), b = \sum^n_{i=1}r_ib_i,\ r_i \in R,\ b_i \in B, \ i = 1,..., n $
Then $b = \sum^n_{i=1}r_i\phi(a_i) = \sum^n_{i=1}r_i\psi(a_i) = \psi(\sum^n_{i=1}r_ia_i)$
I am stuck on the proof for injectivity. I don't see why $ker(\psi)$ has to be trivial. Please help.
 A: Everything goes far smoother by considering the covariant functor:
$$A^{(\bullet)}: \mathbf{Ens} \to A\text{-}\mathbf{Mod} \\ X \mapsto A^{(X)} \\ f \mapsto A^{(f)}$$
where $\mathbf{Ens}$ denotes the category of sets and for arbitrary $f: X \to Y$ we denoted by $A^{(f)}$ the unique $A$-linear map induced via the universality property of free modules, in other words the unique one satisfying the relation 
$$A^{(f)} \circ \iota_X = \iota_Y \circ f$$
where $\iota_X$ represents the canonical injection of $X$ into the free module $A^{(X)}$ constructed over $X$.
Functors always associate isomorphisms of the target category (in your case isomorphisms of $A$-modules) to isomorphims of the source category (which in your case are bijections between sets), so with this set-up you are done in a hurry.   
As an addendum to the above, there is an even more general valid statement:
$$f\ \text{injective (surjective)} \Longleftrightarrow A^{(f)}\ \text{injective (surjective)}$$ 
A: One way to complete what you are doing is to also consider the map going the other way.
Let $\phi\colon A\to B$ be the bijection. Then $\phi$ induces a module morphism $\Phi\colon F(A)\to F(B)$. Similarly, $\phi^{-1}$ induces a module morphism $\Psi\colon F(B)\to F(A)$.
Now consider the map $A\to F(A)$ given by $\phi^{-1}\circ\phi =\mathrm{id}$. This should induce the unique map $\mathrm{id}\colon F(A)\to F(A)$. But it also induces the map $\Psi\circ\Phi$. By the uniqueness clause of the universal property, you get that $\Psi\circ\Phi = \mathrm{id}_{F(A)}$. 
Symmetrically, by considering the corresponding map $B\to F(B)$ that factors as $F(B)\to F(A)\to F(B)$ via $\Phi\circ\Psi$, you get that $\Phi\circ\Psi = \mathrm{id}_{F(B)}$. This proves that both $\Phi$ and $\Psi$ are isomorphisms, and inverses of each other. 
