Trigonometry is used to measure the distance to stars in the solar system, and the motion of nearby stars compared to more distant stars. The method of measuring distance in space is called trigonometric parallax.
When an object is seen from two different vantage points, the object appears to change positions compared to the background objects. For instance, when you place your finger in front of your face and look at it with your left eye then your right eye, the position of your finger appears to change compared to the distant objects in the background. The effect is called parallax, or trigonometric parallax in astronomy. It is so named because the lengths of the sides of a triangle and its angles are used to calculate the lengths of all the sides of the triangle. To measure the distance in outer space, a baseline is used to determine the amount of shift of an object relative to a fixed background, such as very distant stars. The baseline in astronomy is the distance between the Earth and the sun, or astronomical unit (AU). An astronomical unit, which is the equivalent of roughly 93 million miles, is used as the baseline distance because it makes it easier to measure the angles of distant objects in space.