The question is about the example (from here):
Example 5.1.31 In Categories of algebras such as $\mathbf{Grp}$, $\mathbf{Vect}_k$, $\mathbf{Ring}$, etc., it is also true that the monic maps are exactly the injections. Again, it is easy to show that the injections are monic. For the converse, take $A = F(1)$, where $F$ is the free functor (Examples 2.1.3).
It appears to me from the proof of the fact that injections are monic that this fact is true for any category whose objects are sets (possibly with some additional structure). [If objects are sets (possibly with some structure) then the notion of injective morphism makes sense (the definition is the same as in $\mathbf {Set}$, as far as I understand.] Is that indeed the case? I would prefer avoiding notions like "concrete category" since I'm not very familiar with them.
First, as far as I understand, one can avoid the use of the term "free functor" by saying instead "take $A$ to be the free group/vector space/ring on a 1-element set". So I won't use the free functor terminology.
I think that the reason one should take $A$ to be the free group/vector space/ring on the one element set is that any homomrophism in the respective category $A\to G$ to any object $G$ of that category is uniquely determined by the image of the 'generating element' (which corresponds to the element of the singleton we started with).
In the free group, vector space, ring on 1-element set are, respectively, the cyclic group (is it true?), the 1-dimensional vector space, and the ring of polynomials over integers in one variable. And the homomorphisms out of these things are determined, respectively, by the image of the generator of the cyclic group, any element of the vector space, and the variable.
But what would go wrong if we took $A$ to be, for example, the group $\langle a,b\rangle$ instead of the free group on the one-element set? What is wrong with the following proof of the fact that monic $\implies $injective?
Suppose $\alpha: G\to H$ is monic. So for any hroup homomorphisms $f,g: A\to G$, $\alpha f=\alpha g$ implies $f=g$. Assume that $\alpha(x_1)=\alpha(x_2). $ Need to prove that $x_1=x_2$. Take $A=\langle a,b\rangle$ and $$f:A\to G \\a\mapsto x_1\\ b\mapsto \text{anything}$$ and $$g:A\to G\\a\to x_2\\b\mapsto\text{anything}$$ Since we have $$\alpha(f(x))=\alpha(g(x))\implies f(x)=g(x)$$ forall $x$, letting $x=a$ we get $x_1=x_2$.
- Is the reason why [ monic $\implies $ injective ] true in categories of algebras (but not in other categories whose objects are sets (possibly with some structure) - let's call their objects qwertis) that for the latter categories there is no notion of "free qwerty on a set"? What are some examples (without proof)? For example, I cannot recall hearing about "free topological space". Is there such a notion? Does the implication referred to above hold in $\mathbf {Top}$?
A category $\mathscr{C}$ is concrete if there is a faithful functor $\mathbf{U}\colon\mathscr{C}\to\mathscr{S}et$. You can think of this as telling you that the objects of $\mathscr{C}$ “are” sets and the arrows of $\mathscr{C}$ are set-theoretic functions on those sets. We think of $\mathbf{U}$ as the “underlying set” forgetful functor.
If $\mathscr{C}$ is concrete, and $f$ is a morphism that is injective on underlying sets, then $f$ is monic in $\mathscr{C}$. This follows because the faithfulness of the underlying set functor: if $fg = fh$, then $\mathbf{U}(f)\mathbf{U}(g) = \mathbf{U}(f)\mathbf{U}(h)$, and since $\mathbf{U}(f)$ is assumed to be injective it follows that $\mathbf{U}(g)=\mathbf{U}(h)$; the faithfulness of $\mathbf{U}$ now tells you that $g=h$, proving that $f$ is left cancellable, i.e. monic in $\mathscr{C}$.
However, it is not true that in concrete categories all monics have underlying injective function, as noted by Jim. It is not easy to come up with examples, because if a category has a free object on one element, then all monics are injective. And in most categories of algebras (in the sense of universal algebra: sets with operations) you have free objects in one element.
(A free object in one element is an object $F$ together with a distinguished element $a\in \mathbf{U}(F)$ such that for every object $X$ and every element $x\in \mathbf{U}(X)$ there is a unique morphism $f\colon F\to X$ such that $U(f)(a)=x$).
I’m not sure what you mean by $A=\langle a,b\rangle$. Perhaps you mean the free group in two elements? If so, your proof is essentially the same as using the free group in one element. But if it means some other group, then you need to justify that your $f$ is actually a group morphism. In general, you can’t define group morphisms by mapping generators to arbitrary elements... unless you are dealing with a free group and a free basis for that free group.
In general, if $\mathscr{C}$ is concrete, then if the underlying set functor has a left adjoint, then all monics are injective, and in general limits (in the categorical sense) are respected by $\mathbf{U}$; that’s why the underlying set of a product of groups is the product of the underlying sets of a group, the underlying set of an inverse limit is the inverse limit of the underlying sets, etc. And the same is true for abelian groups, rings, vector spaces, and topological spaces. If the underlying set functor has a right adjoint, then all epis are surjective, and more generally all colimits are respected by $\mathbf{U}$: so the underlying set of a coproduct is the disjoint union of the underlying set (the disjoint union being the coproduct in the category of sets); the underlying set of a coequalizer is the coequalizer of the underlying functions; the underlying set of a direct limit is the direct limit of the underlying sets; etc.
In most (but not all) categories of algebras, monics are injective because you usually (but not always) have free objects on one element (the free object construction is the left adjoint of the underlying set functor). In very few categories of algebras does the underlying set functor have a right adjoint; nonetheless, in some familiar categories epis are surjective anyway (category of all groups, of all abelian groups, of vector spaces). But in some familiar categories, they are not: in semigroups, the embedding $\mathbb{N}\hookrightarrow\mathbb{Z}$, and in rings, the embedding $\mathbb{Z}\hookrightarrow\mathbb{Q}$, are nonsurjective epimorphisms. Even in some nice categories of groups (some varieties) you may have nonsurjective epimorphisms.