In
mathematics, there exist
magmas
Magma () is the molten or semi-molten natural material from which all igneous rocks are formed. Magma is found beneath the surface of the Earth, and evidence of magmatism has also been discovered on other terrestrial planets and some natural sa ...
that are
commutative
In mathematics, a binary operation is commutative if changing the order of the operands does not change the result. It is a fundamental property of many binary operations, and many mathematical proofs depend on it. Most familiar as the name of ...
but not
associative. A simple example of such a magma may be derived from the children's game of
rock, paper, scissors
Rock paper scissors (also known by other orderings of the three items, with "rock" sometimes being called "stone," or as Rochambeau, roshambo, or ro-sham-bo) is a hand game originating in China, usually played between two people, in which each ...
. Such magmas give rise to
non-associative algebra
A non-associative algebra (or distributive algebra) is an algebra over a field where the binary operation, binary multiplication operation is not assumed to be associative operation, associative. That is, an algebraic structure ''A'' is a non-ass ...
s.
A magma which is both commutative and associative is a commutative
semigroup
In mathematics, a semigroup is an algebraic structure consisting of a set together with an associative internal binary operation on it.
The binary operation of a semigroup is most often denoted multiplicatively: ''x''·''y'', or simply ''xy'', ...
.
A commutative non-associative magma derived from the rock, paper, scissors game
Let
, standing for the "rock", "paper" and "scissors" gestures respectively, and consider the
binary operation
In mathematics, a binary operation or dyadic operation is a rule for combining two elements (called operands) to produce another element. More formally, a binary operation is an operation of arity two.
More specifically, an internal binary op ...
derived from the rules of the game as follows:
: For all
:
:* If
and
beats
in the game, then
:*
I.e. every
is
idempotent
Idempotence (, ) is the property of certain operation (mathematics), operations in mathematics and computer science whereby they can be applied multiple times without changing the result beyond the initial application. The concept of idempotence ...
.
: So that for example:
:*
"paper beats rock";
:*
"scissors tie with scissors".
This results in the
Cayley table Named after the 19th century British mathematician Arthur Cayley, a Cayley table describes the structure of a finite group by arranging all the possible products of all the group's elements in a square table reminiscent of an addition or multiplicat ...
:
:
By definition, the magma
is commutative, but it is also non-associative, as shown by:
:
but
:
i.e.
:
Other examples
The "
mean
There are several kinds of mean in mathematics, especially in statistics. Each mean serves to summarize a given group of data, often to better understand the overall value (magnitude and sign) of a given data set.
For a data set, the ''arithme ...
" operation
on the
rational number
In mathematics, a rational number is a number that can be expressed as the quotient or fraction of two integers, a numerator and a non-zero denominator . For example, is a rational number, as is every integer (e.g. ). The set of all ration ...
s (or any commutative number system closed under division) is also commutative but not in general associative, e.g.
:
but
:
Generally, the
mean operation In algebraic topology, a mean or mean operation on a topological space ''X'' is a continuous, commutative, idempotent binary operation on ''X''. If the operation is also associative, it defines a semilattice. A classic problem is to determine whic ...
s studied in topology need not be associative.
The construction applied in the previous section to rock-paper-scissors applies readily to variants of the game with other numbers of gestures, as described in the section ''
Variations
Variation or Variations may refer to:
Science and mathematics
* Variation (astronomy), any perturbation of the mean motion or orbit of a planet or satellite, particularly of the moon
* Genetic variation, the difference in DNA among individuals ...
'', as long as there are two players and the conditions are symmetric between them; more abstractly, it may be applied to any
trichotomous binary relation (like "beats" in the game). The resulting magma will be associative if the relation is transitive and hence is a (strict)
total order
In mathematics, a total or linear order is a partial order in which any two elements are comparable. That is, a total order is a binary relation \leq on some set X, which satisfies the following for all a, b and c in X:
# a \leq a ( reflexive) ...
;
otherwise, if finite, it contains
directed cycle
Director may refer to:
Literature
* ''Director'' (magazine), a British magazine
* ''The Director'' (novel), a 1971 novel by Henry Denker
* ''The Director'' (play), a 2000 play by Nancy Hasty
Music
* Director (band), an Irish rock band
* ''D ...
s (like rock-paper-scissors-rock) and the magma is non-associative. To see the latter, consider combining all the elements in a cycle in reverse order, i.e. so that each element combined beats the previous one;
the result is the last element combined, while associativity and commutativity would mean that the result only depended on the set of elements in the cycle.
The bottom row in the
Karnaugh diagram
The Karnaugh map (KM or K-map) is a method of simplifying Boolean algebra expressions. Maurice Karnaugh introduced it in 1953 as a refinement of Edward W. Veitch's 1952 Veitch chart, which was a rediscovery of Allan Marquand's 1881 ''logica ...
above gives more example operations, defined on the
integer
An integer is the number zero (), a positive natural number (, , , etc.) or a negative integer with a minus sign (−1, −2, −3, etc.). The negative numbers are the additive inverses of the corresponding positive numbers. In the language ...
s (or any
commutative ring
In mathematics, a commutative ring is a ring in which the multiplication operation is commutative. The study of commutative rings is called commutative algebra. Complementarily, noncommutative algebra is the study of ring properties that are not sp ...
).
Derived commutative non-associative algebras
Using the rock-paper-scissors example, one can construct a commutative non-associative
algebra over a field
In mathematics, an algebra over a field (often simply called an algebra) is a vector space equipped with a bilinear product. Thus, an algebra is an algebraic structure consisting of a set together with operations of multiplication and addition ...
: take
to be the three-dimensional
vector space
In mathematics and physics, a vector space (also called a linear space) is a set whose elements, often called ''vectors'', may be added together and multiplied ("scaled") by numbers called '' scalars''. Scalars are often real numbers, but can ...
over
whose elements are written in the form
:
for
. Vector addition and scalar multiplication are defined
component
Circuit Component may refer to:
•Are devices that perform functions when they are connected in a circuit.
In engineering, science, and technology Generic systems
* System components, an entity with discrete structure, such as an assem ...
-wise, and vectors are multiplied using the above rules for multiplying the elements
.
The set
:
i.e.
forms a
basis
Basis may refer to:
Finance and accounting
* Adjusted basis, the net cost of an asset after adjusting for various tax-related items
*Basis point, 0.01%, often used in the context of interest rates
* Basis trading, a trading strategy consisting ...
for the algebra
. As before, vector multiplication in
is commutative, but not associative.
The same procedure may be used to derive from any commutative magma
a commutative algebra over
on
, which will be non-associative if
is.
Non-associative algebra