Condition of tangency:
The line y = mx+c is tangent to a circle x² + y² = a² if the length of the intercept is zero.
That means 2√([[a²(1+m²)-c²]/(1+m²) ] = 0
=> a²(1+m²)-c² = 0
=> c = ±a√(1+m²)
The equation of a tangent of slope m to the circle x² + y² = a² is
Y = mx±a√(1+m²) (Value of c from tangent condition).
The coordinate of the point of contact are (±am/√(1+m²), - or +a/√(1+m²)
The equation of a tangent at the point (x1,y1) to the circle x² + y²+2gx+2fy+c = 0 is
xx1 + yy1 +g(x+x1)+f(y+y1) +c = 0