Music Theory Practice Since 2018

How to Build a Twelve-Tone Matrix

A twelve-tone matrix is a 12×12 grid that holds all 48 forms of a tone row. This page builds one by hand in five steps, using the row from Schoenberg's Suite für Klavier, Op. 25, with a free calculator to check the result.

By Dr. Ramsey Castaneda, DMA · Music Department Chair, Crossroads School for Arts & Sciences

What is a Tone Row?

Around 1921, Arnold Schoenberg arrived at a "method of composing with twelve tones which are related only with one another." The core idea is simple: instead of organizing music around a tonic, you organize it around a tone row — a fixed ordering of all twelve pitch classes, each appearing exactly once.

The row is not a melody, though it can become one. Think of it as the piece's DNA: an ordering of intervals that generates melodies, chords, and accompaniments throughout the work. Schoenberg's Suite für Klavier, Op. 25 — the first piece composed entirely with the method — is built from this row:

The Op. 25 Row

E – F – G – D♭ – G♭ – E♭ – A♭ – D – B – C – A – B♭

The Op. 25 row octave placement is free in twelve-tone writing

A composer rarely uses the row in just one version. It can be transposed, played upside down, played backwards, or both — and that's where the matrix comes in. A twelve-tone matrix (sometimes called a "magic square") is a 12×12 grid that shows every version of the row at a glance. Analysts use it to identify which row form a passage uses; composers use it to plan. By the end of this guide you'll be able to build one by hand — and check it instantly with our free twelve-tone matrix calculator.

First, Speak in Numbers: Pitch-Class Integers

Post-tonal theory replaces note names with pitch-class integers. In absolute terms, C = 0, C♯/D♭ = 1, D = 2, and so on up to B = 11. Enharmonic spellings don't matter: G♯ and A♭ are both 8. All arithmetic is mod 12 — if a sum passes 11, subtract 12, exactly like clock arithmetic where 10 o'clock plus 4 hours is 2 o'clock.

For matrix building, there's one more convention to choose. This guide uses the fixed-zero ("movable-0") convention: we relabel the row's first note as 0, so the untransposed row is always called P0. Some textbooks instead keep C = 0 no matter what, in which case a row starting on E would be called P4. Both systems are common; the matrix comes out identical either way, only the subscript labels differ. Check which convention your course uses before an exam.

With E = 0, the Op. 25 row becomes:

Op. 25 Row in Integers (E = 0)

E  F  G  D♭  G♭  E♭  A♭  D  B  C  A  B♭

0  1  3  9   2   11  4   10 7  8  5  6

Spot-check a couple: F is one semitone above E, so it's 1. D♭ is nine semitones above E (count up E→F→F♯→G→A♭→A→B♭→B→C→D♭), so it's 9. Every integer from 0 to 11 appears exactly once — a quick sanity check that your row really is a twelve-tone row.

The Four Row Forms

Serial composers treat four transformations of the row as equivalent, the same way tonal composers treat a theme and its transposition as "the same tune":

Each of the four can start on any of the twelve pitch classes, so a row has 48 forms in total: 12 primes, 12 inversions, 12 retrogrades, and 12 retrograde inversions. (Some symmetrically constructed rows have fewer distinct forms, because two different labels can produce the same ordering — Webern often designed rows this way. For most rows, including Op. 25's, all 48 are distinct.)

Writing out 48 row forms one at a time is tedious and error-prone. The matrix packs all of them into one 12×12 grid. Here's how to build it.

1 Write P0 Across the Top Row

Draw a 12×12 grid (graph paper helps) and write the row's integers left to right across the top row. That top row is P0 — the untransposed prime. For Op. 25:

Top Row = P0

0  1  3  9  2  11  4  10  7  8  5  6

Working in integers rather than note names is strongly recommended for the construction phase — the arithmetic in the next two steps becomes trivial. You can always translate back to note names at the end.

2 Compute the Inversion Down the First Column

The first column of the matrix holds I0, the inversion of the row, reading top to bottom. Inversion means every interval flips direction. Walk the first few moves of the Op. 25 row:

So the first column begins 0, 11, 9, 3, … — a mirror image of the top row's contour. You could continue interval by interval, but there's a shortcut. In general, inverting around the first note gives each column entry as (2 × first note − row note) mod 12. With the first note conveniently equal to 0, that collapses to:

The First-Column Shortcut

When the first note is 0, each entry of the first column is just 12 − the corresponding top-row entry (and 0 stays 0). Equivalently: each interval of the row is replaced by 12 minus that interval.

Top row:    0  1  3  9  2  11  4  10  7  8  5  6
First column: 0  11 9  3  10 1   8  2   5  4  7  6

Write those twelve integers down the left edge of your grid. Notice they match the interval-flipping walk we did above — the shortcut and the "flip every interval" definition always agree. If you'd like more practice with melodic inversion on its own, our melodic inversion calculator lets you invert any line around any axis and see the result on a staff.

3 Fill Each Row as a Transposition of P0

Here's the payoff for using integers: every remaining row of the matrix is simply P0 transposed to begin on that row's first-column number. To fill a row, add its first-column value to every entry of the top row, mod 12.

Take the second row. Its first-column entry is 11, so the whole row is P0 + 11:

Row 2 = P0 + 11 (mod 12)

0+11=11  1+11=0  3+11=2  9+11=8  2+11=1  11+11=10 …

Full row: 11 0 2 8 1 10 3 9 6 7 4 5 — that is, E♭ E F♯ C F D G C♯ B♭ B A♭ A.

Here are the first two rows of the completed Op. 25 matrix, with the form labels you'll add in Step 4. Try filling in row three yourself (its first-column entry is 9, so add 9 to everything), then check against the calculator:

I0 I1 I3 I9 I2 I11 I4 I10 I7 I8 I5 I6
P0 E
0
F
1
G
3
D♭
9
G♭
2
E♭
11
A♭
4
D
10
B
7
C
8
A
5
B♭
6
R0
P11 E♭
11
E
0
F♯
2
C
8
F
1
D
10
G
3
C♯
9
B♭
6
B
7
A♭
4
A
5
R11
P9 … ten more rows: add each first-column value to P0 R9

Twelve rows, twelve additions — that's the whole grid. It's mechanical on purpose: once the top row and first column are right, the rest cannot go wrong unless the arithmetic slips.

4 Label the Row Forms

The finished grid contains all 48 forms, read in four directions:

Each form's subscript is its starting integer. A P form starts at its row's left edge, so P11 is the row beginning on 11. An I form starts at its column's top, so I1 is the column beginning on 1. R and RI forms conventionally take the same subscript as the P or I form they reverse: R11 is P11 backwards, and RI1 is I1 backwards. (Under the fixed-zero convention, remember, these subscripts are relative to the row's first note, not to C.)

Reading practice, from the table above: R0 is B♭–A–C–B–D–A♭–E♭–G♭–D♭–G–F–E (the top row backwards), and I0 begins E–E♭–D♭–G… (the first column downwards). If a subscript and a starting note ever disagree, something's mislabeled.

5 Check Your Work

Three fast checks catch nearly every construction error:

And of course, the fastest check of all: type the row into our free twelve-tone matrix calculator and compare. It builds the complete labeled matrix instantly from any row you enter — ideal for verifying homework after you've done it by hand.

Check your work: Twelve-Tone Matrix Calculator →

Matrix construction shows up on nearly every post-tonal exam, and the arithmetic has to be automatic under time pressure. Build two or three matrices fully by hand — different rows each time — before you lean on the calculator. Then use it as an instant answer key, and as a way to explore rows from real repertoire (Berg's Violin Concerto row and Webern's Op. 24 row are interesting to feed in) without the busywork.

Where to go next

Students — practice the interval-flipping operation from Step 2 with the melodic inversion calculator, then read Interval Vectors, Explained — the other core skill of a first post-tonal course. The all-combinatorial hexachords page shows the special six-note sets composers like Babbitt used to make row forms combine without duplicating pitches.

Teachers — everything here is free for classroom use: see the teacher tools, or project the matrix calculator as a live answer key while students build their grids by hand.

Frequently asked questions

What is a twelve-tone matrix?

A twelve-tone matrix is a 12x12 grid that displays all 48 forms of a tone row at once: the 12 transpositions of the prime form, plus the inversions, retrogrades, and retrograde inversions. Composers and analysts use it to find every version of a row quickly.

How many row forms are there?

Every tone row has 48 forms: 12 primes, 12 retrogrades, 12 inversions, and 12 retrograde inversions. Some symmetrical rows have fewer distinct forms because two different labels can produce the same ordering — Webern was especially fond of rows like this.

What do P, I, R, and RI mean?

P is the prime (the original row), I is the inversion (every interval flipped upside down), R is the retrograde (the prime backwards), and RI is the retrograde inversion (the inversion backwards). Subscripts show the transposition level of each form.

Do I have to start on C? What is P0?

No. In the fixed-zero convention used here, P0 simply means the untransposed prime form, whatever pitch it starts on. Some textbooks instead number forms by absolute pitch class (C = 0), so the same row might be called P4. Both systems describe identical music — just check which one your class uses.

Who invented the twelve-tone technique?

Arnold Schoenberg developed the twelve-tone method around 1921 and first used it systematically in works like the Suite für Klavier, Op. 25. His students Alban Berg and Anton Webern adopted it, and the technique shaped much of 20th-century composition.

Related guides and tools: interval vectors, explained · twelve-tone matrix calculator · melodic inversion calculator · all-combinatorial hexachords.

Join the newsletter

Subscribe and get the free one-page Music Theory Cheat Sheet (grand staff, circle of fifths, every key signature) — plus new practice tools and theory tips now and then. No spam — unsubscribe anytime.

We’ll only email occasionally. Unsubscribe with one click.