Here are all the patterns of the Major Scale:
According to the table below,
|Root||A||A# Bb||B||C||C# Db||D||D# Eb||E||F||F# Gb||G||G# Ab|
|n = fret||5 17||6 18||7 19||8 20||9||10||11||0 12||1 13||2 14||3 15||4 16|
for C Major or A Minor, n=8.
Each pattern corresponds to a mode. The idea is that the major and minor scales can be played starting at any of their steps. The easiest to learn are, as we saw, the Aeolian (Minor), the Dorian, the Phrygian, the Locrian and the Mixolydian.