A closer look at Barycenter
Two bodies in orbit both move around a common center of mass.
The center lies closer to the more massive body and can fall inside it. Astronomers use the motion on both sides to compare masses.
On a seesaw, the heavier rider sits closer to the pivot for balance. The distances from an orbital barycenter follow the same mass ratio. For the surrounding ideas, see Stellar mass and Transit timing variations.
OpenStax · Astronomy 2e · 18.2 Measuring Stellar Masses · NASA · What Is a Barycenter? · Two-body problem in general relativity on Wikipedia
Want to learn more about Barycenter? Barycenter on Wikipedia.

