Mathematical Preliminaries: Sets, Functions, Groups, and Modules
What formal vocabulary should an advanced reader internalize before any musical-mathematical formalism can be stated cleanly? That question is not rhetorical. Every later chapter in this book—whether it models twelve-tone rows, classifies meters, or analyzes the topology of tuning systems—relies on a small but carefully chosen collection of mathematical objects: sets, functions, relations, groups, modules, and metric spaces. The danger in assembling such machinery at the outset is twofold. On one side, a reader already fluent in abstract algebra will be insulted by a chapter that wastes pages proving obvious facts. On the other, a reader whose last formal mathematics was a semester of calculus will be lost if the same chapter leaps into group actions on quotient lattices without warning. The resolution adopted here is unromantic but honest: build the vocabulary deliberately, illustrate each object with a piece of music the reader can hear or hum, and trust the reader to skim any subsection that already feels familiar. The result is a self-contained reference frame; from Chapter 2 onward, every symbol that appears should be either defined here or constructed on top of definitions given here.
The chapter is organized so that each section can be read either linearly or in isolation. The first section establishes set-theoretic notation. The second introduces functions, relations, and quotient constructions. The third develops group axioms, with cyclic and dihedral groups as the recurring musical prototypes. The fourth lifts the discussion from algebra to geometry by introducing metric and topological notions, including lattices as a bridge between the discrete and the continuous. The fifth introduces modules only as far as they are needed later, deferring heavy commutative algebra to appendices. A short case study then walks the reader through the construction of $\mathbb{Z}_{12}$ from first principles, foreshadowing the modular arithmetic that dominates the pitch-class chapters. The closing summary links each tool to the musical questions it ultimately answers.
1.1 Set-Theoretic Language
A *set* is a collection of distinct objects considered as a single entity. The objects themselves are called *elements* or *members*. Membership is denoted by the symbol $\in$, and its negation by $\notin$. The notation $$X = \{x_1, x_2, \ldots, x_n\}$$ is read "$X$ is the set whose elements are $x_1, x_2, \ldots, x_n$." Two sets are equal precisely when they have the same elements; order, repetition, and external description play no role in equality. This definition is austere and deliberately so: every later object in the book is either a set, a function between sets, a structure built on sets, or a set equipped with extra axioms.
The basic operations on sets are union, intersection, difference, complement, and Cartesian product. For two sets $A$ and $B$ inside some ambient universe $U$:
- **Union:** $A \cup B = \{x : x \in A \text{ or } x \in B\}$.
- **Intersection:** $A \cap B = \{x : x \in A \text{ and } x \in B\}$.
- **Difference:** $A \setminus B = \{x : x \in A \text{ and } x \notin B\}$.
- **Complement:** $A^c = U \setminus A$.
- **Cartesian product:** $A \times B = \{(a,b) : a \in A,\ b \in B\}$.
Each operation has an immediate musical reading. If $A$ is the set of pitch classes used in one phrase and $B$ the set used in the next, then $A \cup B$ is the combined pitch vocabulary of the two phrases and $A \cap B$ is the pitch material they share. The Cartesian product is less common in elementary music theory but will appear whenever we discuss ordered pairs of pitches, intervals, or beats: an ordered pair $(p, q)$ with $p \in A$ and $q \in B$ is a member of $A \times B$, and the size of this product set is $|A| \cdot |B|$ when both sets are finite.
Two derived constructions deserve emphasis. The power set $\mathcal{P}(X)$ of $X$ is the set of all subsets of $X$. If $X$ has $n$ elements, then $\mathcal{P}(X)$ has $2^n$ elements. Pitch-class set theory in the post-Fortean sense is essentially the study of $\mathcal{P}(\mathbb{Z}_{12})$ modulo certain equivalence relations; the explosion of cardinality is the reason pitch-class set theory can support an entire research program from a finite universe. The empty set $\varnothing$ is the unique set with no elements; it is a subset of every set and is the identity element for union ($\varnothing \cup A = A$) and the absorbing element for intersection ($A \cap \varnothing = \varnothing$).
Set-theoretic notation is not ornamentation; it is the grammar in which every later sentence will be written. Throughout the book, the reader will encounter expressions of the form $$\{x \in X : P(x)\}$$ where $P$ is some predicate. This set-builder notation, often called "the set of all $x$ in $X$ such that $P(x)$," is preferred to listing elements whenever the defining condition is more transparent than an enumeration. For instance, the set of consonant dyads in twelve-tone equal temperament is more transparently written as $$\{(p,q) \in \mathbb{Z}_{12} \times \mathbb{Z}_{12} : (p - q) \bmod 12 \in \{0,3,4,5,7,8,9\}\}$$ than as a list of 12 × 12 = 144 ordered pairs, even though the two sets are equal.
A word of caution about musical examples. Most pieces of music involve *ordered* data: a melody is a sequence, a chord progression is a sequence, a meter has a temporal order. Pure sets are unordered; sequences are tuples, that is, elements of Cartesian products in which the indexing is part of the data. The notation $X^n$ is shorthand for the Cartesian product of $X$ with itself $n$ times; the elements of $X^n$ are $n$-tuples $(x_1, x_2, \ldots, x_n)$. The distinction between sets and tuples is what allows the same theory to handle both unordered pitch-class collections and ordered melodic lines.
Example 1.1. Pitch-class sets. Let $\text{PC} = \{0, 1, 2, \ldots, 11\}$ be the universe of pitch classes in twelve-tone equal temperament, with 0 standing for C, 1 for C$\sharp$/D$\flat$, and so on. The major triad on C is the set $\{0, 4, 7\}$. Its power set contains $2^3 = 8$ subsets, including $\{0\}$, $\{4\}$, $\{7\}$, $\{0,4\}$, $\{0,7\}$, $\{4,7\}$, $\{0,4,7\}$, and $\varnothing$. These eight subsets are precisely the trichords, dyads, monads, and the empty set that can be drawn from the C major triad; in set-theoretic terms, they form the Boolean algebra generated by the three pitch classes. The reader should rehearse this construction because it is the prototype for every pitch-class analysis later in the book.
1.2 Functions, Relations, and Quotient Constructions
A *function* $f : A \to B$ is a rule that assigns to every element $a \in A$ exactly one element $f(a) \in B$. The set $A$ is the domain, $B$ is the codomain, and the image $f(A) = \{f(a) : a \in A\}$ is the range of $f$. The graph of $f$ is the subset of $A \times B$ given by $\{(a, f(a)) : a \in A\}$; two functions are equal precisely when they have the same graph, which is the same as saying they have the same domain, codomain, and value at every input. Three properties of functions appear constantly in the sequel:
- $f$ is **injective** if $f(a_1) = f(a_2)$ implies $a_1 = a_2$ (no two inputs share an output).
- $f$ is **surjective** if $f(A) = B$ (every codomain element is hit).
- $f$ is **bijective** if it is both injective and surjective.
For finite sets, injectivity, surjectivity, and bijectivity are equivalent to the cardinality condition $|A| = |B|$ provided $f$ has either property; for infinite sets the distinction matters because a function can be injective but not surjective or vice versa.
The composition of $f : A \to B$ and $g : B \to C$ is the function $g \circ f : A \to C$ defined by $(g \circ f)(a) = g(f(a))$. The identity function $\text{id}_A : A \to A$ is defined by $\text{id}_A(a) = a$. A function $f : A \to B$ has an inverse $f^{-1} : B \to A$ precisely when $f$ is bijective; the defining condi