# Thread: Coordinate geometry: tangent to two circles

1. ## Coordinate geometry: tangent to two circles

consider two circles of radius r1 and r2, centres (x1, y1) and (x2, y2). there are two lines that are tangents to BOTH these circles that DON' T cross the line joining the centres of the circles (clearly there are two more that do cross the line joining the centres of the circles). Anyone know how to calculate the position of the points at which the tangents touch the circles (that is, all four points)

thanks,

2. Originally Posted by FlyinBeaver
consider two circles of radius r1 and r2, centres (x1, y1) and (x2, y2). there are two lines that are tangents to BOTH these circles that DON' T cross the line joining the centres of the circles (clearly there are two more that do cross the line joining the centres of the circles). Anyone know how to calculate the position of the points at which the tangents touch the circles (that is, all four points)

thanks,
These are the "external tangents". Of course, the tangent line is perpendicular to the two radii at the point of tangency and so those radii are parallel.

Set up a coordinate system with origin at the center of one circle, with radius r, and the positive x-axis through the center of the other circle, with radius R. Let $(x_0, 0)$ be the coordinates of the center of the second circle. Taking $\theta$ as the angle the two radii to the points of tangency make with the positive x-axis (because they are parallel this angle is the same for both radii), We can write the coordinates of the point of tangency of the first circle as $x_1= r cos(\theta)$ and $y_1= r sin(\theta)$ and the coordinates of the point of tangency of the second circle as $x_2= R cos(\theta)+ x_0$ and $y_2= R sin(\theta)$.

Then $y_2- y_1= (R- r)sin(\theta)$ and $x_2- x_1= (R-r)cos(\theta)+ x_0$. Therefore the slope of the mutual tangent line is $\frac{(R- r)sin(\theta)}{(R-r)cos(\theta)+ x_0}$. Since that is perpendicular to the radius from the center of the first circle to the point of tangency, which has slope $\frac{y_1}{x_1}= \frac{sin(\theta)}{cos(\theta)}$, we must have

$\frac{(R- r)sin(\theta)}{(R-r)cos(\theta)+ x_0}= -\frac{cos(\theta)}{\sin(\theta)}$.

"Cross multiplying", we have $(R-r)sin^2(\theta)= -(R-r)cos^2(\theta)- x_0 cos(\theta)$ and, using the fact that $sin^2(\theta)+ cos^2(\theta)= 1$, that reduces to $R- r= -x_0 cos(\theta)$ or, finally, $cos(\theta)= -\frac{R-r}{x_0}$.

(If $x_0< |R-r|$, then the the smaller circle would be inside the larger so there would be no mutual tangent.)

We now have $x_1= r cos(\theta)= -\frac{r(R-r)}{x_0}$ and $y_1= r sin(\theta)= \pm r\sqrt{1- cos^2(\theta)}$ $= \pm r\sqrt{1-\frac{(R-r)^2}{x_0^2}}= \pm\frac{r}{x_0}\sqrt{x_0^2- (R-r)^2}$. It is the fact that we can use the positive or negative root that gives two different y values for the same x value and the two different points of "mutual tangency" on the first circle.

Use $x_2= R cos(\theta)+ x_0$ and $y_2= R sin(\theta)$ to get the two points of tangency on the other circle.

3. ## thanks

thanks for the prompt answer, much appreciated!