Rational Slope

Pass a line (blue) with rational slope a/b through the point (0,1) on a unit circle. The intersection (green circle) of that line with the circle will always have rational coordinates (x,y). At first this seems counterintuitive since a circle involves π and many other irrational descriptors (trig functions). But consider the right triangle (red) formed by the point (x,y). There are infinitely many of these triangles in the unit circle - some of which are Pythagorean triples composed of rational numbers (e.g. 3-4-5 triangle).

Slope: a b

MATHS

Referring to the diagram, the equation for the blue line is
\begin{align} {y} = {m}{x} + 1 \end{align} where m is a rational slope \begin{align} {m} = \frac{a}{b} \end{align} The intersection point (green circle) is on the unit circle, so \begin{align} {y}^2 + {x}^2 = 1 \end{align} Squaring the line equation \begin{align} {y}^2 = ({m}{x}+1)^2 = {m}^2{x^2}+2{m}{x}+1 \end{align} then substitute into the unit circle equation \begin{align} {m}^2{x^2}+2{m}{x}+1+{x}^2=1 \end{align} Now solving for x \begin{align} {x} = \frac{-2{m}}{{m}^2+1} \end{align} and then y \begin{align} {y} = \frac{-2{m}^2}{{m}^2+1}+1 \end{align} But since m=a/b, and some algebraic simpflication \begin{align} {x} = \frac{-2{a}{b}}{{a}^2+{b}^2} \end{align} and \begin{align} {y} = \frac{{b}^2-{a}^2}{{a}^2+{b}^2} \end{align} Hence, the resulting intersection point is rational since a and b are whole numbers.