The major scale has its notes numbered from 1 to 7, starting from the root note.
For example, the notes in the C major scale are C D E F G A B, numbered from 1 to 7 respectively; C(1), D(2), E(3) etc.
1 is always the root. In the key of A major the notes are …
A, B, C#, D, E, F#, G#, therefore ..
A(1), B(2), C#(3) etc.
All other scales use the major scale as the reference.
The scale formula for the natural minor scale is …
1, 2, b3, 4, 5, b6, b7
If we look at C major and apply that formula to it we get C natural minor:
C major = C D E F G A B
C natural minor = C D Eb F G Ab Bb
You can see that the natural minor is the same as major but with the 3rd, 6th and 7th notes all flattened.
If we do the same in the key of A, flattening the 3rd, 6th and 7th we would get the following.
A, B, C, D, E, F, G.
All scale formulas work the same, they all reference the major scale. For instance, the melodic minor scale formula is:
1, 2, b3, 4, 5, 6, 7
Therefore if we take the major scale and flatten the 3rd, we get melodic minor, like so.
C melodic minor: C, D, Eb, F, G, A, B
A melodic minor: A, B, C, D. E. F#, G#
Does that make sense?