liveBook · Manning

Algebraic structure

As explained in Geometry for Programmers

An algebraic system is a set of mathematical entities together with defined operations and rules for manipulating them.

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

How Geometry for Programmers covers it

How deep it goes
Defines structures through closure, associativity, commutativity, identity, and inverses, then stops short of formal classification.
Examples
Uses integer addition, vector addition and scalar multiplication, and matrix multiplication as concrete structures.
What you can do after
Evaluate whether a set of entities and operations share recognizable algebraic properties.
How it connects
Connects algebraic structures with groups, vectors, matrices, tensors, operations, and isomorphism.

Also explained in

Compare how 2 books explain algebraic structure →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Geometry for Programmers. The section links point to the parts of the book it draws on.