Intervals in Diatonic Scale


Here we have a scheme of a diatonic scale: 

This diatonic model is intentionally piano keyboard indiferent so that it can't be identified with a specific key more then with other.
There are 7 keys in one octave, octaves stacked side by side. When we look at one octave, we can see that it consists of two parts where diatonic keys lie on a regular raster. These two parts consist of keys 1, 2, 3 and 4, 5, 6, 7. And these two 'sections' are linked with no space in between (same as octaves). We know that the 'spaces' in the sections mentioned are non-diatonic tones.
This structure will help us to realize where individual intervals are positioned. Let's look at them:
m2 - the smallest interval ever - half step or semitone. This interval is everywhere where the sections are linked. It is on positions: 71, 34 (only these two)
M2 - this interval exists exclusively within the sections between neighboring keys: 12, 23 and 45, 56, 67
m3 - this interval consists of two intervals - M2 and m2, what implies that such an interval can exist only on the borders between the sections: 61, 72 and 24, 35
M3 - consists of two M2, thus exists only in the sections: 13 and 46, 57
P4 - contains two M2 and one m2, thus: 51, 62, 73 and 14, 25, 36
P5 - three M3, one m2: 15, 26, 37 and 41, 52, 63

We can see that P4 and P5 have the most instances (6 each). They should have equal number of instances because they are opposite intervals within octave (interval inversions), thus they are symetrical.
We can prove their symetry - when we swap the numbers of P4, we get instances of P5 and opposite.
As we know that m2 is opposite of M7 within octave, we get all the instances of M7 by swapping the numbers of m2 instances.
The same for m7 for M2, M6 for m3 and m6 for M3.

You can consider the overview above as an interesting plaything, as a different look at intervals that you probably learn more straightforward way directly on the keyboard. But there is one important thing about intervals to realize. And it has something to do with the 'swapping' game we played:
Intervals have two characteristics: size and position. Or even three characteristics: two positions and size. When we can always calculate any of the characteristics from the other two.
But caution!
When you know the size and one position, you must know, if the position is the lower or upper one, so you must know the position of the position :). Interval is quite a delicate thing. Now comes the most interesting part:
2->5 is P4
5->2 is P5
we see that there are the same diatonic keys (numbers) pressed. We know that these two are opposite intervals within octave - interval inversions. It is good to realise that when you play 25 together, it has the same (or at least very similar) sound quality as 52 because these two intervals consist of the same diatonic keys. But the intervals are different! P4 and P5 are different intervals, what is obvious when you play the two tones of the interval separately, not simultaneously.
So we should realize and remember one thing. When we play an interval up and it's inversion from the same key down, we get similar sound effect (like when we play one key in two octaves), although we use a different interval for it (and end up in a different octave).
The application is: when we write 25 (in the meaning of two diatonic positions), it has unique harmonic meaning without knowing if the 5 is above or below the 2 (what we really don't know from this entry). Melodicaly it is important to know. Harmonically not so much. It definitely applies in chords where various inversions are possible as well as in bass lines, where the direction of movement is not so important as in melody.