2
$\begingroup$

Looking at the definition of a monoid it says that:

A monoid is a set that is closed under an associative binary operation and has an identity element $I \in S$ such that for all $a \in S$, $I a = a I =a$

But what does $I a$ mean here? I mean it's just one element from the set, followed by a space and another element of the set. Is it assumed that this means binary function of some sort?

I mean when I write $0+x$, I don't write $0\ x$...

Thanks, any help in understanding this is appreciated.

  • 5
    MathWorld at it again, there should not be a space. And they really should have given the operation a name, such as $\ast$. It can be omitted later.2011-12-19

3 Answers 3

6

I'd say what is confusing about the definition above is that it doesn't make clear that the binary operation is part of the monoid - it only asserts the existence of the operation on the set. For example, the above definition would make $\mathbb N$ a monoid because there exists an associative binary operation blah blah blah. But there are many such associative binary operations on $\mathbb N$.

It should really say, "A monoid is a pair $(M,\star)$ where $M$ is a set and $\star$ is an associative binary operation $\star:M\times M\rightarrow M$, such that there exists an $i\in M$ statisfying $i\star m = m\star i = m$ for all $m\in M$.

In particular, when the definition above says: $Ia=aI=a$, that is shorthand for the operation $I\star a = a\star I = a$.

Oh, and the only reason we tend to write monoids in a "multiplicative form," rather than more like addition, is that addition, in almost all instances, is commutative: $a+b=b+a$. But multiplication in many instances is not - for instance, matrix multiplication is not commutative. So we usually think of the monoid operation as being "like" multiplication.

3

It doesn't matter whether you use additive notation "$+$" or multiplicative notation "$\cdot$" to denote the group (or in this case: monoid) operation. The notation $Ia$ really is the lazy version of of writing $I \cdot a$.

But you could equally well write $I + a$. See for example here for notational conventions for abelian groups.

  • 0
    @drozzy That was a typo. Here is the corrected version: No, the $\cdot$ does not denote function composition, it denotes the group operation. An example of a group where the group operation is denoted in a multiplicative way would be the reals without zero together with multiplication: $G = (\mathbb{R} \setminus \{ 0 \}, \cdot)$. Note that you have to exclude $0$ because it doesn't have an inverse and so $G$ would not be a group. For the monoid case it doesn't matter, $M = (\mathbb{R},\cdot)$ is a monoid.2011-12-19
0

Perhaps it's helpful to look at some usual examples.

  • The set of natural numbers including $0$, together with addition, forms a monoid: the binary operation is $\lambda (a,b).a\!+\!b$ and the identity element is $0$, for $a+0 = 0+a = a.$ In Haskell, this translates to the Sum instance of Monoid with mempty = Sum 0 and mappend a b = Sum (getSum a + getSum b).
  • The same set, with multiplication as the relation and $1$ as the identity. Here, it is common in mathematics to just omit the multiplication sign, $ a\cdot 1 = 1\cdot a = 1a = a. $ In Haskell, mempty = Product 1 and mappend a b = Product (getProduct a * getProduct b).
  • The set of matrices on e.g. $\mathbb{R}^2$ together with matrix multiplication. Here, the identity is $(\begin{smallmatrix}1&0\\0&1\end{smallmatrix})$, $ (\begin{smallmatrix}1&0\\0&1\end{smallmatrix})\cdot (\begin{smallmatrix}a&b\\c&d\end{smallmatrix}) = (\begin{smallmatrix}a&b\\c&d\end{smallmatrix})\cdot(\begin{smallmatrix}1&0\\0&1\end{smallmatrix}) = (\begin{smallmatrix}a&b\\c&d\end{smallmatrix}) $
  • The set of lists of letters together with list concatenation. The identity is the empty list. That one's rather a bit un-mathematic, I shall again omit excplicitly writing the binary operator or the "promotion" of characters to single-element lists and write it this way: {{}''}\mathrm{Word} = \mathrm{Word}'' = \mathrm{Word} (and also = \mathrm{W{{}''}ord} = \mathrm{Wor{{}''}d} = \mathrm{{{}''}Wo{{}''}r{{}''}{{}''}{{}''}{{}''}d}.) In Haskell, it's the more general [] instance of Monoid, with mempty=[] (that is, for strings, mempty="") and mappend a b = a++b.
  • 0
    Oh I thought a "type" that was a monoid would have to define the _operator_ and the _identity_ element. That's why I didn't identify it in the docs. P.S.: yeah, I'm already reading the LYAH book presently :-)2011-12-20