Unit 2, lesson 19

Circles, Distance, and Midpoints

How the distance and midpoint formulas follow from a right triangle, how they give the equation of a circle, and how completing the square finds the center and radius from an expanded equation.

  • Theory part 37
  • Practice part 38
  • Quadratics, Circles, and Roots

A compass draws a circle by keeping the pencil a fixed distance from the pin. To turn that into an equation you need a way to measure the distance between two points of the plane, and the Pythagorean theorem gives one. Once you have it, the equation of a circle simply says that a point sits at the right distance from the center.

Key terms

Distance formula

Definition The distance between the points P1=(x1,y1)P_1 = (x_1, y_1) and P2=(x2,y2)P_2 = (x_2, y_2) in the coordinate plane is

d(P1,P2)=(x2−x1)2+(y2−y1)2.\begin{aligned} &d(P_1, P_2) \\[0.4em] &\quad = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}. \end{aligned}

It comes from the Pythagorean theorem applied to the right triangle whose legs have lengths ∣x2−x1∣\lvert x_2 - x_1 \rvert and ∣y2−y1∣\lvert y_2 - y_1 \rvert and whose hypotenuse is the segment from P1P_1 to P2P_2. When the two points lie on one horizontal or vertical line there is no triangle, and the formula gives the plain gap ∣x2−x1∣\lvert x_2 - x_1 \rvert or ∣y2−y1∣\lvert y_2 - y_1 \rvert, as it should. The order of the points does not matter, because squaring removes the signs.

In plain words Go across, then go up. The straight path between the points is the hypotenuse of that triangle.

Example From (1,2)(1, 2) to (4,6)(4, 6) the legs are 33 and 44, so

d=(4−1)2+(6−2)2=9+16=5.\begin{aligned} d &= \sqrt{(4 - 1)^2 + (6 - 2)^2} \\[0.4em] &= \sqrt{9 + 16} = 5. \end{aligned}

Midpoint formula

Definition The midpoint of the segment with endpoints (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2) is

M=(x1+x22,y1+y22).M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}\right).

It lies on the segment, and its distance to each endpoint is half the length of the segment.

In plain words Average the first coordinates and average the second coordinates.

Example For the endpoints (−2,5)(-2, 5) and (4,−1)(4, -1) the midpoint is

M=(−2+42,5+(−1)2)=(1,2).\begin{aligned} M &= \left(\frac{-2 + 4}{2}, \frac{5 + (-1)}{2}\right) \\[0.8em] &= (1, 2). \end{aligned}

The distance formula confirms it. From (1,2)(1, 2) to either endpoint the distance is 9+9=32\sqrt{9 + 9} = 3\sqrt{2}, half of the full length 626\sqrt{2}.

Circle, center and radius

Definition Let CC be a point of the plane and rr a positive real number. The circle with center CC and radius rr is the set of all points PP in the plane with d(P,C)=rd(P, C) = r. The word radius also names any segment from the center to a point of the circle. A diameter is a segment through the center with both endpoints on the circle. Every diameter has length 2r2r, and the center is the midpoint of every diameter. The center itself is not a point of the circle.

In plain words A circle is every point at one fixed distance from a center. It is only the rim, not the disk inside it.

Example Take the center (2,−1)(2, -1) and radius 33. The points (5,−1)(5, -1), (2,2)(2, 2), (−1,−1)(-1, -1) and (2,−4)(2, -4), three units right, up, left and down from the center, all lie on the circle. The point (4,1)(4, 1) does not. Its distance from the center is 4+4=8≈2.83\sqrt{4 + 4} = \sqrt{8} \approx 2.83, which is less than 33, so it lies inside the circle.

Standard equation

Definition A point (x,y)(x, y) lies on the circle with center (h,k)(h, k) and radius r>0r > 0 exactly when

(x−h)2+(y−k)2=r2.(x - h)^2 + (y - k)^2 = r^2.

This is the standard equation of the circle. It is the distance formula with both sides squared, which loses nothing because a distance and rr are both nonnegative. Points with (x−h)2+(y−k)2<r2(x - h)^2 + (y - k)^2 < r^2 lie inside the circle and points with (x−h)2+(y−k)2>r2(x - h)^2 + (y - k)^2 > r^2 lie outside. The unit circle x2+y2=1x^2 + y^2 = 1 has center (0,0)(0, 0) and radius 11.

In plain words The horizontal gap squared plus the vertical gap squared equals the radius squared. The signs inside the parentheses are the opposites of the coordinates of the center.

Example The circle with center (−3,4)(-3, 4) and radius 55 has the equation

(x+3)2+(y−4)2=25.(x + 3)^2 + (y - 4)^2 = 25.

It passes through the origin, since (0+3)2+(0−4)2=9+16=25(0 + 3)^2 + (0 - 4)^2 = 9 + 16 = 25.

General equation

Definition Expanding a standard equation and moving everything to one side gives an equation of the form

x2+y2+Dx+Ey+F=0x^2 + y^2 + Dx + Ey + F = 0

with real numbers DD, EE and FF, called the general equation of the circle. Conversely, every equation of this form describes one of three sets.

  • When D2+E2−4F>0D^2 + E^2 - 4F > 0 it is the circle with center (−D2,−E2)\left(-\frac{D}{2}, -\frac{E}{2}\right) and radius 12D2+E2−4F\frac{1}{2}\sqrt{D^2 + E^2 - 4F}.
  • When D2+E2−4F=0D^2 + E^2 - 4F = 0 it is the single point (−D2,−E2)\left(-\frac{D}{2}, -\frac{E}{2}\right).
  • When D2+E2−4F<0D^2 + E^2 - 4F < 0 no point of the plane satisfies it.

These formulas come from completing the square, as the next section shows. An equation Ax2+Ay2+Dx+Ey+F=0Ax^2 + Ay^2 + Dx + Ey + F = 0 with A≠0A \ne 0 can first be divided by AA. In this form x2x^2 and y2y^2 have the same coefficient and there is no xyxy term, which is how you recognize a possible circle.

In plain words The expanded form hides the center and the radius. It is often what you get after some algebra, so you need a way back to the standard form.

Example Expanding the circle from the previous example gives

x2+6x+9+y2−8y+16=25,that isx2+y2+6x−8y=0.\begin{gathered} x^2 + 6x + 9 + y^2 - 8y + 16 = 25, \\[0.4em] \text{that is} \\[0.4em] x^2 + y^2 + 6x - 8y = 0. \end{gathered}

Here D=6D = 6, E=−8E = -8 and F=0F = 0. The formulas give back the center (−3,4)(-3, 4) and the radius 1236+64=5\frac{1}{2}\sqrt{36 + 64} = 5.

Completing the square

Definition To find the center and radius from a general equation, group the xx terms and the yy terms, move the constant to the other side, and complete the square in each variable with

x2+Dx=(x+D2)2−D24,x^2 + Dx = \left(x + \frac{D}{2}\right)^2 - \frac{D^2}{4},

adding the same amounts to both sides. The result has the form (x−h)2+(y−k)2=s(x - h)^2 + (y - k)^2 = s. It is a circle exactly when s>0s > 0, and then its radius is s\sqrt{s}.

In plain words It is the same move as for a quadratic function, done twice, once for xx and once for yy.

Example Start from x2+y2−4x+6y−12=0x^2 + y^2 - 4x + 6y - 12 = 0. Half of −4-4 is −2-2 and half of 66 is 33, so add 44 and 99 to both sides.

(x2−4x+4)+(y2+6y+9)=12+4+9.\begin{aligned} &(x^2 - 4x + 4) + (y^2 + 6y + 9) \\[0.4em] &\quad = 12 + 4 + 9. \end{aligned}

This is (x−2)2+(y+3)2=25(x - 2)^2 + (y + 3)^2 = 25, the circle with center (2,−3)(2, -3) and radius 55. As a check, the point (5,1)(5, 1) satisfies the original equation, since 25+1−20+6−12=025 + 1 - 20 + 6 - 12 = 0, and it is 55 units from the center.

Check yourself

  1. A diameter of a circle has endpoints (−1,2)(-1, 2) and (5,10)(5, 10). Find the standard equation of the circle.
Show the answer

The center is the midpoint (2,6)(2, 6). The diameter has length 36+64=10\sqrt{36 + 64} = 10, so the radius is 55 and the equation is

(x−2)2+(y−6)2=25.(x - 2)^2 + (y - 6)^2 = 25.
  1. Find the center and radius of the circle 2x2+2y2−8x+12y+8=02x^2 + 2y^2 - 8x + 12y + 8 = 0.
Show the answer

Divide by 22 to get x2+y2−4x+6y+4=0x^2 + y^2 - 4x + 6y + 4 = 0. Completing the square in xx and in yy gives

(x−2)2+(y+3)2=−4+4+9=9,\begin{aligned} (x - 2)^2 + (y + 3)^2 &= -4 + 4 + 9 \\[0.4em] &= 9, \end{aligned}

so the center is (2,−3)(2, -3) and the radius is 33.

  1. Does the equation x2+y2+2x−4y+6=0x^2 + y^2 + 2x - 4y + 6 = 0 describe a circle?
Show the answer

No. Completing the square gives

(x+1)2+(y−2)2=−6+1+4=−1.\begin{aligned} (x + 1)^2 + (y - 2)^2 &= -6 + 1 + 4 \\[0.4em] &= -1. \end{aligned}

A sum of squares is never negative, so no point satisfies the equation. With the constant 55 in place of 66 the right side would be 00, and the equation would describe only the point (−1,2)(-1, 2).

How this lesson connects

Where this leads in Calculus