The primary reference I'm using for basic algebra is Mac Lane/Birchoff's Algebra, 3rd Edition. In this text, on page 175, a free module is defined as follows:
Let $X$ be a subset of an $R$-module $F$ and $i:X \longrightarrow F$ the canonical injection of $X$ into $F$. Then, $R$ is called a free module on $X$ when to every function $f:X\longrightarrow A$ to an $R$-module $A$ there is exactly one linear map $t:F\longrightarrow A$ such that $t \circ i = f$
Now, I have encountered another definition frequently that doesn't appear to be equivalent It is:
A free module $F$ on a set $X$ is an $R$-module $F$ and a map $i:X\longrightarrow F$ such that for any $R$-module $A$ and any map $f:X\longrightarrow A$ there is a unique linear map $t:F \longrightarrow A$ such that $t \circ i = f$
This particular definition comes from page 151 of Paul Garrett's notes on abstract algebra available from his website. The obvious difference is that in Garrett's version, the set $X$ is not required to be a subset of $F$ and the function $i$ is not the inclusion but, seemingly, any function.
So, my questions:
Which is the preferred/more common definition?
I believe that Garrett's definition includes M&B's definition as a special case; is this so?
Other than generality, is there any advantage of Garrett's definition over M&B's?