# Tangent lines to circles

In Euclidean plane geometry, a tangent line to a circle is a line that touches the circle at exactly one point, never entering the circle's interior. Tangent lines to circles form the subject of several theorems, and play an important role in many geometrical constructions and proofs. Since the tangent line to a circle at a point P is perpendicular to the radius to that point, theorems involving tangent lines often involve radial lines and orthogonal circles.

## Tangent lines to one circle

A tangent line t to a circle C intersects the circle at a single point T. For comparison, secant lines intersect a circle at two points, whereas another line may not intersect a circle at all. This property of tangent lines is preserved under many geometrical transformations, such as scalings, rotation, translations, inversions, and map projections. In technical language, these transformations do not change the incidence structure of the tangent line and circle, even though the line and circle may be deformed.
The radius of a circle is perpendicular to the tangent line through its endpoint on the circle's circumference. Conversely, the perpendicular to a radius through the same endpoint is a tangent line. The resulting geometrical figure of circle and tangent line has a reflection symmetry about the axis of the radius.
No tangent line can be drawn through a point within a circle, since any such line must be a secant line. However, two tangent lines can be drawn to a circle from a point P outside of the circle. The geometrical figure of a circle and both tangent lines likewise has a reflection symmetry about the radial axis joining P to the center point O of the circle. Thus the lengths of the segments from P to the two tangent points are equal. By the secant-tangent theorem, the square of this tangent length equals the power of the point P in the circle C. This power equals the product of distances from P to any two intersection points of the circle with a secant line passing through P.
The tangent line t and the tangent point T have a conjugate relationship to one another, which has been generalized into the idea of pole points and polar lines. The same reciprocal relation exists between a point P outside the circle and the secant line joining its two points of tangency.
If a point P is exterior to a circle with center O, and if the tangent lines from P touch the circle at points T and S, then ∠TPS and ∠TOS are supplementary (sum to 180°).
If a chord TM is drawn from the tangency point T of exterior point P and ∠PTM ≤ 90° then ∠PTM = ½ ∠TOM.

### Cartesian equation

Suppose that the equation of the circle in Cartesian coordinates is $(x-a)^{2}+(y-b)^{2}=r^{2}$ with center at (a, b). Then the tangent line of the circle at (x$_1$, y$_1$) has Cartesian equation
$(x-x_{1})(x_{1}-a)+(y-y_{1})(y_{1}-b)=0$
This can be proved by taking the implicit derivative of the circle. Say that the circle has equation of $(x-a)^{2}+(y-b)^{2}=r^{2},$ and we are finding the slope of tangent line at (x$_1$, y$_1$) where $(x_{1}-a)^{2}+(y_{1}-b)^{2}=r^{2}.$ We begin by taking the implicit derivative with respect to x:
${\begin{aligned}{\overset{}x-a)^{2}+(y-b)^{2}&=r^{2}\\[4pt]2(x-a)+2(y-b){\frac {dy}{dx}}&=0\\[2pt]{\frac {dy}{dx}}&=-{\frac {x_{1}-a}{y_{1}-b}}\end{aligned}}$
Now that we have the slope of the tangent line, we can substitute the slope and the coordinate of the tangency point into the line equation y = kx + m.
${\begin{aligned}y&=-{\frac {x_{1}-a}{y_{1}-b}}x+y_{1}+x_{1}{\frac {x_{1}-a}{y_{1}-b}}\\y-y_{1}&=(x_{1}-x){\frac {x_{1}-a}{y_{1}-b}}\\[2pt](y-y_{1})(y_{1}-b)&=-(x-x_{1})(x_{1}-a)\\[8pt](x-x_{1})(x_{1}-a)+(y-y_{1})(y_{1}-b)&=0\end{aligned}}$

### Compass and straightedge constructions

It is relatively straightforward to construct a line t tangent to a circle at a point T on the circumference of the circle:
* A line a is drawn from O, the center of the circle, through the radial point T;
* The line t is the perpendicular line to a.
Thales' theorem may be used to construct the tangent lines to a point P external to the circle C:
* A circle is drawn centered on the midpoint M of the line segment OP, having diameter OP, where O is again the center of the circle C (cyan).
* The intersection points T$_1$ and T$_2$ of the circle C and the new circle are the tangent points for lines passing through P, by the following argument (tan).
The line segments OT$_1$ and OT$_2$ are radii of the circle C; since both are inscribed in a semicircle, they are perpendicular to the line segments PT$_1$ and PT$_2$, respectively. But only a tangent line is perpendicular to the radial line. Hence, the two lines from P and passing through T$_1$ and T$_2$ are tangent to the circle C.
Another method to construct the tangent lines to a point P external to the circle using only a straightedge:
* Draw any three different lines through the given point P that intersect the circle twice.
* Let A$_1$, A$_2$, B$_1$, B$_2$, C$_1$, C$_2$ be the six intersection points, with the same letter corresponding to the same line and the index 1 corresponding to the point closer to P.
* Let D be the point where the lines A$_1$B$_2$ and A$_2$B$_1$ intersect,
* Similarly E for the lines B$_1$C$_2$ and B$_2$C$_1$.
* Draw a line through D and E.
* This line meets the circle at two points, F and G.
* The tangents are the lines PF and PG.

### With analytic geometry

Let $P=(a,b)$ be a point of the circle with equation $x^{2}+y^{2}=r^{2}.$ The tangent at P has equation $ax+by=r^{2},$ because P lies on both the curves and ${\vec {OP}}=(a,b)^{T}$ is a normal vector of the line. The tangent intersects the x-axis at point $P_{0}=(x_{0},0)$ with $ax_{0}=r^{2}.$
Conversely, if one starts with point $P_{0}=(x_{0},0),$ then the two tangents through P$_0$ meet the circle at the two points $P_{1/2}=(a,b_{\pm })$ with $a={\frac {r^{2}}{x_{0}}},\qquad b_{\pm }=\pm {\sqrt {r^{2}-a^{2}}}=\pm {\frac {r}{x_{0}}}{\sqrt {x_{0}^{2}-r^{2}}}.$ Written in vector form: ${\binom {a}{b_{\pm }}}={\frac {r^{2}}{x_{0}}}{\binom {1}{0}}\pm {\frac {r}{x_{0}}}{\sqrt {x_{0}^{2}-r^{2}}}{\binom {0}{1}}\ .$
If point $P_{0}=(x_{0},y_{0})$ lies not on the x-axis: In the vector form one replaces x$_0$ by the distance d$_0$=√(x$_0$$^2$+y$_0$$^2$){\textstyle d_{0}={\sqrt {x_{0}^{2}+y_{0}^{2}}}} and the unit base vectors by the orthogonal unit vectors e$^→$$_1$=1/d$_0$ (x$_0$/y$_0$), e$^→$$_2$=1/d$_0$ (−y$_0$/x$_0$).{\textstyle {\vec {e}}_{1}={\frac {1}{d_{0}}}{\binom {x_{0}}{y_{0}}}, \ {\vec {e}}_{2}={\frac {1}{d_{0}}}{\binom {-y_{0}}{x_{0}}}.} Then the tangents through point P$_0$ touch the circle at the points ${\binom {x_{1/2}}{y_{1/2}}}={\frac {r^{2}}{d_{0}^{2}}}{\binom {x_{0}}{y_{0}}}\pm {\frac {r}{d_{0}^{2}}}{\sqrt {d_{0}^{2}-r^{2}}}{\binom {-y_{0}}{x_{0}}}.$
* For d$_0$ < r no tangents exist.
* For d$_0$ = r point P$_0$ lies on the circle and there is just one tangent with equation $x_{0}x+y_{0}y=r^{2}.$
* In case of d$_0$ > r there are 2 tangents with equations $x_{1}x+y_{1}y=r^{2},\ x_{2}x+y_{2}y=r^{2}.$
Relation to circle inversion: Equation $ax_{0}=r^{2}$ describes the circle inversion of point $(x_{0},0).$
Relation to pole and polar: The polar of point $(x_{0},0)$ has equation $xx_{0}=r^{2}.$

### Tangential polygons

A tangential polygon is a polygon each of whose sides is tangent to a particular circle, called its incircle. Every triangle is a tangential polygon, as is every regular polygon of any number of sides; in addition, for every number of polygon sides there are an infinite number of non-congruent tangential polygons.

#### Tangent quadrilateral theorem and inscribed circles

A tangential quadrilateral ABCD is a closed figure of four straight sides that are tangent to a given circle C. Equivalently, the circle C is inscribed in the quadrilateral ABCD. By the Pitot theorem, the sums of opposite sides of any such quadrilateral are equal, i.e.,
${\overline {AB}}+{\overline {CD}}={\overline {BC}}+{\overline {DA}}.$
This conclusion follows from the equality of the tangent segments from the four vertices of the quadrilateral. Let the tangent points be denoted as P (on segment AB), Q (on segment BC), R (on segment CD) and S (on segment DA). The symmetric tangent segments about each point of ABCD are equal: ${\begin{aligned}{\overline {BP}}={\overline {BQ}}=b,&\quad {\overline {CQ}}={\overline {CR}}=c,\\{\overline {DR}}={\overline {DS}}=d,&\quad {\overline {AS}}={\overline {AP}}=a.\end{aligned}}$ But each side of the quadrilateral is composed of two such tangent segments
${\begin{aligned}&{\overline {AB}}+{\overline {CD}}=(a+b)+(c+d)\\=&{\overline {BC}}+{\overline {DA}}=(b+c)+(d+a)\end{aligned}}$
proving the theorem.
The converse is also true: a circle can be inscribed into every quadrilateral in which the lengths of opposite sides sum to the same value.
This theorem and its converse have various uses. For example, they show immediately that no rectangle can have an inscribed circle unless it is a square, and that every rhombus has an inscribed circle, whereas a general parallelogram does not.

## Tangent lines to two circles

For two circles, there are generally four distinct lines that are tangent to both (bitangent) – if the two circles are outside each other – but in degenerate cases there may be any number between zero and four bitangent lines; these are addressed below. For two of these, the external tangent lines, the circles fall on the same side of the line; for the two others, the internal tangent lines, the circles fall on opposite sides of the line. The external tangent lines intersect in the external homothetic center, whereas the internal tangent lines intersect at the internal homothetic center. Both the external and internal homothetic centers lie on the line of centers (the line connecting the centers of the two circles), closer to the center of the smaller circle: the internal center is in the segment between the two circles, while the external center is not between the points, but rather outside, on the side of the center of the smaller circle. If the two circles have equal radius, there are still four bitangents, but the external tangent lines are parallel and there is no external center in the affine plane; in the projective plane, the external homothetic center lies at the point at infinity corresponding to the slope of these lines.

### Outer tangent

The red line joining the points (x$_3$, y$_3$) and (x$_4$, y$_4$) is the outer tangent between the two circles. Given points (x$_1$, y$_1$), (x$_2$, y$_2$) the points (x$_3$, y$_3$), (x$_4$, y$_4$) can easily be calculated with help of the angle α:
${\begin{aligned}x_{3}&=x_{1}\pm r\sin \alpha \\y_{3}&=y_{1}\pm r\cos \alpha \\x_{4}&=x_{2}\pm R\sin \alpha \\y_{4}&=y_{2}\pm R\cos \alpha \\\end{aligned}}$
Here R and r notate the radii of the two circles and the angle α can be computed using basic trigonometry. You have α = γ − β with ${\begin{aligned}\gamma &=-{\text{atan2}}\left({y_{2}-y_{1}},{x_{2}-x_{1}}\right)\\[2pt]\beta &=\pm \arcsin \left({\frac {R-r}{\sqrt {(x_{2}-x_{1})^{2}+(y_{2}-y_{1})^{2}}}}\right)\end{aligned}}$ where atan2 the 2-argument arctangent.
The distances between the centers of the nearer and farther circles, O$_2$ and O$_1$ and the point where the two outer tangents of the two circles intersect (homothetic center), S respectively can be found out using similarity as follows: ${\frac {dr}{r_{1}-r_{2}}}$ Here, r can be r$_1$ or r$_2$ depending upon the need to find distances from the centers of the nearer or farther circle, O$_2$ and O$_1$. d is the distance O$_1$O$_2$ between the centers of two circles.

### Inner tangent

An inner tangent is a tangent that intersects the segment joining two circles' centers. Note that the inner tangent will not be defined for cases when the two circles overlap.

### Construction

The bitangent lines can be constructed either by constructing the homothetic centers, as described at that article, and then constructing the tangent lines through the homothetic center that is tangent to one circle, by one of the methods described above. The resulting line will then be tangent to the other circle as well. Alternatively, the tangent lines and tangent points can be constructed more directly, as detailed below. Note that in degenerate cases these constructions break down; to simplify exposition this is not discussed in this section, but a form of the construction can work in limit cases (e.g., two circles tangent at one point).

#### Synthetic geometry

Let O$_1$ and O$_2$ be the centers of the two circles, C$_1$ and C$_2$ and let r$_1$ and r$_2$ be their radii, with r$_1$ > r$_2$; in other words, circle C$_1$ is defined as the larger of the two circles. Two different methods may be used to construct the external and internal tangent lines.

##### External tangents

A new circle C$_3$ of radius r$_1$ − r$_2$ is drawn centered on O$_1$. Using the method above, two lines are drawn from O$_2$ that are tangent to this new circle. These lines are parallel to the desired tangent lines, because the situation corresponds to shrinking both circles C$_1$ and C$_2$ by a constant amount, r$_2$, which shrinks C$_2$ to a point. Two radial lines may be drawn from the center O$_1$ through the tangent points on C$_3$; these intersect C$_1$ at the desired tangent points. The desired external tangent lines are the lines perpendicular to these radial lines at those tangent points, which may be constructed as described above.

##### Internal tangents

A new circle C$_3$ of radius r$_1$ + r$_2$ is drawn centered on O$_1$. Using the method above, two lines are drawn from O$_2$ that are tangent to this new circle. These lines are parallel to the desired tangent lines, because the situation corresponds to shrinking C$_2$ to a point while expanding C$_1$ by a constant amount, r$_2$. Two radial lines may be drawn from the center O$_1$ through the tangent points on C$_3$; these intersect C$_1$ at the desired tangent points. The desired internal tangent lines are the lines perpendicular to these radial lines at those tangent points, which may be constructed as described above.

#### Analytic geometry

Let the circles have centres c$_1$ = (x$_1$, y$_1$) and c$_2$ = (x$_2$, y$_2$) with radius r$_1$ and r$_2$ respectively. Expressing a line by the equation $ax+by+c=0,$ with the normalization $a^{2}+b^{2}=1,$ then a bitangent line satisfies: ${\begin{aligned}ax_{1}+by_{1}+c&=r_{1}\\ax_{2}+by_{2}+c&=r_{2}\\\end{aligned}}$ Solving for (a, b, c) by subtracting the first from the second yields $a\Delta x+b\Delta y=\Delta r,\qquad (1)$ where $\Delta x=x_{2}-x_{1},\quad \Delta y=y_{2}-y_{1}$ and $\Delta r=r_{2}-r_{1}$ for the outer tangent or $\Delta r=r_{2}+r_{1}$ for the inner tangent.
If d=√((Δx)$^2$+(Δy)$^2$){\textstyle d={\sqrt {(\Delta x)^{2}+(\Delta y)^{2}}}} is the distance from c$_1$ to c$_2$ we can normalize by $X={\frac {\Delta x}{d}},\quad Y={\frac {\Delta y}{d}},\quad R={\frac {\Delta r}{d}}$ to simplify equation (1), resulting in the following system of equations: ${\begin{aligned}aX+bY&=R,\\a^{2}+b^{2}&=1;\end{aligned}}$ solve these to get two solutions (k = ±1) for the two external tangent lines: ${\begin{aligned}a&=RX-kY{\sqrt {1-R^{2}}}\\b&=RY+kX{\sqrt {1-R^{2}}}\\c&=r_{1}-(ax_{1}+by_{1})\end{aligned}}$ Geometrically this corresponds to computing the angle formed by the tangent lines and the line of centers, and then using that to rotate the equation for the line of centers to yield an equation for the tangent line. The angle is computed by computing the trigonometric functions of a right triangle whose vertices are the (external) homothetic center, a center of a circle, and a tangent point; the hypotenuse lies on the tangent line, the radius is opposite the angle, and the adjacent side lies on the line of centers.
(X, Y) is the unit vector pointing from c$_1$ to c$_2$, while R is cos θ where θ is the angle between the line of centers and a tangent line. sin θ is then $\pm {\sqrt {1-R^{2}}}$ (depending on the sign of θ, equivalently the direction of rotation), and the above equations are rotation of (X, Y) by ±θ using the rotation matrix: ${\begin{pmatrix}R&\mp {\sqrt {1-R^{2}}}\\\pm {\sqrt {1-R^{2}}}&R\end{pmatrix}}$
* k = 1 is the tangent line to the right of the circles looking from c$_1$ to c$_2$.
* k = −1 is the tangent line to the right of the circles looking from c$_2$ to c$_1$.
The above assumes each circle has positive radius. If r$_1$ is positive and r$_2$ negative then c$_1$ will lie to the left of each line and c$_2$ to the right, and the two tangent lines will cross. In this way all four solutions are obtained. Switching signs of both radii switches k = 1 and k = −1.

#### Vectors

In general the points of tangency t$_1$ and t$_2$ for the four lines tangent to two circles with centers v$_1$ and v$_2$ and radii r$_1$ and r$_2$ are given by solving the simultaneous equations:
${\begin{aligned}(t_{2}-v_{2})\cdot (t_{2}-t_{1})&=0\\(t_{1}-v_{1})\cdot (t_{2}-t_{1})&=0\\(t_{1}-v_{1})\cdot (t_{1}-v_{1})&=r_{1}^{2}\\(t_{2}-v_{2})\cdot (t_{2}-v_{2})&=r_{2}^{2}\\\end{aligned}}$
These equations express that the tangent line, which is parallel to $t_{2}-t_{1},$ is perpendicular to the radii, and that the tangent points lie on their respective circles.
These are four quadratic equations in two two-dimensional vector variables, and in general position will have four pairs of solutions.

### Degenerate cases

Two distinct circles may have between zero and four bitangent lines, depending on configuration; these can be classified in terms of the distance between the centers and the radii. If counted with multiplicity (counting a common tangent twice) there are zero, two, or four bitangent lines. Bitangent lines can also be generalized to circles with negative or zero radius. The degenerate cases and the multiplicities can also be understood in terms of limits of other configurations – e.g., a limit of two circles that almost touch, and moving one so that they touch, or a circle with small radius shrinking to a circle of zero radius.
* If the circles are outside each other ($d>r_{1}+r_{2}$), which is general position, there are four bitangents.
* If they touch externally at one point ($d=r_{1}+r_{2}$) – have one point of external tangency – then they have two external bitangents and one internal bitangent, namely the common tangent line. This common tangent line has multiplicity two, as it separates the circles (one on the left, one on the right) for either orientation (direction).
* If the circles intersect in two points ($|r_{1}-r_{2}|<d<r_{1}+r_{2}$), then they have no internal bitangents and two external bitangents (they cannot be separated, because they intersect, hence no internal bitangents).
* If the circles touch internally at one point ($d=|r_{1}-r_{2}|$) – have one point of internal tangency – then they have no internal bitangents and one external bitangent, namely the common tangent line, which has multiplicity two, as above.
* If one circle is completely inside the other ($d<|r_{1}-r_{2}|$) then they have no bitangents, as a tangent line to the outer circle does not intersect the inner circle, or conversely a tangent line to the inner circle is a secant line to the outer circle.
Finally, if the two circles are identical, any tangent to the circle is a common tangent and hence (external) bitangent, so there is a circle's worth of bitangents.
Further, the notion of bitangent lines can be extended to circles with negative radius (the same locus of points, $x^{2}+y^{2}=(-r)^{2},$ but considered "inside out"), in which case if the radii have opposite sign (one circle has negative radius and the other has positive radius) the external and internal homothetic centers and external and internal bitangents are switched, while if the radii have the same sign (both positive radii or both negative radii) "external" and "internal" have the same usual sense (switching one sign switches them, so switching both switches them back).
Bitangent lines can also be defined when one or both of the circles has radius zero. In this case the circle with radius zero is a double point, and thus any line passing through it intersects the point with multiplicity two, hence is "tangent". If one circle has radius zero, a bitangent line is simply a line tangent to the circle and passing through the point, and is counted with multiplicity two. If both circles have radius zero, then the bitangent line is the line they define, and is counted with multiplicity four.
Note that in these degenerate cases the external and internal homothetic center do generally still exist (the external center is at infinity if the radii are equal), except if the circles coincide, in which case the external center is not defined, or if both circles have radius zero, in which case the internal center is not defined.

### Applications
#### Belt problem

The internal and external tangent lines are useful in solving the belt problem, which is to calculate the length of a belt or rope needed to fit snugly over two pulleys. If the belt is considered to be a mathematical line of negligible thickness, and if both pulleys are assumed to lie in exactly the same plane, the problem devolves to summing the lengths of the relevant tangent line segments with the lengths of circular arcs subtended by the belt. If the belt is wrapped about the wheels so as to cross, the interior tangent line segments are relevant. Conversely, if the belt is wrapped exteriorly around the pulleys, the exterior tangent line segments are relevant; this case is sometimes called the pulley problem.

## Tangent lines to three circles: Monge's theorem

For three circles denoted by C$_1$, C$_2$, and C$_3$, there are three pairs of circles (C$_1$C$_2$, C$_2$C$_3$, and C$_1$C$_3$). Since each pair of circles has two homothetic centers, there are six homothetic centers altogether. Gaspard Monge showed in the early 19th century that these six points lie on four lines, each line having three collinear points.

## Problem of Apollonius

Many special cases of Apollonius's problem involve finding a circle that is tangent to one or more lines. The simplest of these is to construct circles that are tangent to three given lines (the LLL problem). To solve this problem, the center of any such circle must lie on an angle bisector of any pair of the lines; there are two angle-bisecting lines for every intersection of two lines. The intersections of these angle bisectors give the centers of solution circles. There are four such circles in general, the inscribed circle of the triangle formed by the intersection of the three lines, and the three exscribed circles.
A general Apollonius problem can be transformed into the simpler problem of circle tangent to one circle and two parallel lines (itself a special case of the LLC special case). To accomplish this, it suffices to scale two of the three given circles until they just touch, i.e., are tangent. An inversion in their tangent point with respect to a circle of appropriate radius transforms the two touching given circles into two parallel lines, and the third given circle into another circle. Thus, the solutions may be found by sliding a circle of constant radius between two parallel lines until it contacts the transformed third circle. Re-inversion produces the corresponding solutions to the original problem.

## Generalizations

The concept of a tangent line to one or more circles can be generalized in several ways. First, the conjugate relationship between tangent points and tangent lines can be generalized to pole points and polar lines, in which the pole points may be anywhere, not only on the circumference of the circle. Second, the union of two circles is a special (reducible) case of a quartic plane curve, and the external and internal tangent lines are the bitangents to this quartic curve. A generic quartic curve has 28 bitangents.
A third generalization considers tangent circles, rather than tangent lines; a tangent line can be considered as a tangent circle of infinite radius. In particular, the external tangent lines to two circles are limiting cases of a family of circles which are internally or externally tangent to both circles, while the internal tangent lines are limiting cases of a family of circles which are internally tangent to one and externally tangent to the other of the two circles.
In Möbius or inversive geometry, lines are viewed as circles through a point "at infinity" and for any line and any circle, there is a Möbius transformation which maps one to the other. In Möbius geometry, tangency between a line and a circle becomes a special case of tangency between two circles. This equivalence is extended further in Lie sphere geometry.
Radius and tangent line are perpendicular at a point of a circle, and hyperbolic-orthogonal at a point of the unit hyperbola. The parametric representation of the unit hyperbola via radius vector is p(a) = (cosh a, sinh a). The derivative of p(a) points in the direction of tangent line at p(a), and is ${\tfrac {dp}{da}}=(\sinh a,\cosh a).$ The radius and tangent are hyperbolic orthogonal at a since p(a) and ⁠${\tfrac {dp}{da}}$⁠ are reflections of each other in the asymptote y = x of the unit hyperbola. When interpreted as split-complex numbers (where j j = +1), the two numbers satisfy $jp(a)={\tfrac {dp}{da}}.$