If you have a string (I'll use a C string), then touching it at certain fractions of its length and pucking it gives harmonics, also called overtones or "ring tones". Namely:
Certain notes sound good together. The most obvious are C,E,G, forming a C major cord. It is natural to extend this to C7diminished, that is C, G, E, B♭, which are the sounds produced by 1/1, 1/3, 1/5, and 1/7 of a string. And even to a C9 chord, which are the 1/1, 1/3, 1/5, 1/7, and 1/9 tones (C, G, E, B♭, D).
Now, a major scale has notes C,D,E,F,G,A,B,C. We've got natural definitions for C, D, E and G, but what about F, A, B? Songs strongly favor four chords: C major, G major, F major, and A minor. So it would be good to define the scale so that those four chords sound right. Is that possible? Yes, those chords define all the notes in a major scale uniquely and they do not define any notes that are not in a major scale.
The ratio of C to G is 1/3. The ratio of F to C should be the same, so if C is 1/1 of a string, F should be 3/1 of a string, and also 3/2 and 3/4 and 3/8 of a string. The ratio between F and A should be the same as the ratio of C to E. E is 1/5 of C, so A should be 1/5 of 3, that is 3/5. The ratio of G to D should be 1/3 just as it is from C to G, placing D at 1/9 (that's what it was based on ring tones too), so D is also 2/9 and 4/9 and 8/9. B is 1/5 of G, that is, 1/15, 2/15, 4/15, 8/15. That way all three major chords have the same ratios for their intervals: 15:12:10. A-minor has to be happy reusing notes from the F-major and C-major scales. Since E was defined relative to C and A was defined relative to F, A to E is a 3:2 ratio, just like F:C and C:G.
This gives us a full major scale:
But why is A-minor defined by choosing notes from F-major and C-major? There is another naturally presented minor chord, namely G minor, with G, B♭, D, well defined by overtones of C. These two definitions of minor agree that the ratio of a fifth is 3:2, but they differ in their middle note significantly, by a ratio of 36:35. For comparison, B:C is 16:15, so this disagreement over the middle note of a minor is nearly a quarter step in size, with the diminished third a quarter step less than the minor third. An argument in favor of the 3/5 definition of A in A-minor is that A-minor is often adjacent to C-major and F-major in songs, while G-minor is not. Another argument is that B♭:D from overtones has a ratio of 9:7, which needs bigger numbers than the 5:4 ratio of C:E. I tried playing the two minor intervals on my cello and I couldn't hear the difference.
There are other chords to choose from, and they come up with different answers for different notes. For example, B♭ should be to F as F is to C, making B♭ 9, and also 9/2, 9/4, 9/8, 9/16, for the B♭ major chord. But overtones of C already placed B♭ at 4/7, at least when it is used in a C7diminished chord. Those have ratio 63:64. There are also two ways of defining E♭, one as the minor third in the C-minor chord (5/6), and the other as the 1/7th ringtone of F (6/7), so part of F7diminished, ratio 35:36 again. Another difference, D should be 9/10 in the D-minor chord, but it should be 8/9 in the G-major chord, ratio 81:80.
The first ratio I see that I have not seen in music is the 1/11 overtone, which is somewhere between F and F#. Perhaps this shows up in hymns as an F# in an otherwise C-based piece, which was very popular several centuries ago, for example in "The Star-Spangled Banner" and "Russia" and Martin Luther's "Ein Feste Burg".
There are of course Pythagorean tunings and Bach's equitempered tunings, which purposely land somewhere in the middle of these various definitions and usually get away with it because our ears have been trained to be not all that accurate. Although they seem theoretically impure, I can't tell the difference until the discord gets so big that I can tell the difference. And equitempered tunings prevent the discord from ever getting that big no matter what wild chord progressions you go through. So equitempered tuning wins, unless you're sure you're only going to be playing four chords.
(These sorts of articles usually end with some reference to cosmos harmony and universal laws. Fine, the orbits of Neptune and Pluto are in a 3::2 resonance, that's a major fifth. And the moons of Saturn are in 1:2:4 resonance, that's the same note but in three different octaves. It's a G#. Mother nature loves math. But you already knew that.)