How can we get mass? Well, how did we determine the mass of the Sun? Or for Jupiter?
And how can we do this for other stars?
Binary stars -- stars
in orbit around a common mass. At least half of all stars are binaries (in
this sense, we may be a minority). Triples, quadruples can even exist!
A visual binary is a star system whose members are far
enough apart, and close enough, that we can see both stars (ie the stars are
> 1" apart). Be careful though -- many optical
doubles exist, stars which appear close to each other on the sky
but which have very different distances (Alcor and
Mizar, for example, in the Big Dipper -- although they themselves
are binaries!).
If we watch the positions of binary stars over many years,
we can plot their relative orbit.
Now what? Use Kepler's 3rd law to determine the total mass of the binary pair. Remember Kepler's 3rd law?
Easy, right? Not as simple as that -- there is no reason
why we should be looking directly onto the orbital plane. In other words,
the apparent orbit is almost never the
true orbit (which is what we need to
do the calculation). We can do a geometric correction for this, though.
What if we don't know the distance? Are we stuck? Not necessarily.
If we have spectra of the stars, so that
we can use the doppler shift to get the velocities of the stars, we can use
that information along with the projected separation and orbital period to
get the combined mass.