The major scale (and most other scales) has eight notes - an octave. Probably the simplest major scale is C-major. It is unique in that it is the only major scale not to feature accidentals (sharps or flats.)
http://meta.wikipedia.com/upload/c_maj.png Fig 1. The C-major scale
Constructing major scales
Analysing scales with sharps
Scales and key signatures are closely linked in music. It is necessary to construct a key signature - consisting of a number of sharps or flats - in order to know which accidentals a particular major scale will have. An easy, but time consuming, way to do this would be to use the pattern of tone/tone/semitone/etc... given above. If we choose to write the scale of D-major, we know immediately that the scale begins on a D. The next note will be a tone above - an E. The note after that will also be a tone above, however it is not simply an F as would seem obvious. Because the difference between an E and an F is actually a semitone (look on a piano keyboard, there is no 'black note' in-between them) it is necessary to raise the F to become an F-sharp to achieve a difference of a whole tone.
This could be followed to create a whole scale, with all the sharps (or with a different scale, flats) put correctly in. However a cleverer way of constructing scales arises from analysing patterns in the whole series of major scales. Starting on the scale of C-major, there exists no sharps or flats. If you start a new scale on the 5th of C-major - G-major - you will find one sharp, augmenting the F. Starting the scale on the 5th of G major (a D) it will be necessary to put 2 sharps in - an F-sharp and a C-sharp. Writing this pattern out for all the scales looks like this:
C maj - 0 sharps G maj - 1 sharp - F# (meaning F-sharp) D maj - 2 sharps - F#, C# A maj - 3 sharps - F#, C#, G# E maj - 4 sharps - F#, C#, G#, D# B maj - 5 sharps - F#, C#, G#, D#, A# F# maj - 6 sharps - F#, C#, G#, D#, A#, E# 7 sharps - F#, C#, G#, D#, A#, E#, B#
In this table it can be seen that for each new scale (starting on the fifth of the previous scale) it is necessary to add a new sharp. The order of sharps which need to be added follows: F#, C#, G#, D#, A#, E#, B#. This pattern of the sharps can be easily remembered through the use of the mnemonic:
F C G D A E B Father Charles Goes Down And Ends Battle
Looking closer, the last accidental added matches the tonic (first note) of the scale two-fifths before it (in this table, two lines up.) A useful rule for use in recognising major scales with sharps is that the tonic is also always one note above the last sharp.
Analysing major scales with flats
A similar table can be constructed for major scales with flats in them. In this case each new scale starts on the 5th below the previous one:
C min - 0 flats F min - 1 flat - Bb (meaning B-flat) Bb min - 2 flats - Bb Eb Eb min - 3 flats - Bb Eb Ab Ab min - 4 flats - Bb Eb Ab Db Db min - 5 flats - Bb Eb Ab Db Gb Gb min - 6 flats - Bb Eb Ab Db Gb Cb 7 flats - Bb Eb Ab Db Gb Cb Fb
Here, a similar pattern can be recognised, each new scale keeps all the flats of the previous scale but adds a new one following the sequence: Bb, Eb, Ab, Db, Gb, Cb, Fb. Interestingly this is the direct inverse of the pattern of sharps given above. Luckily (!) the mnemonic can now be reversed to form the sentence:
B E A D G C F Battle Ends And Down Goes Charles' Father.
Again there is a similar, but reversed, relationship between tonics and accidentals. The tonic matches the second to last flat added on.
The circle of fifths
The information gathered from analysing scales can be used in constructing the circle of fifths:
This is a useful way of finding key signatures of major scales. Starting clockwise from the top C each new letter represents a new scale, a fifth above the one before it. This means that each new scale (clockwise) requires an extra sharp to be added to its key signature. The exact sharps to be added are found by reading off the letters starting from the F (to the left of the C.) For example, if we needed to know how many, and which, sharps a scale of E major requires, we note that E is at position 4 - it requires 4 sharps. These sharps are (reading off from F): F#, C#, G#, D#. If you were faced with a key signature of 5 sharps, you would count off 5 from the top to arrive at B - it is the scale of B major.
http://meta.wikipedia.com/upload/b_maj.png Fig 2. The b-major scale
Similarly, key signatures with flats can be created. Each new letter starting from F represents a new scale, and the position of the letter indicates how many flats it has. The actual flats are read anticlockwise from the Bb on position 2. Ab is on position 2, so it has 2 flats: Bb and Eb.