FreeMathCamp
Course Articles

Free Math Camp

A free course in the maths you need before calculus. Short lessons, interactive visuals, practice that adapts to you, and a record of progress on your account.

freemathcamp.app

Made by Adam Richard Turner

hello@adamrichardturner.dev

Course

  • Foundations
  • Articles
  • Start free
  • Sign in

Legal

  • Privacy
  • Terms
  • Do not sell or share

Copyright © Adam Richard Turner. All rights reserved.

  1. Articles
  2. /
  3. Geometry
Geometry

Distance and Midpoint Formulas and the Equation of a Circle

How Pythagoras gives the distance between two points, how to find a midpoint, and how the distance formula becomes the equation of a circle, including finding the centre and radius by completing the square.

3 min read Supports 4 lessons
In short

The distance formula d=(x2−x1)2+(y2−y1)2d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}d=(x2​−x1​)2+(y2​−y1​)2​ is Pythagoras on a grid. The midpoint averages the coordinates. A circle with centre (h,k)(h, k)(h,k) and radius rrr has equation (x−h)2+(y−k)2=r2(x - h)^2 + (y - k)^2 = r^2(x−h)2+(y−k)2=r2.

Distance between two points

The horizontal and vertical gaps between two points are the legs of a right-angled triangle. The straight-line distance between them is its hypotenuse, so Pythagoras gives it straight away.

Gaps of 666 across and 888 up, so the distance is 36+64=10\sqrt{36 + 64} = 1036+64​=10.

Distance formula
d=(x2−x1)2+(y2−y1)2d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}d=(x2​−x1​)2+(y2​−y1​)2​
Tip

The order of subtraction does not matter, because each gap is squared. (3−(−3))2(3 - (-3))^2(3−(−3))2 and (−3−3)2(-3 - 3)^2(−3−3)2 are both 363636.

The midpoint

The point halfway between two others sits halfway across and halfway up. Average the xxx-coordinates and average the yyy-coordinates.

Midpoint
M=(x1+x22,  y1+y22)M = \left(\frac{x_1 + x_2}{2},\; \frac{y_1 + y_2}{2}\right)M=(2x1​+x2​​,2y1​+y2​​)

For (−3,−2)(-3, -2)(−3,−2) and (3,6)(3, 6)(3,6): M=(0,2)M = (0, 2)M=(0,2).

The equation of a circle

A circle is every point at distance rrr from its centre (h,k)(h, k)(h,k). Write that sentence with the distance formula and square both sides: the circle's equation appears.

  1. distance from (x,y) to (h,k)=r\text{distance from } (x, y) \text{ to } (h, k) = rdistance from (x,y) to (h,k)=r

    The definition of a circle.

1/3

(x−2)2+(y−1)2=9(x - 2)^2 + (y - 1)^2 = 9(x−2)2+(y−1)2=9: centre (2,1)(2, 1)(2,1), radius 333.

Watch out

(x+3)2+(y−5)2=16(x + 3)^2 + (y - 5)^2 = 16(x+3)2+(y−5)2=16 has centre (−3,5)(-3, 5)(−3,5) and radius 444, not 161616. The signs flip, and the right-hand side is r2r^2r2.

Expanded equations

Sometimes the equation arrives multiplied out. Complete the square in xxx and in yyy to recover the centre and radius.

Worked example

Find the centre and radius of x2+y2−6x+4y−3=0x^2 + y^2 - 6x + 4y - 3 = 0x2+y2−6x+4y−3=0.

  1. 1

    Group the xxx and yyy terms and complete each square.

    (x2−6x+9)+(y2+4y+4)=3+9+4(x^2 - 6x + 9) + (y^2 + 4y + 4) = 3 + 9 + 4(x2−6x+9)+(y2+4y+4)=3+9+4
Key idea

In calculus you will find the slope of a circle at any point using implicit differentiation, starting from exactly this equation.

Common questions

How is the distance formula related to Pythagoras?

The horizontal and vertical gaps between two points form the legs of a right-angled triangle, and the distance is the hypotenuse, so d2=(Δx)2+(Δy)2d^2 = (\Delta x)^2 + (\Delta y)^2d2=(Δx)2+(Δy)2.

How do I find the radius from a circle's equation?

Write it as (x−h)2+(y−k)2=r2(x - h)^2 + (y - k)^2 = r^2(x−h)2+(y−k)2=r2, then take the square root of the right-hand side.

Practise distance, midpoint and circles

The Distance & Midpoint lesson has worked examples and unlimited practice that adapts to you.

Open the lesson

On this page

  1. Distance between two points
  2. The midpoint
  3. The equation of a circle
  4. Expanded equations
  5. Common questions
Lessons on this
  • Distance & MidpointGeometry
  • Equations of CirclesGeometry
  • Pythagorean TheoremGeometry
  • The Coordinate PlaneGraphs & Linear Equations
Related reading9
Ideas this article builds on or leads to.
  • Geometry
    The Pythagorean Theorem Explained: a² + b² = c²

    In a right-angled triangle, the square of the hypotenuse (the longest side, opposite the right angle) equals the sum of the squares of the other two sides: a2+b2=c2a^2 + b^2 = c^2a2+b2=c2.

  • Graphs & Functions
    The Coordinate Plane: Axes, Quadrants and Plotting Points

    The coordinate plane is a grid made by two perpendicular number lines, the xxx-axis and the yyy-axis. Every point has an address (x,y)(x, y)(x,y): how far across, then how far up.

  • Polynomials & Quadratics
    Completing the Square and Vertex Form of a Quadratic

    Completing the square rewrites x2+bx+cx^2 + bx + cx2+bx+c as (x+b2)2+k(x + \frac{b}{2})^2 + k(x+2b​)2+k. The result, vertex form a(x−h)2+ka(x - h)^2 + ka(x−h)2+k, shows the parabola's turning point (h,k)(h, k)(h,k) directly.

  • Geometry
    Circles and Pi: Circumference and Area of a Circle

    For every circle, the circumference divided by the diameter is the same number, pi (π≈3.14159\pi \approx 3.14159π≈3.14159). So the circumference is C=2πrC = 2\pi rC=2πr and the area is A=πr2A = \pi r^2A=πr2.

  • Powers & Roots
    What Are Exponents? Powers, Bases and Repeated Multiplication

    An exponent (or power) says how many times to multiply a number, the base, by itself: 25=2×2×2×2×2=322^5 = 2 \times 2 \times 2 \times 2 \times 2 = 3225=2×2×2×2×2=32.

  • Algebra
    How to Solve Linear Equations: The Balance Method

    A linear equation like 3x−4=113x - 4 = 113x−4=11 is solved by doing the same inverse operation to both sides until the variable is alone. Each step keeps the equation balanced, like a pair of scales.

  • Polynomials & Quadratics
    How to Factorise Quadratics: Sum-Product Method and Difference of Two Squares

    Factorising a quadratic rewrites it as a product of brackets: x2+7x+12=(x+3)(x+4)x^2 + 7x + 12 = (x + 3)(x + 4)x2+7x+12=(x+3)(x+4). For x2+bx+cx^2 + bx + cx2+bx+c, look for two numbers that add to bbb and multiply to ccc.

  • Graphs & Functions
    Slope (Gradient) of a Line: Rise Over Run Explained

    The slope, or gradient, of a line measures its steepness: how much yyy changes for each step of 111 in xxx. Between two points, m=riserun=y2−y1x2−x1m = \frac{\text{rise}}{\text{run}} = \frac{y_2 - y_1}{x_2 - x_1}m=runrise​=x2​−x1​y2​−y1​​.

  • Ready for Calculus
    What Is a Derivative? The Difference Quotient and the Slope of a Curve

    The derivative of fff at xxx is the slope of the curve at that point: the instantaneous rate of change. It is the limit of the difference quotient, f′(x)=lim⁡h→0f(x+h)−f(x)hf'(x) = \lim_{h \to 0}\frac{f(x + h) - f(x)}{h}f′(x)=limh→0​hf(x+h)−f(x)​.