Urgent - Find the equation of the lines tangent to a circle Question: 'Find the equation of the lines from point $P(0,6)$ tangent to the circle $x^2+y^2=4x+4$.
So what I did firstly is rewrite it to the form $(x-2)^2 + y^2 = 8$, and I saw that point $P$ is not on the circle. I learned that the equation of the line tangent to the circle $x^2+y^2=r^2$ from the point $P(a,b)$ is $xa+yb=r^2$
$ xa+yb=4x+4$
$x.o+y.6=2x+2.0 +4$ (This is the step I don't understand)
$6y=2x+4$
$y=\dfrac{1}{3}x + \dfrac{2}{3}$
So basically, my question is: Why did the $4x+4$ change into the $2x+4$?
 A: The equation of any line passing through $(0,6)$ can be written as $\frac{y-6}{x-0}=m$ where $m$ is the gradient, So, $y=mx+6$
If the $(h,k)$ be the point of contact, then $k=mh+6$ and $h^2+k^2-4h-4=0$
Replacing $k$ in the 2nd equation, $h^2+(mh+6)^2-4h-4=0$ 
or $(1+m^2)h^2+2h(6m-2)+32=0$, it is a quadratic equation in $h,$
For tangency, both the root should be same, so, $4(6m-2)^2=4\cdot(1+m^2)32$
$(6m-2)^2=(1+m^2)32, (3m-1)^2=8(1+m^2) \implies m^2-6m-7=0$
So, $m=7,-1$
If $m=7,\frac{y-6}{x-0}=7, 7x-y+6=0$
If $m=-1,\frac{y-6}{x-0}=-1, x+y-6=0$
A: Your circle has center $c = (2,0)$ and radius $r = 2\sqrt{2}$.
If $(x,y)$ is on the circle, the line $$
  (x,y) + (y - c_y,c_x - x)t
$$
is a tagent, since $(y - c_y, c_x - x)\cdot(x - c_x, y - c_y) = 0$. Now, since you additionally want $p = (p_x,p_y)$ to be on that line, you get the equation $$
  (x,y) + (y - c_y,c_x - x)t = (p_x,p_y)
$$
Alternatively, you can directly characterize the lines by requiring that $(x,y) - (p_x,p_y)$ is normal to the radius through $(x,y)$, i.e. to $(x-c_x,y-c_y)$. That way, you get $$
  (x-p_x,y-p_y)\cdot(x-x_c,y-c_y) = 0
$$
Note that these equation don't really describe the line, they describe a second point $(x,y)$, beside $P$, on the line. But once you have that, the line is easily described. Also note that these equation themselves don't force $(x,y)$ to lie on the circle. They're always meant to be used together with your original equation for the circle.
