In the rest frame of the Local Group ( LG ) , the total momentum of the Milky Way ( MW ) and Andromeda ( M31 ) should balance to zero . We use this fact to constrain new solutions for the solar motion with respect to the LG centre-of-mass , the total mass of the LG , and the individual masses of M31 and the MW . Using the set of remote LG galaxies at > 350 kpc from the MW and M31 , we find that the solar motion has amplitude V _ { \odot } = 299 \pm 15 { ~ { } km~ { } s ^ { -1 } } in a direction pointing toward galactic longitude l _ { \odot } = 98.4 ^ { \circ } \pm 3.6 ^ { \circ } and galactic latitude b _ { \odot } = -5.9 ^ { \circ } \pm 3.0 ^ { \circ } . The velocities of M31 and the MW in this rest frame give a direct measurement of their mass ratio , for which we find \log _ { 10 } ( M _ { M 31 } / M _ { MW } ) = 0.36 \pm 0.29 . We combine these measurements with the virial theorem to estimate the total mass within the LG as M _ { LG } = ( 2.5 \pm 0.4 ) \times 10 ^ { 12 } ~ { } { M } _ { \sun } . Our value for M _ { LG } is consistent with the sum of literature values for M _ { MW } and M _ { M 31 } . This suggests that the mass of the LG is almost entirely located within the two largest galaxies rather than being dispersed on larger scales or in a background medium . The outskirts of the LG are seemingly rather empty . Combining our measurement for M _ { LG } and the mass ratio , we estimate the individual masses of the MW and M31 to be M _ { MW } = ( 0.8 \pm 0.5 ) \times 10 ^ { 12 } ~ { } { M } _ { \sun } and M _ { M 31 } = ( 1.7 \pm 0.3 ) \times 10 ^ { 12 } ~ { } { M } _ { \sun } , respectively . Our analysis favours M31 being more massive than the MW by a factor of \sim 2.3 , and the uncertainties allow only a small probability ( 9.8 % ) that the MW is more massive . This is consistent with other properties such as the maximum rotational velocities , total stellar content , and numbers of globular clusters and dwarf satellites , which all suggest that M _ { M 31 } / M _ { MW } > 1 .