I started learning guitar during the pandemic. My teacher told me to memorize chord shapes. I memorized about fifteen before I realized I had no idea why those specific finger positions produced those specific sounds. I was memorizing outputs without understanding the function. As a developer, that bothered me deeply.
So I learned how chords are actually constructed. Turns out, the entire Western music system is built on a logarithmic frequency scale and simple integer ratios. Chords are not arbitrary -- they are formulas applied to that scale.
The chromatic scale is a data structure
Western music divides the octave into 12 equally spaced semitones. Starting from C:
C C# D D# E F F# G G# A A# B C
0 1 2 3 4 5 6 7 8 9 10 11 12
Each semitone is a frequency multiplied by the twelfth root of 2 (approximately 1.05946). So if A4 is 440 Hz, A#4 is 440 * 1.05946 = 466.16 Hz, and B4 is 493.88 Hz. After 12 steps, you reach 440 * 2 = 880 Hz -- exactly one octave up.
This is a modular arithmetic system. Interval 12 wraps back to the same note name. Everything in chord theory works modulo 12.
How chords are built
A chord is three or more notes played simultaneously, selected by a formula of intervals from a root note.
Major chord: [0, 4, 7]
Take any root note. Go up 4 semitones (a major third). Go up 7 semitones from the root (a perfect fifth). That is a major chord. It sounds "happy" or "resolved."
C major = C (0) + E (4) + G (7)
A major = A (0) + C# (4) + E (7)
Minor chord: [0, 3, 7]
Same root and fifth, but the third drops by one semitone. That single semitone difference is why minor chords sound "sad" or "dark."
C minor = C (0) + Eb (3) + G (7)
A minor = A (0) + C (3) + E (7)
Seventh chords add a fourth note:
- Major 7th: [0, 4, 7, 11] -- jazzy, smooth
- Dominant 7th: [0, 4, 7, 10] -- bluesy, tension-seeking
- Minor 7th: [0, 3, 7, 10] -- mellow, common in R&B
Extended chords keep stacking thirds:
- 9th: adds the note at interval 14 (which is 2 modulo 12, an octave up from the 2nd)
- 11th: adds interval 17 (5 modulo 12)
- 13th: adds interval 21 (9 modulo 12)
Every chord you have ever heard is a subset of notes selected from the chromatic scale by a specific interval pattern. There are no exceptions.
Why certain intervals sound consonant
This is where the physics comes in. When two notes have frequencies in simple integer ratios, they share more harmonic overtones, and our ears perceive them as consonant.
- Octave: 2:1 ratio (the most consonant interval)
- Perfect fifth: 3:2 ratio (the backbone of almost every chord)
- Perfect fourth: 4:3 ratio
- Major third: 5:4 ratio
The equal temperament tuning system we use today does not produce these exact ratios -- it approximates them. A perfect fifth in equal temperament is 2^(7/12) = 1.4983, not exactly 1.5 (3/2). The difference is small enough that most listeners cannot perceive it, but it is the reason pianos and guitars can play in any key without retuning, while older tuning systems (like just intonation) sounded perfect in one key and terrible in others.
Inversions and voicings
A C major chord contains C, E, and G. But which octave each note is in changes the character of the chord dramatically.
Root position: C E G (C is the lowest note)
1st inversion: E G C (E is the lowest note)
2nd inversion: G C E (G is the lowest note)
All three contain the same pitch classes, but they sound different because the intervals between adjacent notes change. Root position has a major third (4 semitones) on the bottom and a minor third (3 semitones) on top. First inversion has a minor third on the bottom and a perfect fourth (5 semitones) on top.
On guitar, this is why the same "chord" can be played in multiple positions on the neck. Each position is a different voicing -- same pitch classes, different octave arrangement, different sonic character.
Chord progressions are patterns
Most popular music uses a small set of chord progressions, described by Roman numerals relative to the key:
I - IV - V - I (the most common progression in Western music)
I - V - vi - IV (the "pop" progression: Let It Be, No Woman No Cry, etc.)
ii - V - I (the foundation of jazz harmony)
I - vi - IV - V (the "doo-wop" progression)
In the key of C major, the diatonic chords are:
I = C major (C E G)
ii = D minor (D F A)
iii = E minor (E G B)
IV = F major (F A C)
V = G major (G B D)
vi = A minor (A C E)
vii = B diminished (B D F)
Uppercase Roman numerals are major chords, lowercase are minor. This pattern -- major, minor, minor, major, major, minor, diminished -- holds in every major key because it is derived from the intervals of the major scale itself.
Common mistakes when identifying chords
Confusing enharmonic equivalents. C# and Db are the same pitch on a piano, but they are different notes in music theory. Whether you call a note C# or Db depends on the key and context. This matters for correctly naming chords.
Ignoring the bass note. A chord with a G in the bass but C, E, and G above it is C/G (C major with G in the bass), not a G chord. Slash chords indicate a specific bass note that differs from the root.
Assuming all notes must belong to one chord. In real music, melody notes, passing tones, and suspensions create notes that are not part of the underlying chord. A C major chord under a melody hitting D does not make it a Cadd9 -- the D might just be a passing tone between C and E.
Overcomplicating chord names. If you see C, E, G, and A, you could call it C6 or Am7 (first inversion). Context determines which name is correct -- usually, whichever root the bass note or harmonic function suggests.
Whether you are learning an instrument, writing software that analyzes music, or just trying to understand why certain songs sound the way they do, the underlying system is surprisingly mathematical. I built a chord finder at zovo.one/free-tools/chord-finder that lets you input notes and get back the chord name, or input a chord name and see its constituent notes.
Understanding the formula does not replace the experience of hearing the chord. But it makes the entire system predictable. And for a developer, predictable systems are the ones you can actually work with.
I'm Michael Lip. I build free developer tools at zovo.one. 350+ tools, all private, all free.
Top comments (0)