Equation of Straight Line Tangent to Circle

Theorem
The equation of a non-vertical tangent line to a circle centered at $(a,b)$ at any point $P_n = (x_n, y_n)$ on the circle is given by


 * $y - y_n = \dfrac {a - x_n}{y_n - b} \left(x - x_n \right)$

The equations of the vertical tangent lines to a circle are
 * $x = r - a$ for $P = (r-a, \ b)$


 * $x = a - r$ for $P = (a-r, \ b)$

Non-Vertical Tangent Lines
From Equation of a Circle, any circle on the $xy$-plane can be written in the form


 * $(x - a)^2 + (y - b)^2 = r^2$

Where $P = (a,b)$ is the center of the circle, and $r$ is the radius.

We utilize the definition of the derivative as the slope of the tangent line. Taking the derivative WRT $x$ of both sides of the equation we get:


 * $\implies \dfrac {\mathrm dy}{\mathrm dx} = \dfrac {a - x}{y - b}$

This is the slope at any point on the circle. From the slope-intercept form of a line, given any point $(x_n,y_n)$ and the slope $m$, the equation of such a line is,


 * $y - y_n = m \left(x - x_n \right)$

For the tangent line in question,


 * $m = \left.{\dfrac {\mathrm dy}{\mathrm dx}}\right\vert ^{x = x_n} _{y = y_n}$

Thus the equation of the tangent line in question is


 * $y - y_n = \dfrac {a - x_n}{y_n - b} \left(x - x_n \right)$