# Set Difference

Set Difference in the Musical Context
Set difference of U and A, denoted U \ A, is the set of all members of U that are not members of A. The set difference {1,2,3} \ {2,3,4} is {1}, while, conversely, the set difference {2,3,4} \ {1,2,3} is {4} . When A is a subset of U, the set difference U \ A is also called the complement of A in U. In this case, if the choice of U is clear from the context, the notation A is sometimes used instead of U \ A, particularly if U is a universal set as in the study of Venn diagrams.

In simpler terms, whatever item that is both above the slash and is not in the set of items below is the set difference.

For example,

Lets say I have two sets of items; set A {cat, dog, fish} and set B {dog, fish, bird}.

If I put the set A over set B I will get the following:

{cat, dog, fish}/{dog, fish, bird}

The set difference here is {cat} because it is above the slash and is the only item not present in the below the slash.

In music, we can use the concept of set difference to isolate notes that we could use to carry over in a chord progression. Using set difference for the melody over a chord progression will also help with writing more complex and musical melodies, while at the same time they can be relatively simple to the ear.

I’ll show an example of set difference in music.

Lets use a simple I – V7 chord progression with the chords C – G7.

Since we will start on the chord C, the notes in chord C will be put above the slash and the notes in chord G7 will be put below the slash. By doing this we will be able to isolate the common tone to create an interesting melody.

Chord C contains a set of {C, E, G} and chord G7 contains {G, B, D, F}.
{C, E, G}/{G, B, D, F}

The items above the slash that aren’t in the chord G7 are {C, E}. Therefore our set difference is {C, E}.

Now we are left with the note G which is present in both chords. So, if you wanted your melody to carry over from the C chord to the G7 chord without changing notes, simply use the note G and there will be a smooth transition into the next chord!

That was a simple example but let’s say we use a more complex musical example with jazz chords:
I’ll use a C7#9 into an EbMaj13(11#).

Set C7#9 = {C, E, G, Bb, D#} and Set Eb Maj13(11#) = {Eb, G, Bb, D, F, A, C}
{C, E, G, Bb, D#}/{Eb, G, Bb, D, F, A, C}

Our set difference is {E}. This means that we could play the notes C, E, G, or Bb in the melody and they would carry over into the next chord.

Using the concept of set difference in music can be incredibly useful to find the common tone to write nice sounding melodies.