Skip to content
Distance and Midpoint Formulas; Circles

Distance and Midpoint Formulas; Circles

By the end of this section, you will be able to: use the Distance Formula, use the Midpoint Formula, write the equation of a circle in standard form, and graph a circle.

In this chapter we will be looking at the conic sections, usually called the conics, and their properties. The conics are curves that result from a plane intersecting a double cone—two cones placed point-to-point. Each half of a double cone is called a nappe.

There are four conics—the circle, parabola, ellipse, and hyperbola. A plane intersecting the double cone results in each curve. Each of the curves has many applications that affect your daily life, from your cell phone to acoustics and navigation systems. In this section we will look at the properties of a circle.

Use the Distance Formula

We have used the Pythagorean Theorem to find the lengths of the sides of a right triangle. Here we will use this theorem again to find distances on the rectangular coordinate system. By finding distance on the rectangular coordinate system, we can make a connection between the geometry of a conic and algebra—which opens up a world of opportunities for application.

Our first step is to develop a formula to find distances between points on the rectangular coordinate system. We will plot the points and create a right triangle much as we did when we found slope in Graphs and Functions. We then take it one step further and use the Pythagorean Theorem to find the length of the hypotenuse of the triangle—which is the distance between the points.

Example 11.1. Use the rectangular coordinate system to find the distance between the points (6,4)(6,4) and (2,1)(2,1).

Solution. Plot the two points. Connect the two points with a line. Draw a right triangle as if you were going to find slope. The rise is 3 and the run is 4. Find the length of each leg, and use the Pythagorean Theorem to find dd, the distance between the two points.

Use the Pythagorean Theorem.a2+b2=c2Substitute in the values.32+42=d2Simplify.9+16=d225=d2Use the Square Root Property.d=5, 5 \begin{array}{lrcl} \text{Use the Pythagorean Theorem.} & a^2+b^2&=&c^2\\[4pt] \text{Substitute in the values.} &3^2+4^2&=&d^2\\[4pt] \text{Simplify.} &9+16&=&d^2\\[4pt] &25&=&d^2\\[4pt] \text{Use the Square Root Property.} &d&=&5,\ -5 \end{array}

Since distance, dd, is positive, we can eliminate d=5d=-5. The distance between the points (6,4)(6,4) and (2,1)(2,1) is 5.

Use the rectangular coordinate system to find the distance between the points (6,1)(6,1) and (2,2)(2,-2).

Use the rectangular coordinate system to find the distance between the points (5,3)(5,3) and (3,3)(-3,-3).

The method we used in the last example leads us to the formula to find the distance between the two points (x1,y1)(x_1,y_1) and (x2,y2)(x_2,y_2).

When we found the length of the horizontal leg we subtracted 626-2, which is x2x1x_2-x_1. When we found the length of the vertical leg we subtracted 414-1, which is y2y1y_2-y_1.

If the triangle had been in a different position, we may have subtracted x1x2x_1-x_2 or y1y2y_1-y_2. The expressions x2x1x_2-x_1 and x1x2x_1-x_2 vary only in the sign of the resulting number. To get the positive value—since distance is positive—we can use absolute value. So to generalize we will say x2x1|x_2-x_1| and y2y1|y_2-y_1|.

In the Pythagorean Theorem, we substitute the general expressions x2x1|x_2-x_1| and y2y1|y_2-y_1| rather than the numbers.

a2+b2=c2Substitute in the values.x2x12+y2y12=d2Squaring makes the expressions positive.(x2x1)2+(y2y1)2=d2Use the Square Root Property.d=±(x2x1)2+(y2y1)2Distance is positive.d=(x2x1)2+(y2y1)2 \begin{array}{lrcl} &a^2+b^2&=&c^2\\[4pt] \text{Substitute in the values.}&|x_2-x_1|^2+|y_2-y_1|^2&=&d^2\\[4pt] \text{Squaring makes the expressions positive.}&(x_2-x_1)^2+(y_2-y_1)^2&=&d^2\\[4pt] \text{Use the Square Root Property.}&d&=&\pm\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}\\[4pt] \text{Distance is positive.}&d&=&\sqrt{(x_2-x_1)^2+(y_2-y_1)^2} \end{array}

Distance Formula. The distance dd between the two points (x1,y1)(x_1,y_1) and (x2,y2)(x_2,y_2) is

d=(x2x1)2+(y2y1)2.d=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}.

Example 11.2. Use the Distance Formula to find the distance between the points (5,3)(-5,-3) and (7,2)(7,2).

Solution.

Write the Distance Formula.d=(x2x1)2+(y2y1)2Substitute.d=(7(5))2+(2(3))2Simplify.d=122+52d=144+25d=169d=13 \begin{array}{lrcl} \text{Write the Distance Formula.}&d&=&\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}\\[4pt] \text{Substitute.}&d&=&\sqrt{(7-(-5))^2+(2-(-3))^2}\\[4pt] \text{Simplify.}&d&=&\sqrt{12^2+5^2}\\[4pt] &d&=&\sqrt{144+25}\\[4pt] &d&=&\sqrt{169}\\[4pt] &d&=&13 \end{array}

Use the Distance Formula to find the distance between the points (4,5)(-4,-5) and (5,7)(5,7).

Use the Distance Formula to find the distance between the points (2,5)(-2,-5) and (14,10)(-14,-10).

Example 11.3. Use the Distance Formula to find the distance between the points (10,4)(10,-4) and (1,5)(-1,5). Write the answer in exact form and then find the decimal approximation, rounded to the nearest tenth if needed.

Solution.

Write the Distance Formula.d=(x2x1)2+(y2y1)2Substitute.d=(110)2+(5(4))2Simplify.d=(11)2+92d=121+81d=202d14.2 \begin{array}{lrcl} \text{Write the Distance Formula.}&d&=&\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}\\[4pt] \text{Substitute.}&d&=&\sqrt{(-1-10)^2+(5-(-4))^2}\\[4pt] \text{Simplify.}&d&=&\sqrt{(-11)^2+9^2}\\[4pt] &d&=&\sqrt{121+81}\\[4pt] &d&=&\sqrt{202}\\[4pt] &&&d\approx14.2 \end{array}

Since 202 is not a perfect square, we can leave the answer in exact form or find a decimal approximation.

Use the Distance Formula to find the distance between the points (4,5)(-4,-5) and (3,4)(3,4). Enter the exact form.

Use the Distance Formula to find the distance between the points (2,5)(-2,-5) and (3,4)(-3,-4). Enter the exact form.

Use the Midpoint Formula

It is often useful to be able to find the midpoint of a segment. For example, if you have the endpoints of the diameter of a circle, you may want to find the center of the circle which is the midpoint of the diameter. To find the midpoint of a line segment, we find the average of the xx-coordinates and the average of the yy-coordinates of the endpoints.

Midpoint Formula. The midpoint of the line segment whose endpoints are the two points (x1,y1)(x_1,y_1) and (x2,y2)(x_2,y_2) is

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

To find the midpoint of a line segment, we find the average of the xx-coordinates and the average of the yy-coordinates of the endpoints.

Example 11.4. Use the Midpoint Formula to find the midpoint of the line segment whose endpoints are (5,4)(-5,-4) and (7,2)(7,2). Plot the endpoints and the midpoint on a rectangular coordinate system.

Solution.

Write the Midpoint Formula.(x1+x22,y1+y22)Substitute.(5+72,4+22)Simplify.(22,22)(1,1) \begin{array}{lrcl} \text{Write the Midpoint Formula.}&&&\left(\tfrac{x_1+x_2}{2},\tfrac{y_1+y_2}{2}\right)\\[10pt] \text{Substitute.}&&&\left(\tfrac{-5+7}{2},\tfrac{-4+2}{2}\right)\\[10pt] \text{Simplify.}&&&\left(\tfrac{2}{2},\tfrac{-2}{2}\right)\\[10pt] &&&(1,-1) \end{array}

The midpoint of the segment is the point (1,1)(1,-1). Plotting the endpoints and midpoint shows that (1,1)(1,-1) lies halfway between (5,4)(-5,-4) and (7,2)(7,2).

Use the Midpoint Formula to find the midpoint of the line segment whose endpoints are (3,5)(-3,-5) and (5,7)(5,7).

Use the Midpoint Formula to find the midpoint of the line segment whose endpoints are (2,5)(-2,-5) and (6,1)(6,-1).

Both the Distance Formula and the Midpoint Formula depend on two points, (x1,y1)(x_1,y_1) and (x2,y2)(x_2,y_2). It is easy to confuse which formula requires addition and which subtraction of the coordinates. If we remember where the formulas come from, it may be easier to remember the formulas. In the Distance Formula, subtract the coordinates. In the Midpoint Formula, add the coordinates.

Write the Equation of a Circle in Standard Form

As we mentioned, our goal is to connect the geometry of a conic with algebra. By using the coordinate plane, we are able to do this easily.

We define a circle as all points in a plane that are a fixed distance from a given point in the plane. The given point is called the center, (h,k)(h,k), and the fixed distance is called the radius, rr, of the circle.

Circle. A circle is all points in a plane that are a fixed distance from a given point in the plane. The given point is called the center, (h,k)(h,k), and the fixed distance is called the radius, rr, of the circle.

We look at a circle in the rectangular coordinate system. The radius is the distance from the center, (h,k)(h,k), to a point on the circle, (x,y)(x,y).

To derive the equation of a circle, we can use the distance formula with the points (h,k)(h,k), (x,y)(x,y) and the distance, rr.

d=(x2x1)2+(y2y1)2Substitute the values.r=(xh)2+(yk)2Square both sides.r2=(xh)2+(yk)2 \begin{array}{lrcl} &d&=&\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}\\[4pt] \text{Substitute the values.}&r&=&\sqrt{(x-h)^2+(y-k)^2}\\[4pt] \text{Square both sides.}&r^2&=&(x-h)^2+(y-k)^2 \end{array}

Standard Form of the Equation of a Circle. The standard form of the equation of a circle with center (h,k)(h,k) and radius rr is

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

Example 11.5. Write the standard form of the equation of the circle with radius 3 and center (0,0)(0,0).

Solution.

Use the standard form.(xh)2+(yk)2=r2Substitute r=3, h=0, k=0.(x0)2+(y0)2=32Simplify.x2+y2=9 \begin{array}{lrcl} \text{Use the standard form.}&(x-h)^2+(y-k)^2&=&r^2\\[4pt] \text{Substitute }r=3,\ h=0,\ k=0.&(x-0)^2+(y-0)^2&=&3^2\\[4pt] \text{Simplify.}&x^2+y^2&=&9 \end{array}

Write the standard form of the equation of the circle with radius 66 and center (0,0)(0,0).

Write the standard form of the equation of the circle with radius 88 and center (0,0)(0,0).

In the last example, the center was (0,0)(0,0). Notice what happened to the equation. Whenever the center is (0,0)(0,0), the standard form becomes x2+y2=r2x^2+y^2=r^2.

Example 11.6. Write the standard form of the equation of the circle with radius 2 and center (1,3)(-1,3).

Solution.

Use the standard form.(xh)2+(yk)2=r2Substitute.(x(1))2+(y3)2=22Simplify.(x+1)2+(y3)2=4 \begin{array}{lrcl} \text{Use the standard form.}&(x-h)^2+(y-k)^2&=&r^2\\[4pt] \text{Substitute.}&(x-(-1))^2+(y-3)^2&=&2^2\\[4pt] \text{Simplify.}&(x+1)^2+(y-3)^2&=&4 \end{array}

Write the standard form of the equation of the circle with radius 77 and center (2,4)(2,-4).

Write the standard form of the equation of the circle with radius 99 and center (3,5)(-3,-5).

In the next example, the radius is not given. To calculate the radius, we use the Distance Formula with the two given points.

Example 11.7. Write the standard form of the equation of the circle with center (2,4)(2,4) that also contains the point (2,1)(-2,1).

Solution. The radius is the distance from the center to any point on the circle so we can use the distance formula to calculate it. We will use the center (2,4)(2,4) and point (2,1)(-2,1).

Use the Distance Formula.r=(x2x1)2+(y2y1)2Substitute.r=(22)2+(14)2Simplify.r=(4)2+(3)2r=16+9r=25r=5 \begin{array}{lrcl} \text{Use the Distance Formula.}&r&=&\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}\\[4pt] \text{Substitute.}&r&=&\sqrt{(-2-2)^2+(1-4)^2}\\[4pt] \text{Simplify.}&r&=&\sqrt{(-4)^2+(-3)^2}\\[4pt] &r&=&\sqrt{16+9}\\[4pt] &r&=&\sqrt{25}\\[4pt] &r&=&5 \end{array}

Now that we know the radius, r=5r=5, and the center, (2,4)(2,4), we can use the standard form of the equation of a circle to find the equation.

Use the standard form.(xh)2+(yk)2=r2Substitute.(x2)2+(y4)2=52Simplify.(x2)2+(y4)2=25 \begin{array}{lrcl} \text{Use the standard form.}&(x-h)^2+(y-k)^2&=&r^2\\[4pt] \text{Substitute.}&(x-2)^2+(y-4)^2&=&5^2\\[4pt] \text{Simplify.}&(x-2)^2+(y-4)^2&=&25 \end{array}

Write the standard form of the equation of the circle with center (2,1)(2,1) that also contains the point (2,2)(-2,-2).

Write the standard form of the equation of the circle with center (7,1)(7,1) that also contains the point (1,5)(-1,-5).

Graph a Circle

Any equation of the form (xh)2+(yk)2=r2(x-h)^2+(y-k)^2=r^2 is the standard form of the equation of a circle with center (h,k)(h,k) and radius rr. We can then graph the circle on a rectangular coordinate system.

Note that the standard form calls for subtraction from xx and yy. In the next example, the equation has x+2x+2, so we need to rewrite the addition as subtraction of a negative.

Example 11.8. Find the center and radius, then graph the circle: (x+2)2+(y1)2=9(x+2)^2+(y-1)^2=9.

Solution.

(x+2)2+(y1)2=9(x(2))2+(y1)2=32 \begin{array}{rcl} (x+2)^2+(y-1)^2&=&9\\[4pt] (x-(-2))^2+(y-1)^2&=&3^2 \end{array}

The center is (2,1)(-2,1) and the radius is 3. To graph the circle, plot the center and then plot points 3 units above, below, left, and right of the center. Draw the circle through these four points.

Find the center and radius of (x3)2+(y+4)2=4(x-3)^2+(y+4)^2=4. Enter the center and radius, separated by a comma.

Find the center and radius of (x3)2+(y1)2=16(x-3)^2+(y-1)^2=16. Enter the center and radius, separated by a comma.

To find the center and radius, we must write the equation in standard form. In the next example, we must first get the coefficient of x2,y2x^2,y^2 to be one.

Example 11.9. Find the center and radius and then graph the circle, 4x2+4y2=644x^2+4y^2=64.

Solution.

4x2+4y2=64Divide each side by 4.x2+y2=16Use standard form.(x0)2+(y0)2=42 \begin{array}{lrcl} &4x^2+4y^2&=&64\\[4pt] \text{Divide each side by 4.}&x^2+y^2&=&16\\[4pt] \text{Use standard form.}&(x-0)^2+(y-0)^2&=&4^2 \end{array}

The center is (0,0)(0,0) and the radius is 4. Plot the center and the four points 4 units above, below, left, and right of the center, and draw the circle through them.

Find the center and radius of 3x2+3y2=273x^2+3y^2=27. Enter the center and radius, separated by a comma.

Find the center and radius of 5x2+5y2=1255x^2+5y^2=125. Enter the center and radius, separated by a comma.

If we expand the equation from Example 11.8, (x+2)2+(y1)2=9(x+2)^2+(y-1)^2=9, the equation of the circle looks very different.

(x+2)2+(y1)2=9Square the binomials.x2+4x+4+y22y+1=9Arrange terms and get zero on the right.x2+y2+4x2y4=0 \begin{array}{lrcl} &(x+2)^2+(y-1)^2&=&9\\[4pt] \text{Square the binomials.}&x^2+4x+4+y^2-2y+1&=&9\\[4pt] \text{Arrange terms and get zero on the right.}&x^2+y^2+4x-2y-4&=&0 \end{array}

This form of the equation is called the general form of the equation of the circle.

General Form of the Equation of a Circle. The general form of the equation of a circle is

x2+y2+ax+by+c=0.x^2+y^2+ax+by+c=0.

If we are given an equation in general form, we can change it to standard form by completing the squares in both xx and yy. Then we can graph the circle using its center and radius.

Example 11.10. (a) Find the center and radius, then (b) graph the circle: x2+y24x6y+4=0x^2+y^2-4x-6y+4=0.

Solution. We need to rewrite this general form into standard form in order to find the center and radius.

Group the terms; collect constants.x24x+y26y=4Complete the squares.x24x+4+y26y+9=4+4+9Rewrite as binomial squares.(x2)2+(y3)2=9 \begin{array}{lrcl} \text{Group the terms; collect constants.}&x^2-4x+y^2-6y&=&-4\\[4pt] \text{Complete the squares.}&x^2-4x+4+y^2-6y+9&=&-4+4+9\\[4pt] \text{Rewrite as binomial squares.}&(x-2)^2+(y-3)^2&=&9 \end{array}

The center is (2,3)(2,3) and the radius is 3. Plot the center and points 3 units above, below, left, and right of it, and draw the circle.

Find the center and radius of x2+y26x8y+9=0x^2+y^2-6x-8y+9=0. Enter the center and radius, separated by a comma.

Find the center and radius of x2+y2+6x2y+1=0x^2+y^2+6x-2y+1=0. Enter the center and radius, separated by a comma.

In the next example, there is a yy-term and a y2y^2-term. But notice that there is no xx-term, only an x2x^2-term. We have seen this before and know that it means hh is 0. We will need to complete the square for the yy terms, but not for the xx terms.

Example 11.11. (a) Find the center and radius, then (b) graph the circle: x2+y2+8y=0x^2+y^2+8y=0.

Solution. We need to rewrite this general form into standard form in order to find the center and radius.

Group the terms.x2+y2+8y=0Complete the square for y2+8y.x2+y2+8y+16=0+16Rewrite as binomial squares.(x0)2+(y+4)2=16 \begin{array}{lrcl} \text{Group the terms.}&x^2+y^2+8y&=&0\\[4pt] \text{Complete the square for }y^2+8y.&x^2+y^2+8y+16&=&0+16\\[4pt] \text{Rewrite as binomial squares.}&(x-0)^2+(y+4)^2&=&16 \end{array}

The center is (0,4)(0,-4) and the radius is 4. Plot the center and points 4 units above, below, left, and right of it, and draw the circle.

Find the center and radius of x2+y22x3=0x^2+y^2-2x-3=0. Enter the center and radius, separated by a comma.

Find the center and radius of x2+y212y+11=0x^2+y^2-12y+11=0. Enter the center and radius, separated by a comma.

Key terms. A conic is a curve formed when a plane intersects a double cone. Each half of a double cone is a nappe. A circle is all points in a plane a fixed distance from a given point; that point is the center, and the fixed distance is the radius. The standard form of the equation of a circle is (xh)2+(yk)2=r2(x-h)^2+(y-k)^2=r^2, and the general form of the equation of a circle is x2+y2+ax+by+c=0x^2+y^2+ax+by+c=0.


This section is adapted from Intermediate Algebra 2e, Section 11.1 by Lynn Marecek and Andrea Honeycutt Mathis, © OpenStax, licensed under CC BY-NC-SA 4.0. Access the original for free at OpenStax. Changes: omitted the readiness quiz, practice exercise set, media links, and complex source figures; converted Try It exercises into interactive questions and described essential graphing actions in text.