# How can I measure the distance between two stars? [closed]

So I am doing a write-up for a world setting set in our galaxy. I know the distance from Earth to the different stars in Light Years. However I am now trying to figure out how to measure the distance between these stars.

Specifically the distance between star A and star B while knowing their position with respect to Earth.

For instance distance between Alpha Lyrae and Delta Pavonis; for reference Delta Pavonis is 19.22 Light Years away from Earth. While Alpha Lyrae is 25.30 Light Years away.

I am no astronomer, so I hope the community here can give me some answers.

• Isn't this just a trigonometry problem? Treat the three objects (the Earth, and the two stars involved) as the three corners of a triangle. – user Jun 9 '19 at 12:13
• @aCVn It's a fairly complex trig problem and first you need to convert the data into something people, and spreadsheet programs, find manageable. Right Ascension is a bit of a pain to change over to digital degrees worse yet the radians that most software works in as is the declination recorded in most sources since it's in degrees minutes seconds format. It took about 20-30 hours to get out to 25LY from raw Wikipedia data to a finished relative distance table for all the plotted stars, I'd do more but the data tables are formatted differently beyond that distance. – Ash Jun 9 '19 at 18:17
• Use the calculator at Celestial Wonders to compte the angle between the stars. Or use the formula $\theta = \arccos (\sin \delta_1 \sin \delta_2 + \cos \delta_1 \cos \delta_2 \cos (\alpha_1 - \alpha_2))$. The use the cosines theorem to compute the distance. – AlexP Jun 9 '19 at 19:50
• This is a basic maths question. Or an astronomy question. OP, you should consider asking over in one of the appropriate forums. Just because you have a "world set in our galaxy" doesn't make this a worldbuilding problem. Also, you really should remove the hard science tag: you're not actually asking a hard-science question. Am voting to close. – elemtilas Jun 9 '19 at 23:11
• @Obelisk Really, the question does demonstrate a lack of research. Three dimensional trigonometry isn't sixth grade material, but it isn't quite rocket surgery, either, and the data to computer from is readily available if you ask the correct questions in the right form. – Zeiss Ikon Jun 10 '19 at 13:15

## 4 Answers

You need to measure the angle between the two stars, as seen from the Earth:

To do this, you can use an inclinometer, which measures the angle between the ground and where you are looking. Find the angle to the first star, then the angle to the second star and subtract the smaller of the two from the larger to find the difference.

Once you've done that, the distance between the two stars is:

$$\sqrt{a^2+b^2-2ab\cos{(x)}}$$

Where $$a$$ is the distance to star A, $$b$$ is the distance to star B, and $$x$$ is the angle in between them. This can be in degrees, radians or any other unit as long as you use the appropriate angle mode when calculating the cosine. The unit for the distance is the same as the unit of distance between the stars and Earth.

Or, without the notation:

1. Square the distances to each star and add the squares together.
2. Multiply the distances together and then multiply the result by 2 times the cosine of the angle between the stars.
3. Subtract the result of step 2 from the result of step 1.
4. Take the square root of the result of step 3. This is the distance between the two stars.

This works because of the law of cosines, which demonstrates how to find distances and angles in non-right-angled triangles.

• Best of the two answers as of this comment's date. There's a simpler way with Pythagoras and algebra though. +1 – A Rogue Ant. Jun 10 '19 at 0:22
• I appreciate this answer far more than the other. – Obelisk Jun 10 '19 at 5:53

It's basic trigonometry. In this case, the rule is known as the law of cosines:

c² = a² + b² - 2ab cos(C)

You already know distances "a" and "b", so all you need to do is measure angle "C", which is a simple observation from Earth, in order to calculate distance "c".

From Math Is Fun.

Sorry this has taken a while to bring up to Hard Science standards but here we go.

If you want to calculate the distance between a set of stars you're interested in first you need to create Sol relative XYZ co-ordinates for all the stars you're interested in. This requires the distance from Sol, the right ascension, the declination and some trigonometry, once you have those co-ordinates you can create a simple table that compares the various co-ordinate sets and gives relative distances between any given pair of stars.

Assuming you're working from a data table like this one from Wikipedia the first thing you need to do is convert the Right Ascension and Declination into usable digital figures, for most software based computation that's actually Radians but degrees are an important intermediary step in my opinion, because the conversion is relatively simple and so errors are easier to spot. Right ascension is tricky-ish to convert at first but basically one hour of Right Ascension is 15° so divide the seconds(s) by sixty, add that to the minutes(m) divide the result by sixty again and add it to the hours(h), finally multiple that by 15 and you have the digital degrees equivalent for the Right Ascension figure. Declination is easier divide the seconds of arc(") by sixty add to the minutes of arc(') divide the result by sixty and tack it onto the degrees(°) that gives you the digital degrees of Declination. To get the Radians needed for Microsoft Excel or similar divide those degrees numbers by 2π. The distance from Sol can be in LY or Parsecs at the discretion of the mapper.

To get the XYZ co-ordinates from this data requires further working, in these equations RA is the Right Ascension, DEC is the Declination and D is the distance from Sol. With that in mind:

X= D x cosRA x cosDEC

Y= D x sinRA x cosDEC

and Z = D x sinDEC

Once you have a data sheet of XYZ co-ordinates you can build a table of the relative distances between all the stars you're interested in. This table compares the relative position of the stars it does this by taking the square root of the sum of the products of the differences between the individual co-ordinates. In other words each cell of the table has the following equation:

√ ((X1-X2)2+(Y1-Y2)2+(Z1-Z2)2).

Where 1 is the co-ordinate for the star entered in the left-hand column of the table and 2 is the data for the star on the horizontal header for that particular cell, the table is similar to this one showing distances between towns in New Zealand's North Island:

But with entries for Alpha Centauri, Proxima Centauri, Barnard's Star and so on. To find the distance between any two stars all you need do is reference them by name in the correct column and row in the table.

I have such a table for all the stars out to 25.5LY from Sol and the working data floating around somewhere, let me know if you want it.

• @L.Dutch That better? – Ash Jun 10 '19 at 14:23
• I would be interested in seeing that table for all stars out to 25.5 LY from Sol thanks. :) – Obelisk Jun 12 '19 at 7:27

The easy way:

USE WOLFRAM ALPHA

Simply type "distance between [star A] and [star B]" and it provides the answer in a second (see screen dump below).

Incidently, the distance between Sirius and Capella is almost exactly 12 parsecs - the shortest way to do the Kessel Run, according to Han Solo.

• You. You sir have just made my day. Thank you very much. :D – Obelisk Jun 12 '19 at 7:25