Sub topic 13
The circle in coordinates
This chapter assumes you know the distance formula, the equation of a line in general form, and the point-to-line distance formula. It covers the circle's equation, how to read centre and radius from it, and how to place a point or a line relative to a circle.
The standard equation
A circle is the set of all points at a fixed distance r (the radius) from a fixed point (h, k) (the centre). The distance formula turns this definition into an equation. A point (x, y) is on the circle when its distance from (h, k) equals r. Squaring both sides removes the square root:
(x - h)² + (y - k)² = r²
If the centre is the origin, this becomes x² + y² = r².
Example: centre (2, -3) and radius 5 give (x - 2)² + (y + 3)² = 25. Note the sign flip. The factor y + 3 means k = -3.
The general equation
Expanding the standard form gives:
x² + y² + 2gx + 2fy + c = 0
Here the centre is (-g, -f) and the radius is √(g² + f² - c). Compare the two forms: 2g = -2h, 2f = -2k, and c = h² + k² - r².
To read a circle off a general equation:
- Check that the coefficients of x² and y² are equal, and that there is no xy term. If the x² coefficient is not 1, divide the whole equation by it.
- Halve the x coefficient and change its sign to get h. Do the same for y to get k.
- Compute r² = h² + k² - c.
Example: x² + y² - 6x + 4y - 12 = 0. Here 2g = -6, so g = -3 and h = 3. Also 2f = 4, so f = 2 and k = -2. Then r² = 9 + 4 + 12 = 25, so r = 5.
def circle_from_general(g, f, c):
# x^2 + y^2 + 2gx + 2fy + c = 0
r_squared = g ** 2 + f ** 2 - c
if r_squared < 0:
return None # no real circle
return (-g, -f), r_squared ** 0.5
print(circle_from_general(-3, 2, -12))This prints ((3, -2), 5.0).
When the equation is not a circle
The value g² + f² - c decides what the equation represents.
| g² + f² - c | What the equation represents |
|---|---|
| Positive | A real circle of radius √(g² + f² - c) |
| Zero | A single point, the centre (a circle of radius 0) |
| Negative | No real points |
CAT questions often use this to find the range of a parameter. For example, x² + y² - 4x + 6y + k = 0 is a real circle when 4 + 9 - k > 0, so k < 13.
Finding a circle from given information
Choose the form that fits what you know.
- Centre and radius known: use the standard form directly.
- Diameter endpoints known: the centre is the midpoint of the endpoints, and the radius is half the distance between them. A faster form exists: for endpoints (x₁, y₁) and (x₂, y₂), the circle is (x - x₁)(x - x₂) + (y - y₁)(y - y₂) = 0. This works because a point P on the circle sees the diameter at a right angle, so the dot product of the vectors from P to the two endpoints is zero.
- Three points known: substitute each point into x² + y² + 2gx + 2fy + c = 0 and solve the three linear equations for g, f, c. Alternatively, find the circumcentre as the intersection of two perpendicular bisectors.
- Tangent to an axis: a circle tangent to the x-axis has |k| = r. A circle tangent to the y-axis has |h| = r. A circle tangent to both axes in the first quadrant has h = k = r.
- Passes through the origin: the constant c in the general form is 0.
Example: the circle with diameter from A(1, 2) to B(7, 8) is (x - 1)(x - 7) + (y - 2)(y - 8) = 0. Expanded, this is x² + y² - 8x - 10y + 23 = 0. The centre is (4, 5), and the radius is √(16 + 25 - 23) = √18, which is half of AB = √72.
A point relative to a circle
Define the power of a point P(x₁, y₁) with respect to the circle S: x² + y² + 2gx + 2fy + c = 0 as:
S₁ = x₁² + y₁² + 2gx₁ + 2fy₁ + c
This equals (distance from P to the centre)² - r². So its sign tells you where P lies.
| Sign of S₁ | Position of P |
|---|---|
| Negative | Inside the circle |
| Zero | On the circle |
| Positive | Outside the circle |
Example: for x² + y² - 6x + 4y - 12 = 0, test (3, 1). S₁ = 9 + 1 - 18 + 4 - 12 = -16, so the point is inside. Test (8, -2). S₁ = 64 + 4 - 48 - 8 - 12 = 0, so the point is on the circle.
When P is outside, √S₁ is the length of the tangent from P to the circle. This follows from the Pythagorean theorem: the tangent length squared equals the squared distance to the centre minus r².
A line relative to a circle
Compare the perpendicular distance d from the centre to the line with the radius r.
For a secant, the chord cut off has length 2√(r² - d²). The right triangle formed by the radius, the perpendicular from the centre, and half the chord gives this.
def line_circle(h, k, r, a, b, c):
# circle centre (h, k), radius r; line ax + by + c = 0
d = abs(a * h + b * k + c) / (a ** 2 + b ** 2) ** 0.5
if d < r:
return "secant", 2 * (r ** 2 - d ** 2) ** 0.5 # chord length
if d == r:
return "tangent", 0
return "no intersection", None
print(line_circle(0, 0, 5, 3, 4, -15))
print(line_circle(0, 0, 5, 3, 4, -10))The first line is at distance 3 from the origin, and the second is also at distance 2. Wait: 15/5 = 3 and 10/5 = 2. So both are secants. The outputs are ('secant', 8.0) and ('secant', 9.165...). For a tangent, use 3x + 4y - 25 = 0, whose distance is exactly 5.
The same comparison works for two circles. With centre distance D and radii r₁ and r₂:
| Condition | Relationship | Column | Column |
|---|---|---|---|
| D > r₁ + r₂ | Separate, four common tangents | ||
| D = r₁ + r₂ | Touch externally, three common tangents | ||
| r₁ - r₂ | < D < r₁ + r₂ | Intersect at two points, two common tangents | |
| D = | r₁ - r₂ | Touch internally, one common tangent | |
| D < | r₁ - r₂ | One inside the other, none |
Tangents
For a circle with centre C, the tangent at a point P on the circle is perpendicular to the radius CP. That gives a direct method: find the slope of CP, take the negative reciprocal, and write the line through P.
Example: the circle x² + y² = 25 and the point P(3, 4). The slope of CP is 4/3, so the tangent has slope -3/4. The tangent is y - 4 = -(3/4)(x - 3), which simplifies to 3x + 4y = 25.
There is also a shortcut. For x² + y² = r², the tangent at (x₁, y₁) is xx₁ + yy₁ = r². For the general form, replace x² with xx₁, y² with yy₁, 2gx with g(x + x₁), 2fy with f(y + y₁):
xx₁ + yy₁ + g(x + x₁) + f(y + y₁) + c = 0
For a line y = mx + c' to touch x² + y² = r², the condition is c'² = r²(1 + m²). This is the same as d = r with the distance formula.
The circle through the intersection of a line and a circle
The family of curves S + λL = 0 passes through every point where circle S = 0 and line L = 0 meet. For a given λ, it is a circle. This is the quickest way to write a circle through two known intersection points. Substitute a third point to fix λ.
Similarly, S₁ - S₂ = 0 for two intersecting circles gives the line through their common points, the radical axis. Subtracting the equations cancels the x² and y² terms.
Common errors
- Forgetting to flip the sign when reading the centre from (x - h)² + (y - k)². A term (x + 2)² means h = -2.
- Using the general form when the x² and y² coefficients are not 1. Divide first, or the radius formula is wrong.
- Writing r instead of r² on the right side.
- Using the radius formula as √(g² + f² + c). The sign of c is negative.
- Stating "tangent" when the discriminant or distance comparison shows a secant. Check both d and r numerically.
Worked CAT-style example
Find the length of the chord cut from the circle x² + y² - 4x - 6y - 12 = 0 by the line x + y = 3.
- The circle has g = -2, f = -3, c = -12. The centre is (2, 3) and r² = 4 + 9 + 12 = 25, so r = 5.
- Write the line as x + y - 3 = 0. The distance from the centre is |2 + 3 - 3| / √2 = 2/√2 = √2.
- Since √2 < 5, the line is a secant. The chord length is 2√(25 - 2) = 2√23.
Exercise
The circle x² + y² - 2x + 4y + k = 0 is tangent to the line 3x - 4y + 7 = 0... find k.
Show answer
Complete the square: centre (1, -2) and r² = 1 + 4 - k = 5 - k. The distance from the centre to the line is |3 + 8 + 7| / 5 = 18/5. Tangency needs r = 18/5, so r² = 324/25 and k = 5 - 324/25 = (125 - 324)/25 = -199/25.
Exercise
Find the length of the tangent from P(7, 1) to the circle x² + y² - 6x + 4y - 12 = 0.
Show answer
Compute S₁ = 49 + 1 - 42 + 4 - 12 = 0. The point lies on the circle, so the tangent length is 0. Check: this circle has centre (3, -2) and r = 5, and the distance from P is √(16 + 9) = 5.
Exercise
Write the circle with diameter endpoints (2, 3) and (-4, 5), and give its radius.
Show answer
Using (x - 2)(x + 4) + (y - 3)(y - 5) = 0 gives x² + 2x - 8 + y² - 8y + 15 = 0, that is x² + y² + 2x - 8y + 7 = 0. The centre is (-1, 4) and r² = 1 + 16 - 7 = 10, so r = √10. Check: the distance between the endpoints is √(36 + 4) = √40 = 2√10.