An algebraic structure is a set of values together with operations and rules for applying those operations. In programming terms, it resembles a type with permitted behaviors. The rules describe what remains valid and how operations interact. section 2.5.1 section 2.8
For integers with addition, the structure includes:
- Closure: adding two integers produces another integer. section 2.5.1
- Associativity: regrouping additions does not change the result. section 2.5.1
- Commutativity: exchanging the operands does not change the result. section 2.5.1
- An identity element, such as zero, leaves a value unchanged. section 2.5.1
- An inverse for each value, such as negative a for a, returns the identity. section 2.5.1
Integers, vectors, and matrices
Integers under addition form a group. Vectors have their own algebra through addition and scalar multiplication. Matrices with multiplication share most group properties but are generally noncommutative, so swapping factors can change the result. The same abstract properties can describe different underlying sets when a one-to-one correspondence preserves their operations. section 2.5.1 section 2.7 section 2.8

