Binary operation on magma determines neutral element

Statement
Suppose $$(S,*)$$ is a magma (set $$S$$ with associative binary operation $$*$$). Then, if there exists a neutral element for $$*$$ (i.e., an element $$e$$ such that $$e * a = a * e = a$$ for all $$a \in S$$), the element $$e$$ is uniquely determined by $$*$$.

In other words, a magma can have at most one two-sided neutral element.

Facts used
Equality of left and right neutral element

Related facts
In the case that $$*$$ is associative, this says that the identity element (neutral element) of a monoid is completely determined by the binary operation. This yields the fact that monoids form a non-full subcategory of semigroups.