Stars close to Earth appear to move relative to the background of more distant stars due to the Earth's motion around the Sun, observing that star 6 months apart appears to have a different background of stars. This apparent motion (which is not "true") is called stellar parallax.

Parallax allows you to establish another unit of measurement for distances, the parsec. The parsec (pc) is defined as the distance from which an astronomical unit subtend an angle of one arc second (1 ”) when positioned perpendicular to the line of sight. Therefore, 1 pc = 206 265 au = 3.26 light years Due to the enormous distance of all the stars, the observed parallaxes are all less than 1 ”.

As a consequence of this, the following approximation can be made:

tanP = P, then d = a / P (in radians).

Therefore the distance to a star is inversely proportional to its parallax. If this distance is expressed in parsecs and the angle in arc seconds, the equation remains very simple: d = 1 / P.

Knowing the angle we will know the distance.