# How do we find the equation of tangents drawn from (a,b) to x^2+y^2=r^2?

Apr 26, 2018

Let $y = m x + c$ be a tangent to the circle ${x}^{2} + {y}^{2} = {r}^{2}$.

Then it should touch the circle at one point only. Hence the quadratic equation of $x$ obtained from those two equations will have two roots same. This means the discriminant of the quadratic equation of $x$ will be zero.
So
${x}^{2} + {\left(m x + c\right)}^{2} = {r}^{2}$

$\implies {x}^{2} + {m}^{2} {x}^{2} + 2 m c x + {c}^{2} = {r}^{2}$

$\implies \left(1 + {m}^{2}\right) {x}^{2} + 2 m c x + {c}^{2} - {r}^{2} = 0$

Taking $\textcolor{red}{\text{discriminant} = 0}$ we get

$4 {m}^{2} {c}^{2} - 4 \left({c}^{2} - {r}^{2}\right) \left(1 + {m}^{2}\right) = 0$

$\implies {m}^{2} {c}^{2} - \left({c}^{2} - {r}^{2}\right) \left(1 + {m}^{2}\right) = 0$

$\implies {m}^{2} {c}^{2} - {c}^{2} \left(1 + {m}^{2}\right) + {r}^{2} \left(1 + {m}^{2}\right) = 0$

$\implies - {c}^{2} + {r}^{2} \left(1 + {m}^{2}\right) = 0$

$\implies {c}^{2} = {r}^{2} \left(1 + {m}^{2}\right)$

$\implies c = r \sqrt{1 + {m}^{2}}$

Hence equation of any tangent to the given circle will be

$y = m x + r \sqrt{1 + {m}^{2}} \ldots \ldots \left[1\right]$

Now if it is drawn from the givenpoint $\left(a , b\right)$ then

$b = m a + r \sqrt{1 + {m}^{2}}$

$\implies {\left(b - m a\right)}^{2} = {r}^{2} \left(1 + {m}^{2}\right)$

$\implies {b}^{2} - 2 m a b + {m}^{2} {a}^{2} = {r}^{2} + {r}^{2} {m}^{2}$

$\implies {m}^{2} {a}^{2} - {r}^{2} {m}^{2} - 2 m a b + {b}^{2} - {r}^{2} = 0$

$\implies {m}^{2} \left({a}^{2} - {r}^{2}\right) - 2 m a b + \left({b}^{2} - {r}^{2}\right) = 0$

$\implies m = \frac{2 a b \pm \sqrt{4 {a}^{2} {b}^{2} - 4 \left({a}^{2} - {r}^{2}\right) \left({b}^{2} - {r}^{2}\right)}}{2 \left({a}^{2} - {r}^{2}\right)}$

$\implies m = \frac{a b \pm \sqrt{{b}^{2} {r}^{2} + {a}^{2} {r}^{2} - {r}^{4}}}{{a}^{2} - {r}^{2}}$

Substituting these two values of $m$ in equation  we can get equations of two tangents drawn from an external points $\left(a , b\right)$ to the given circle ${x}^{2} + {y}^{2} = {r}^{2}$.