Algebraic structure 2026-10-13
An algebraic structure is a set equipped with specified algebraic operations satisfying selected axioms. An operation's domain is part of the structure: a binary operation on takes two elements of and produces another element of . Groups specify one such operation, rings specify addition and multiplication, and vector spaces specify vector addition and scalar multiplication by a separate field.
Different choices of operations can give the same underlying set different structures. The integers form a group under addition, since every integer has an additive inverse. They do not form a group under multiplication: for example, has no multiplicative inverse among the integers. Even the nonzero integers fail that inverse requirement. In contrast, nonzero rational numbers form a group under multiplication.
Finite multiplication tables make such distinctions visible. Arithmetic modulo gives a field; arithmetic modulo gives a commutative ring with zero divisors. In the former, multiplying by any nonzero element permutes all residue classes. In the latter, multiplying by reaches only , and even though both factors are nonzero.
The goal is to extract reusable properties rather than memorize isolated tables. A homomorphism preserves the specified operations, and an isomorphism shows that two structures have identical operation patterns after relabeling.
Associative property 2026-10-14
The associative property says that regrouping three inputs does not change the result of a binary operation: for every in its domain of a function. It changes parentheses while keeping the order of the inputs. Commutativity instead exchanges two inputs; the two properties are different.
For addition modulo three, . For subtraction modulo three,so the second binary operation fails the associative property. One failed triple disproves associativity; checking a few successful triples does not establish it for all inputs.
The useful consequence is that a finite ordered sequence can be combined in chunks. For an associative operation, has the same value as . Intermediate results can therefore summarize parts of a computation without retaining their internal parentheses. The order must still be preserved when the binary operation is not commutative. Function composition and concatenation provide examples where grouping is harmless but exchanging entries changes the result.
Binary operation Created 2026-09-24 Updated 2026-10-13
A binary operation on a set is a function . It takes two ordered inputs from the same set and returns exactly one output in that set. The codomain is part of the definition: ordinary subtraction is a binary operation on the integers, but not on the positive integers, since leaves that set. Ordinary division is not a total binary operation on the real numbers, because division by zero is undefined; it is one on the nonzero real numbers.
The same set can carry several different binary operations. On , both and return an element of , using modular arithmetic. Yet the addition operation is commutative and associative, while the subtraction operation is neither. Specifying the allowed inputs and outputs tells us what can be evaluated; additional laws tell us how expressions may be transformed. [ref]
https://openmathbooks.org/someabstract/pdf/primer.pdf. Grassl and Mingus, Some Abstract Algebra: A Primer and Interactive Workbook, binary operations
.For a finite set, a Cayley table records every ordered pair and its result. This turns abstract laws into checkable examples. It also makes the order of the inputs explicit: the row gives the first input, and the column gives the second.
Binary parenthesization 2026-10-14
A binary parenthesization specifies the order of binary operations on a fixed ordered list of operands, combining exactly two existing expressions at each step. It has a full binary tree as its expression structure: operands are leaves and operations are internal vertices. For four operands , the five possibilities are , , , , and .
A binary parenthesization of operands contains binary operations. At the last operation, its left expression can contain operations and its right expression . The Catalan recurrence therefore gives possible evaluation structures. The order of operands stays fixed; this is not a count of their permutations. Even for an associative operation whose result is unchanged, different structures can have different evaluation costs, as in the matrix-chain multiplication problem.[ref]
Bijective Proof Problems by Richard P. Stanley. §5, Problem 154, printed p. 38: binary parenthesizations of n+1 letters
Cayley table 2026-10-14
A Cayley table records a binary operation on a finite set: the cell at row , column contains . Every cell must contain an element of the specified set. With the same ordering of row and column labels, the table is symmetric across its main diagonal exactly when the binary operation is commutative. Checking the associative property instead requires comparing with for every triple; symmetry alone cannot establish it.[ref]
Closure under a binary operation 2026-10-14
A subset is closed under a binary operation on when the result of combining any two elements of is again in . The even integers are closed under addition, but the odd integers are not: is even. Closure permits restricting the binary operation to . It is different from being a closed set in topology.
Commutativity Created 2026-10-05 Updated 2026-10-14
A binary operation is commutative if for every pair in its domain. A particular pair may commute even when the operation is not commutative. For example, ordinal addition and ordinal multiplication are not generally commutative.
Concatenation 2026-10-14
Concatenation joins two strings end to end, retaining the order of their symbols. For example, joining and gives . It has the associative property: joining or gives the same word over an alphabet. The empty word is its identity element. All finite words over an alphabet with this binary operation form a free monoid.
For a deterministic binary operation on an abstract data type, let be its specified operation on abstract values and the implementation on concrete states. For every permitted valid input pair , require bothThe first condition preserves the representation invariant. The second makes a commutative diagram: either execute and then apply the abstraction function, or apply the abstraction function to both inputs and then execute the abstract operation ; both paths reach the same value. These conditions state functional correctness of a completed operation; termination is an additional obligation for algorithm correctness.[ref]
8.3 Module Documentation. Sections 8.3.3, Commutative Diagrams, and 8.3.4, Representation Invariants: matching abstract results and preservation of valid representations
For addition in the unreduced rational representation, chooseFor example, represents , precisely the sum of and . The short correctness argument uses nonzero denominators: and imply , preserving the representation invariant, and
Correct rational addition makes both paths agree; an invariant-preserving incorrect operation gives a different value
. Details. Now consider an incorrect implementation that uses addition on the numerators and multiplication on the denominators:It preserves the representation invariant for every valid input pair because its denominator is still . Yet represents , not the specified sum . Even perfect checks of the representation invariant before and after this call would miss the error: the result is a legal representation of the wrong rational number.
The incorrect operation also exposes an accidental dependence on representation. Replace by the equivalent state while keeping . The correct operation gives , still representing ; the incorrect operation gives , representing instead of its previous . A correct addition must yield the same abstract result for equivalent inputs, although its concrete outputs may differ. This is why checks against the formal specification should compare abstract values, including unreduced representations and representations with a negative denominator, rather than demand identical stored pairs.
The calculation assumes exact integers. An implementation with bounded storage must additionally specify how it handles products and sums outside its supported range; the mathematical argument alone does not establish its functional correctness. The bounded queue with encapsulation illustrates the corresponding need to account for returned status values and failed operations, alongside the abstract state transition.
Distributive property 2026-10-14
For two binary operations, multiplication distributes over addition on the left or right when the respective displayed identity holds. If multiplication is commutative, either law gives the other. Repeated distribution expands expressions in an incline into finite sums of monomials. This property is distinct from associativity of either operation.
Exclusive or Created 2026-09-28 Updated 2026-10-14
Exclusive or returns one exactly when its two input bits differ. Its truth table gives , , , and . The identitiesexpress exclusive or using logical conjunction, logical disjunction, and logical negation. The first expression accepts at least one input and then excludes both; the second explicitly lists the two accepted input pairs.
For numerical bits, exclusive or is addition in modular arithmetic modulo two:The binary operation is commutative and associative, because addition modulo two has those properties. It satisfies , , and . These identities explain why a bit can be toggled and restored with the same operation.
On binary strings of equal length, bitwise exclusive or applies the one-bit rule separately at each position. For example,A bit mask of toggles exactly the middle two bits. Applying the mask twice restores the original binary string: each selected bit changes twice, and each unselected bit stays fixed. This positional operation is distinct from taking the exclusive or of the overall truth values of two integers.
Free monoid Created 2026-10-03 Updated 2026-10-14
The free monoid on an alphabet consists of all finite words over an alphabet, including the empty word , with concatenation as its binary operation. Distinct strings represent distinct elements: there are no imposed equalities between different sequences of letters. The empty word is its identity element, and concatenation has the associative property.[ref]
For , the elements begin . Both and give the same word , but , so this monoid is not commutative. The length of a word over an alphabet obeys ; it is a monoid homomorphism to the nonnegative integers with addition. A nonempty word has no inverse element, since joining it to any other word cannot decrease its length to zero.
The defining benefit of being free is that letters can stand for arbitrary elements of another monoid. Choose a value for each letter ; then , with , is the unique monoid homomorphism extending those choices. Associativity and the identity element make this evaluation consistent for every finite word. For example, interpreting the letters as self-maps evaluates a word as a composed transformation; interpreting them as nonnegative counts evaluates it by addition.


