# What is the equation for a line tangent to a circle from a point outside the circle?

I need to know the equation for a line tangent to a circle and through a point outside the circle. I have found a number of solutions which involve specific numbers for the circles equation and the point outside but I need a specific solution, i.e., I need an equation which gives me the $m$ and the $b$ in $f(x) = mx + b$ for this line.

• Does this circle have the Origin as its center? – imranfat Nov 8 '13 at 16:30
• The circles origin can be anything. (its variable) – user229801 Nov 8 '13 at 16:32

HINT:

Let $C(a,b)$ be the point outside the circle

Equation of any line passing through $C$ will be $$\frac{y-b}{x-a}=m\implies mx -y+b-am=0$$ where $m$ is the gradient.

Now, for tangency, the distance of the tangent from the center of the circle will be equal to the radius of the circle.

This condition will give us two values of $m$

As $C$ is outside the circle, we shall have two distinct real values of $m,$ resulting in two real tangents

Alternatively, you find the intersection of the given circle with the line by eliminating $x$ or $y$ to form a quadratic equation of the surviving variable .

For tangency, both roots must be same i.e., the discriminant must be $0$

• This really wasn't helpful... The gradient of the line will be the derivative of the circle at the point of tangency. I still don't know how to find the point of tangency. – user229801 Nov 8 '13 at 16:42
• @user229801, to know the gradient, you need that point. – lab bhattacharjee Nov 8 '13 at 16:44
• yes, that's what I said. – user229801 Nov 8 '13 at 16:46
• @user229801, please find the edited answer. In the first method, you will readily get the equation of the two tangents, do you know how to find the intersection of a circle with aline – lab bhattacharjee Nov 8 '13 at 16:47
• Thanks for your willingness to help but I've figured out a way of doing it with trigonometry which is more appropriate to what I'm trying to do. – user229801 Nov 8 '13 at 16:55

Given a circle $x^2 + y^2 = r^2$ and the point (a,b)

The line from the origin to (a,b) is $y = \frac{b}{a} * x$

The line and the circle intersect at $( \frac{a*r}{\sqrt{a^2+b^2}}, \frac{b*r}{\sqrt{a^2+b^2}} )$

The slope of the tangent is $\frac{-a}{b}$

The equation of the tangent is

$y - \frac{b*r}{\sqrt{a^2+b^2}} = \frac{-a}{b} * (x - \frac{a*r}{\sqrt{a^2+b^2}} )$

$y = \frac{-a}{b} x + \frac{\sqrt{a^2+b^2}}{b} r$

The key point is see that the line that is tangent to the circle and intersects your point forms a triangle with a right angle.