Definition of the quotient $G/H$ my question concerns the definition of the quotient $G/H$ in the sense of category theory. The following definition was obtained from the lecture notes linked to at the end of the question(p.2)

Def. Let G be a group, and let S be a subset. The quotient of G by S is a group homomorphism $$q: G \rightarrow Q$$ such that $S \subset \mathrm{Ker}(q)$ which is universal amongst all such group homomorphism. That is, suppose that $$\phi : G \rightarrow G'$$ is a group homomorphism, such that $S \subset \mathrm{Ker}(\phi)$. Then there is a unique group homomorphism $\Psi: Q \rightarrow G'$ which makes the following diagram commute.


I am having trouble understanding what role $S$ is playing and why this definition makes sense. Thanks in advance.
http://www.math.ucsb.edu/~mckernan/Teaching/05-06/Autumn/220A/l_4.pdf
 A: Short answer: If you are going to be quotienting, you need to quotient by something.  In this case, $S$ is that something.  A reformulation of the universal property of the quotient map $G\to G/S$ is that if $\varphi:G\to G'$ is a map such that $\varphi(s)=e$ for every $s\in S$, then $\varphi$ descends to a map $G/S\to G'$.  With this definition of quotient, $G/S$ is actually $G/N(S)$, where $N(S)$ is the smallest normal subgroup to contain $S$.
This makes sense because every surjective homomorphism $G\to G'$ is a quotient map $G\to G/H$ where $H$ is the kernel of the map, and so if we are going to have a quotient map that vanishes on $S$, it should vanish on a normal subgroup containing $S$.  Since the intersection of normal subgroups is normal, there is a smallest normal subgroup, and so we can explicitly construct the categorical quotient in terms of things we know.  (This is an important point, because in category theory, you can "define" things via a universal property, which will define it uniquely if it exists, but you need something else to tell you that the object exists.
Long answer:  To understand the categorical perspective, it is useful to generalize slightly.
First, we note that the category of groups has a zero object, $0:=\{e\}$, which means that it is initial and terminal (for any group $G$, there is a unique map $G\to 0$ and a unique map $0\to G$).  This gives us that between any two groups $G,H$, there is a unique zero map, given by the composition $G\to 0 \to H$.  In this particular case, the zero map is the group homomorphism sending everything to the identity.
Next, we have the notion of an coequallizer.  Given two maps $f,g:X\to Y$, the coequallizer is an object $Z$ and a map $q:Y\to Z$ such that $qf=qg$, and such that, if $q':Y\to Z'$ is any other map such that $q'f=q'g$, $q'$ factors through $q$.
If we have a category with a zero object, the cokernel of a map $f$ is the coequallizer of $f$ and the zero map.  In our particular case, if $H$ is a subgroup of $G$, we have that $G/H$ is the cokernel of the inclusion map.
So there are a few things at play here, if we want to think about things categorically.  
First, we want to quotient out by morphisms, not subsets (in fact, from a categorical perspective, we don't really have subsets of group, just monomorphisms from one group into another, and a "subgroup" is an equivalence class of monomorphisms.  The details of this can be skipped on a first reading, except for the fact that subgroups are replaced by the corresponding inclusion maps).  
Second, everything is replaced by saying that there are morphisms making certain diagrams commute.  Universality is defined in terms of the existence of a unique map making a diagram commute.  A subgroup being in the kernel is defined in terms of a commutative diagram.
I find this more general perspective helps clear up what works in more generality and what we have simplified in our particular case.  The wonderful thing about the categorical perspective is the fact that it does generalize, and so you can borrow your intuition from one category to understand another.
A: First of all, we notice that this definition is compatible with the familiar one when $S = H$ is a normal subgroup, in this case $Q = G/H$ and $q$ is just the projection form $G$ to $G/H$.
The way we define a quotient group above uses what we call in category theory, the universal property. You can find in literatures that many objects in mathematics are constructed similarly by universal property (e.g. tensor algebras, covering spaces, free groups...).
In various branches of mathematics, a useful construction is often viewed as the “most efficient solution” to a certain problem. The definition of a universal property uses the language of category theory to make this notion precise and to study it abstractly. By understanding their abstract properties, one obtains information about all these constructions and can avoid repeating the same analysis for each individual instance.
So back to your question, at first glance at your definition above, we can start by regarding $S$ as a normal subgroup of $G$. Since more generally, the "quotient" of $G$ by any subset $S$ satisfies the same universal property defined above, we can generalize this definition without any problems (In fact, it is just the quotient of $G$ by the normal subgroup generated by $S$).
A: To make sense of the definition from category theory, you need to check that the definition of quotient from set theory is universal.
It is better to work with a normal subgroup $N$ instead of a subset $S$. Let $q$ be the quotient map of $G/N$, then $q$ is surjective, $ker(q)=N$.
Take $\phi$ such that $ker(q)\subseteq ker(\phi)$. Make a function $\psi$, for every $x\in Q$ choose $\psi(x)$ to be an image along $\phi$ of a preimage along $q$ of $x$ (which exists because $q$ is surjective).
$ker(q)\subseteq ker(\psi)$, then $\forall(g_0\in G)(g_1\in G). q(g_0)=q(g_1)\to \phi(g_0)=\phi(g_1)$, i.e. $\psi$ is well-defined.
Using the above and routine work prove that:


*

*your diagram commutes;

*$\forall\psi'. \psi'\circ q=\phi \to \psi'=\psi$ , i.e. $\psi$ is unique such that your diagram commutes;

*$\psi$ is a homomorphism.


In summary, $\forall\phi. ker(q)\subseteq ker(\phi) \to \exists!\psi. \psi\circ q=\phi$, i.e. $q$ is universal.
To prove the converse, i.e. that every universal object is isomorphic to $q$, use the theorem of pure category theory that says that every 2 universal objects are isomorphic by the unique isomorphism.
You can adapt this proof for other algebraic structures, instead of kernels take congruences.
