Mathematical Foundations for Music Theory
Mathematical Foundations for Music Theory
The relationship between mathematics and music is neither coincidental nor merely metaphorical; it is structural. From the Pythagorean discovery that consonant intervals correspond to simple integer ratios to the modern application of group theory in twelve-tone composition, mathematical structures have provided music theorists with powerful frameworks for understanding, describing, and predicting musical phenomena. This chapter establishes the mathematical toolkit necessary for the rigorous analysis that follows throughout this book. We begin not with music but with mathematics, developing the formal structures that will later be mapped onto musical objects. The goal is twofold: to provide readers with sufficient mathematical background to engage with the advanced theoretical material, and to demonstrate the naturalness with which these structures arise when one attempts to formalize musical intuition.
Set Theory and the Organization of Pitch
The Basic Framework of Pitch-Class Set Theory
The most fundamental mathematical concept we encounter in music theory is the set. In mathematical terms, a set is a well-defined collection of distinct objects, called elements or members. The notation $a \in A$ indicates that element $a$ belongs to set $A$, while $a \notin A$ indicates the opposite. When analyzing music, we typically work with pitch classes—the abstraction of pitch that identifies all occurrences of the same note regardless of octave or register. The twelve pitch classes of Western equal temperament are conventionally labeled $\{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11\}$ or equivalently $\{C, C\sharp, D, D\sharp, E, F, F\sharp, G, G\sharp, A, A\sharp, B\}$, where the numbers represent pitch classes modulo 12.
A pitch-class set (pcset) is a subset of this universal set $U = \{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11\}$. For example, the pitch classes of a C major triad form the set $\{0, 4, 7\}$ (using C as pitch class 0). The cardinality of a set, denoted $|A|$, is the number of elements it contains; thus $| \{0, 4, 7\}| = 3$. This cardinality provides the first of many useful classifications: sets of cardinality 3 are called trichords, cardinality 4 tetrachords, cardinality 5 pentachords, and so forth.
The Universal Set of all twelve pitch classes gives us a complete space within which all diatonic, chromatic, and post-tonal pitch organizations can be analyzed. This mathematical abstraction proves remarkably powerful precisely because it strips away the irrelevant (specific octave, register, instrument) while preserving the essential (which pitch classes are present, and how they relate to each other). As Joseph Straus notes in his foundational text on post-tonal theory, "Pitch-class set theory allows us to compare chords across different contexts, to identify structural relationships, and to trace harmonic transformations" (Straus, 2016).
Set Relations and Subsethood
Once we have established sets as our basic objects, we need tools for comparing them. The fundamental relation is subsethood: set $A$ is a subset of set $B$, written $A \subseteq B$, if and only if every element of $A$ is also an element of $B$. This is not merely an abstract relationship; it captures the musical intuition that one chord may be "contained within" another. Consider the pitch-class set $\{0, 4, 7\}$ (C major triad). This is a subset of $\{0, 2, 4, 5, 7, 9, 11\}$ (C major scale), which in turn is a subset of the universal set $\{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11\}$ (all pitch classes). The concept of subsethood enables us to analyze tonal hierarchies: how chords relate to scales, how scales relate to the total chromatic, and how melodic and harmonic content at various levels interact.
We must distinguish between subset ($\subseteq$) and proper subset ($\subsetneq$). The distinction lies in whether equality is allowed. If $A \subseteq B$ and $A \neq B$, then $A$ is a proper subset of $B$. The C major triad $\{0, 4, 7\}$ is a proper subset of the C major scale $\{0, 2, 4, 5, 7, 9, 11\}$, but it is merely a subset (not proper) of itself: $\{0, 4, 7\} \subseteq \{0, 4, 7\}$. This mathematical precision matters for music analysis: the same chord can function both as a subset of larger collections and as a complete entity in its own right.
Set Operations and Musical Combination
The standard set operations—union, intersection, difference, and complement—have direct musical applications. The union of two sets $A \cup B$ is the set of all elements belonging to either $A$ or $B$ (or both). Musically, this might represent the combined pitch content of two simultaneous or sequential chords. The intersection $A \cap B$ contains only elements belonging to both sets; this captures their common tones. The difference $A \setminus B$ contains elements in $A$ that are not in $B$, which can represent what one chord adds to another. The complement $A^c$ of a set $A$ is the set of all elements in the universal set not in $A$.
Consider the following practical example. Let $A = \{0, 4, 7\}$ (C major triad) and $B = \{3, 7, 10\}$ (G dominant seventh without the root, or more precisely, an F minor triad with added pitch class 7). Then:
- $A \cup B = \{0, 3, 4, 7, 10\}$ — the combined pitch content
- $A \cap B = \{7\}$ — the single common pitch class
- $A \setminus B = \{0, 4\}$ — what C major adds to B
- $B \setminus A = \{3, 10\}$ — what B adds to C major
These operations become essential tools when analyzing voice leading, harmonic substitution, and the smoothest possible connections between chords. The principle of minimal voice crossing often requires us to compute unions, intersections, and differences to determine which pitch classes must be added or removed to transform one chord into another.
Normal Order and Set Classes
A crucial insight of pitch-class set theory is that many distinct sets are transpositionally related—that is, they differ only by a uniform raising or lowering of all pitch classes. Mathematically, if $A$ is a pitch-class set and $T_n$ represents transposition by $n$ semitones, then $T_n(A) = \{a + n \bmod 12 : a \in A\}$. The notation "mod 12" indicates that we work within the cyclic group of integers modulo 12, so pitch class 12 is equivalent to pitch class 0, 13 is equivalent to 1, and so forth. Two sets related by transposition belong to the same set class—the central organizational unit of atonal music theory.
However, the concept of set class requires further refinement. Since transposition preserves the internal structure of a set (all intervals remain the same), we might also want to consider inversion. The inversion operation $T_nI$ maps each pitch class $p$ to $n - p \bmod 12$. Inversion captures the symmetry between major and minor triads, between inversion-related chords, and between melodic contours that are mirror images of each other. Two sets related by transposition and/or inversion belong to the same interval class content (ICC) or set class under the Fortean classification scheme developed by Allen Forte.
The problem of normal order arises because the same set class can be represented by many different orderings of pitch classes. The C major triad can be written as $\{0, 4, 7\}$, $\{4, 7, 0\}$ (equivalent since we consider sets, not sequences), $\{7, 0, 4\}$, or any other permutation. To create a canonical representation, we use the normal order algorithm: write the pitch classes in ascending order, find the interval pattern, and choose the ordering that produces the smallest possible first interval when wrapped around the circle. For $\{0, 4, 7\}$, the normal order is $(0, 4, 7)$ because $(4, 7, 11)$, $(7, 11, 4)$, and $(11, 4, 7)$ all have larger wrapping intervals than $(0, 4, 7)$ where the wrapping interval from 7 to 0 is 5.