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
    And the $\cdot$ is a function composition?2011-12-19
  • 2
    Hm... what is abelian groups? And why would I write a $+$? That would make no sense for like multiplication function. I only used plus as an example for some integers... (Sorry I'm a programmer not mathematician).2011-12-19
  • 0
    Hm.. yeah wikipedia definition is much better: http://en.wikipedia.org/wiki/Monoid#Definition2011-12-19
  • 0
    Hi @drozzy: No, the $\cdot$ is not a function decomposition, it denotes the group operation. An example of a group where the group operation is denoted in a multiplicative way would be the reals together with multiplication: $G = (\mathbb{R}, \cdot)$.2011-12-19
  • 0
    An example of a group where you'd denote the operation using additive notation $+$ would be $G = (\mathbb{Z}, +)$. A group is like a monoid with one additional requirement: the requirement that every element must have an inverse i.e. for every $g \in G$ you can find a $-g$ (note that I'm using additive notation here) such that $g + (-g) = e = (-g) + g$.2011-12-19
  • 0
    (cont'd) where $e$ denotes the identity element of the group. In $\mathbb{Z}$ $e$ would be $0$ and in $\mathbb{R}$ $e$ would be $1$.2011-12-19
  • 0
    @drozzy Hope this helps, otherwise don't hesitate to ask for more explanation.2011-12-19
  • 0
    Group sounds simple! Cool. But what do you mean by "decomposition" - I sad "composition"...2011-12-19
  • 0
    @Matt: $(\mathbb R, \cdot)$ is not a group, you have to exclude 02011-12-19
  • 0
    @sdcvvc True! Thanks for pointing it out.2011-12-19
  • 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
    "Sum instance of Monoid" interesting. Do you have a link to docs by any chance? I tried looking but couldn't find a mention of monoid in Sum docs.2011-12-19
  • 0
    You couldn't? Funny that, `instance Num a => Monoid (Sum a)` (from the [`Data.Monoid` page](http://haskell.org/ghc/docs/7.0-latest/html/libraries/base-4.3.1.0/Data-Monoid.html)). For more on monads in Haskell, it's good to consider the [LYAH](http://learnyouahaskell.com/functors-applicative-functors-and-monoids#monoids) chapter on them.2011-12-20
  • 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