Answer
In fact you have to say that the earth and the moon both move in their common gravitational field, and that of the sun and the other planets. But let’s just look at the Earth and the Moon first, without all the rest. They then both move in elliptical orbits around their common center of gravity. The location of that center of gravity is determined by the mass ratio of the Earth and the Moon. The Earth is 81 times heavier than the Moon, and therefore the Earth-center of mass distance is also 81 times smaller than the Moon-Meuse center distance. Of course, they also revolve with the same period around that center of mass.
The center of mass is located at 4700 km from the center of the earth, so still within the earth’s surface. But the Earth swings from left to right and back in its orbit around the sun every 28 days.
Incidentally, the planets revolve around the sun, but the sun is also mainly moved by Jupiter and Saturn. Every 12 years (Jupiter’s period) the sun revolves around a point approximately on its surface. The influence of Saturn is smaller, but of the same order of magnitude.
And another thing: this effect is one of the most commonly used ways to discover massive planets around other stars. One sees, by means of the Doppler shift, a star perform a very minute, just measurable periodic movement.
So your question was in fact much broader than just the earth and the sun.
Answered by
prof.dr. Paul Hellings
Department of Mathematics, Fac. IIW, KU Leuven
Old Market 13 3000 Leuven
https://www.kuleuven.be/
.