I was wondering how would you find the equation of a tangent line of a circle if you are given the equation of the circle and a point on the line. In general:
Given an equation of a circle, $(x-h)^2 + (y-k)^2 = r^2$, and a line $l$ that contains the point $P(a,b)$ and is tangent to the circle, find the equation of $l$.
From my work on the problem, I knew that there are three cases:
- $P(a,b)$ is in the interior of the circle.
- $P(a,b)$ is on the circle.
- $P(a,b)$ is in the exterior of the circle.
Obviously, the first one can be discarded since the line $l$ can't be a tangent if $P$ is in the interior the circle.
For the second case, this implies that the point of tangency is $P$. Therefore, in order to find the equation for $l$, I need to find its slope by finding the negative reciprocal of the slope $m$ of the line that contains the center of the circle, $(h,k)$, and the point $P$, since they and line $l$ are perpendicular to each other (in other words, find $\dfrac{-1}{m}$). After that, simply substitute $\dfrac{-1}{m}$ and $(a,b)$ in the point-slope form of the equation of a line.
I was particularly interested in the third case, where the point $P$ is outside the circle.
An example problem that I made was this:
Find the equation of a line tangent to a circle, whose equation is $(x-4)^2 + (y-4)^2 = 9$, if the point $P(1,-1)$ is on the tangent line.
From a rough sketch I made, it seems that there are two lines that I need to find the equation of. Using the sketch, the first tangent line was just the line $x=1$. My problem lies in finding the second one.
I let point $T(a,b)$ be the point of tangency of line $l$ and the circle. Then, I tried finding the distance $d$ between $(1,-1)$ and $(a,b)$ by employing the Pythagorean Theorem on the right triangle that is formed by the points $P(1,-1), T(a,b)$, and the center of the circle, $C(4,4)$, since the tangent is perpendicular to the radius.
After solving, what I got was $$d = 5$$ From then on, I was stuck. I tried doing the same method I used in solving the second case, but it seemed that I looped back to where I started.
I tried another method by letting $y_1 = m(x-1)-1$ be the equation for the second tangent line and letting $y_2 = \dfrac{-1}{m}(x-4)+4$ be the line that is perpendicular to it at the point of tangency, and setting them equal to each other. But, I got overwhelmed and thought that there may be a better method.
I still don't know the answer to it now, or if it's even solvable (it seems that it is, though). But if you managed to figure it out, I would gladly appreciate it if you showed me how!
After some time, I found the answer to the example question! My insight was to draw another circle, with its center at $P(1,-1)$ and find all points that intersect with the given circle, then find the slope of the points accordingly.
First, draw a diagram: the circle $(x-4)^2 + (y-4)^2 = 9$; its center $C(4,4)$; the point $P(1,-1)$; and the two lines containing $P$ that are tangent to the given circle at the point of tangencies, $T_1$ and $T_2$. Our goal is to find the coordinates of $T_1$ and $T_2$ to find the slope of each line.
Next, find $PT_2$.* We do this by finding $PC$ and $CT_2$ (which is the radius), then solve the right triangle:
$(PT_2)^2 + (CT)^2 = (PC)^2$
$(PT_2)^2 + (3)^2 = (\sqrt{(1-4)^2 + (-1-4)^2})^2 = (-3)^2 + (-5)^2 $
$(PT_2)^2 + 9 = 9 + 25 $
$(PT_2)^2 = 25$
$PT_2 = 5$
Now, we find the equation of the circle with center at $P$ and with radius 5: $(x-1)^2 + (y+1)^2 = 25$
We find the intersections of these two circles by solving this system of equations:
$$\begin{cases} (x-4)^2 + (y-4)^2 = 9 \\ (x-1)^2 + (y+1)^2 = 25 \\ \end{cases} $$
Which boils down to this quadratic equation:
$$ 17x^2 - 109x + 92 = 0 $$
Solving it would yield:
$$ x = \frac{109 \pm 75}{34} $$
or
$$ x = 1 \qquad or \qquad x = \frac{92}{17} $$
Whose respective corresponding y-coordinates are
$$ y = 4 \qquad or\qquad y = \frac{23}{17} $$
So, we have $T_1 = (1,4)$ and $T_2 = (\frac{92}{17}, \frac{23}{17})$. We just need to find the slopes of the lines and find their equations.
The slope of line $PT_1$ is undefined, so its equation is $$x = 1$$
The slope of line $PT_2$ is $\frac{\frac{23}{17} - (-1)}{\frac{92}{17} - 1} = \frac{40}{75} = \frac{8}{15}$. Its equation is therefore:
$$ y+1 = \frac{8}{15}(x - 1) $$
Check:
Thank you guys for helping me out!
Notes:
*Although, you could find $PT_1$, which is easier since $T_1 = (1,4)$; you would get the same distance regardless because of the Two-Tangent Theorem in geometry.