with coordinates belongs to the unit circle if . The point is rational if and are rational numbers, that is, if there are coprime integers such that By multiplying both members by , one can see that the rational points on the circle are in one-to-one correspondence with the primitive Pythagorean triples. The unit circle may also be defined by a parametric equation Euclid's formula for Pythagorean triples and the inverse relationship mean that, except for , a point on the circle is rational if and only if the corresponding value of is a rational number. Note that is also the tangent of half of the angle that is opposite the triangle side of length . Stereographic approach There is a correspondence between points on the unit circle with rational coordinates and primitive Pythagorean triples. At this point, Euclid's formulae can be derived either by methods of trigonometry or equivalently by using the stereographic projection. For the stereographic approach, suppose that ′ is a point on the -axis with rational coordinates Then, it can be shown by basic algebra that the point has coordinates This establishes that each rational point of the -axis goes over to a rational point of the unit circle. The converse, that every rational point of the unit circle comes from such a point of the -axis, follows by applying the inverse stereographic projection. Suppose that is a point of the unit circle with and rational numbers. Then the point ′ obtained by stereographic projection onto the -axis has coordinates which is rational. In terms of algebraic geometry, the algebraic variety of rational points on the unit circle is birational to the affine line over the rational numbers. The unit circle is thus called a rational curve, and it is this fact which enables an explicit parameterization of the (rational number) points on it by means of rational functions. Pythagorean triangles in a 2D lattice A 2D lattice is a regular array of isolated points where if any one point is chosen as the Cartesian origin (0, 0), then all the other points are at where and range over all positive and negative integers. Any Pythagorean triangle with triple can be drawn within a 2D lattice with vertices at coordinates , and . The count of lattice points lying strictly within the bounds of the triangle is given by for primitive Pythagorean triples this interior lattice