system
Given the following post, respond as if you're commenting on Reddit:
human
How do we know how far away distant objects in space are?
gpt
There are several ways in which we can achieve this and it is never a simple task. For closer objects such as those in our galaxy we use parallax. Parallax uses trigonometry to measure distances, if you have two points of known distance, then you can measure the third by drawing an imaginary triangle. For example the Sun is often used to make this measurement, as the earth moves around the sun, there should be a displacement due to a change in perspective, by measuring this displacement and using some trigonometry we can measure the distance of the third object.
I don't know how to link, but Google parallax. 

Measurements of further objects are more difficult. Parallax using the sun and the earth is not useful because the displacement is not noticeable at greater distances. For objects outside of our galaxy, we usually use several points to reference to estimate their distance. One of the most common ways are through the use of standard candles. Standard candles are bodies of known distances. Cepheid stars are a class of stars used as standard candles (perhaps the most useful type). Their brightness varies over time such that they pulsate. The period of their pulsation is directly correlated to their size. So by observing the period of pulsation of a Cepheid star, we know how big it is. If we know how big it is, we know how bright it should look. If we know how bright it should look, and we compare it to how brightly it looks to us, we can estimate their distance (further things are dimmer). Once we have a known distance, we can then use it as a point of reference for measuring other things.