# Example: Examples of Magmas, Semigroups, and Monoids

(related to Chapter: Magmas, Semigroups, Monoids (Overview))

### Examples of magmas.

• The set $\mathbb N$ together with the power operation $(n,m)\to n^m$ is not associative and it has only a left-neutral element.
• The set of rational numbers with the operation of building arithmetic mean $(p,q)\to \frac 12(p+q)$ is not associative and it has no neutral element.
• All of the below examples (a magma is more general than a semigroup).

### Examples of semigroups.

• On the set $M_{n\times n}(\mathbb R)$ of $n\times n$ square matrices with real coefficients, we can define a binary operation $\ast$ by $(A,B)\to A\ast B:=AB + BA$, where $A$ and $B$ are matrices in $M_{n\times n}(\mathbb R)$ and $AB$ and $BA$ denote the matrix multiplication.1 The operation "$\ast$" is not associative for $n\ge 2$ and the semigroup has no neutral element.
• All of the below examples (a semigroup is more general than a monoid).

### Examples of monoids.

Thank you to the contributors under CC BY-SA 4.0!

Github:

### References

#### Bibliography

1. Lang, Serge: "Algebra - Graduate Texts in Mathematics", Springer, 2002, 3rd Edition
2. Fischer, Gerd: "Lehrbuch der Algebra", Springer Spektrum, 2017, 4th Edition

#### Footnotes

1. We will define the concept of a "matrix" and its multiplication later when we will be studying the linear algebra.