set of continuous functions from a topological space to itself with composition of functions forms a monoid with the identity function acting as the identity. More generally, the endomorphisms of any object of a category form a monoid under composition. The product of faces of an arrangement of hyperplanes. Basic concepts Identity and zero A left identity of a semigroup (or more generally, magma) is an element such that for all in , . Similarly, a right identity is an element such that for all in , . Left and right identities are both called one-sided identities. A semigroup may have one or more left identities but no right identity, and vice versa. A two-sided identity (or just identity) is an element that is both a left and right identity. Semigroups with a two-sided identity are called monoids. A semigroup may have at most one two-sided identity. If a semigroup has a two-sided identity, then the two-sided identity is the only one-sided identity in the semigroup. If a semigroup has both a left identity and a right identity, then it has a two-sided identity (which is therefore the unique one-sided identity). A semigroup without identity may be embedded in a monoid formed by adjoining an element to and defining for all . The notation denotes a monoid obtained from by adjoining an identity if necessary ( for a monoid). Similarly, every magma has at most one absorbing element, which in semigroup theory is called a zero. Analogous to the above construction, for every semigroup , one can define , a semigroup with 0 that embeds . Subsemigroups and ideals The semigroup operation induces an operation on the collection of its subsets: given subsets A and B of a semigroup S, their product , written commonly as AB, is the set (This notion is defined identically as it is for groups.) In terms of this operation, a subset A is called a subsemigroup if AA is a subset of A, a right ideal if AS is a subset of A, and a left ideal if SA is a subset of A. If A is both a left ideal and a right ideal then it is called an ideal (or a two-sided ideal). If S is a semigroup, then the intersection of any collection of subsemigroups of S is also a subsemigroup of S. So the subsemigroups of S form a complete