3 ms·
So it's more a generalization of Groups right ?
by agumonkey 10y ago
So it's more a generalization of Groups right ?
- stabbles 10y agoA monoid (weaker than group: doesn't need to have an inverse) is an example of a category, with a single object G (namely the underlying set) and a lot of arrows from G -> G. If you take the natural numbers N = {0, 1, ...} as a set and + as a binary operator forming a monoid (N, +, 0), then the arrows would correspond to (. + 0), (. + 1), (. + 2) etc. Here (. + 0) can be seen as the identity arrow, and composition of arrows (. + a) and (. + b) yields a new arrow (. + (a+b)).
- tel 10y agoThe category-like generalization of the group is the groupoid: all arrows are isomorphisms.
- ihm 10y agoYes, roughly. You can think about a category like a group which carries around "type parameters" to say which "elements" you can and can't multiply. Also, "elements" may not be invertible. For example, for each N, there is a group of invertible N by N matrices. If we want to allow non-square matrices too, we can bundle them up as a category: - The objects are the natural numbers - A map from N to M is an M row by N column matrix - We compose A : N -> M and B : M -> K by multiplying them as matrices to get BA : N -> K. The objects (i.e., the dimensions) are type checking which things we can and can't multiply
- jules 10y agoThere are two differences: 1) Groups have an inverse operation, categories don't. 2) You can compose any two elements in a group, whereas in a category the input and output types have to match up.