# 01 - Circle tangent to a given line and center at another given line

**Problem 1**

A circle is tangent to the line 2*x* - *y* + 1 = 0 at the point (2, 5) and the center is on the line *x* + *y* = 9. Find the equation of the circle.

**Solution 1**

*r*is perpendicular to 2

*x*-

*y*+ 1 = 0. Thus, equation of

*r*is

$x + 2y = 2 + 2(5)$

$x + 2y = 12$

**Another way to solve for the equation of r**

$2x - y + 1 = 0$

$y = 2x + 1$

hence, *m* = 2

For line *r*, *m* = -1/2

$y - y_1 = m(x - x_1)$

$y - 5 = -\frac{1}{2}(x - 2)$

$2y - 10 = -x + 2$

$x + 2y = 12$ *okay*

The center (*h*, *k*) is the point of intersection of *r* and *x* + *y* = 9.

From *x* + 2*y* = 12 and *x* + 2 = 9

$x = 6$

$y = 3$

Thus, center (*h*, *k*) = (6, 3)

Length of radius *r* = distance from line 2*x* - *y* + 1 = 0 to center (6, 3)

$r = \dfrac{ax_1 + by_1 + c}{\pm \sqrt{a^2 + b^2}} = \dfrac{2(6) - 3 + 1}{\sqrt{2^2 + 1^2}}$

$r = 2\sqrt{5} ~ \text{units}$

**Equation of the required circle**

$(x - h)^2 + (y - k)^2 = r^2$

$(x - 6)^2 + (y - 3)^2 = (2\sqrt{5})^2$

$(x^2 - 12x + 36) + (y^2 - 6y + 9) = 20$

$x^2 + y^2 - 12x - 6y + 25 = 0$ *answer*