There have been various previous questions about cogroup objects on MSE and MathOverflow, mainly focussing on why various examples are indeed cogroup objects (e.g. spheres are cogroup objects in the category $\text{hTop}_\bullet$ of pointed topological spaces up to homotopy, abelian groups are cogroup objects in the category of groups etc.). None have focused on intuitively what cogroups are.
When we think about groups, one natural way of thinking about the definition is that it kind of axiomatises the symmetries of some object. This on its own has various facets:
- You can use this to directly come up with heuristic justifications for the axioms and why extra axioms aren't necessary (e.g. symmetries don't in general commute, so groups shouldn't in general commute).
- It suggests that there should be a meaningful interplay between a group $G$'s structure and its group actions or $G$-sets (which is of course very much true).
- It can even be partially encoded as a theorem, i.e. Cayley's Theorem showing that every group is specifically a permutation group.
What is an analogous perspective on cogroups? There are many aspects I find mysterious... To name a couple:
- I struggle to understand what on earth the unary operation $C\to C\sqcup C$ on a cogroup $C$ could represent. It takes an element... to something in the coproduct of $C$ with itself? So a little like the disjoint union of $C$ with itself?! What then does coassociativity of this operation really mean?!
- The only cogroup object in the category $\text{Set}$ is the empty set! At least in the case of groups, group objects in $\text{Set}$ recover the original actual notion of groups...
Ideally an answer will provide a nice conceptual basis on which to understand cogroups as described above.
I think that for any question of the form "how should I think of X intuitively", its hard not to write a long rambly, blog post of an answer. Anyways, I'll try to keep this based on concrete examples. A good way to understand cogroups is in the context of how they relate to other coalgebraic structures, and how the dual algebraic structures relate to each other. A good example to look at is categories and cocategories. There are simple examples of each and categories have rich relations to other algebraic objects that allows us to see how tinkering with something out the coalgebraic side affects things on the algebraic side. For a longer discussion, you can look for resources on internal categories and cocategories.
I'll give an abridged definition of a cocategory. Fix an ambient category $C$ with pushouts. For now we'll think of a cocategory in $C$ like a directed interval that is equipped with a notion of gluing two copies of itself tip to tail. More explicitly, a cocategory in $C$ consists of two objects $c_0$ and $c_1$, which we think of as the point object and the arrow object, respectively. These come equipped with maps $\delta_0 , \delta_1 : c_0 \to c_1$, which correspond to the inclusions of the point to the ends of the arrow. Then the push out
$$ c_1 \xleftarrow{\delta_1} c_0 \xrightarrow {\delta_0} c_1 $$
is two copies of $c_1$ glued to each other codomain to domain. A cocategory comes equipped with a ``cocomposition'' map $c_1 \to c_1 \sqcup_{c_0} c_1$. This corresponds to an arrow in the pushout with the domain of the left arrow and codomain of the right arrow. So it goes all the way across both copies of the original arrow. There is other structure required that I won't mention here.
An example of a cocategory can be found in $\mathsf{Cat}$. It is given by the categories ${\bf 1}$ and ${\bf 2}$ with the natural inclusions ${\bf 1} \to {\bf 2}$. The cocomposition map is the map ${\bf 2} \to {\bf 3}$ that sends the arrow in ${\bf 2}$ to the composite arrow in ${\bf 3}$. If we drop the cocomposition map from the definition, we basically have a 1-truncated cosimplical object. So there is a sense in which a cocategory is a geometric gadget that records a (possibly directed) interval with a notion of gluing two copies of it together in a way that results in another arrow.
To relate this back to categories in $\mathsf{Set}$, we can use this any cocategory to define an ordinary category. Suppose $c_0$ and $c_1$ are a cocategory as above and fix $x$ in $C$. We define the set of arrows to be $C(c_1,x)$. Then can define precomposition by the inclusions $\delta_0^\ast , \delta_1^\star : C(c_1 , x) \to C(c_0 , x)$ to be the domain and codomain functions. We can show that composable arrows are naturally equivalent to maps out of $c_1 \sqcup_{c_0} c_1$, so precomposition with comultilpication gives a function from composable arrows to arrows.
We can put restrictions on our cocategory structure to obtain related coalgebraic structures. If the point object $c_0$ is initial in $C$, then the arrow has a unique point and is thus a (directed) loop. This is defines something called a comonoid. There is a natural comonoid structure on the "directed circle" (a category freely generated by a single loop) in the category of pointed categories. A comonoid naturally gives rise to an algebraic structure by precomposing with the comonoid structure. In this case, maps out of $c_1 \sqcup_{c_0} c_1$ are equivalent to pairs of maps out of $c_1$. Thus every arrow is composable, so we indeed return the notion of a monoid.
We can also ask that the arrow $c_1$ can be "turned around". This gives rise to a cogroupoid. Sometimes these are also called interval objects since they behave like undirected intervals. An important examples is the topological interval $[0,1]$ in the homotopy category. The algebraic structure induced by precomposition with this cogroupoid is the fundamental groupoid of a space. Another example is the walking isomorpism category $I$. We can define the underlying groupoid, or core of a category, using the cogroupoid $I$.
If we require both that $c_0$ is initial and $c_1$ can be turned around, then we get the concept of a cogroup. The most fundamental examples of cogroups are the spheres $S^n$. The cogroup structure on $S^n$ has a structure map $S^n \to S^n \lor S^n$, which corresponds to going around the left copy, then going around the right copy. Up to homotopy, this forms a cogroup. Precomposing by this cogroup structure is the definition the algebraic notion of homotopy group $\pi_n$.
Of course this is just a heuristic. Formally speaking, every cogroup is a group. And others have already mentioned algebraic notions of cogroups in the comments. I just think these are good motivating examples. I have a half lucid thought relating this to the some nlab article. But I won't ramble here...