Precalculus / Coordinate Geometry

Analytic Geometry

Distance and midpoint formulas, equations of lines and circles, coordinate geometry proofs, locus problems, and dividing a segment — the complete analytic geometry reference for precalculus.

Distance and Midpoint Formulas

Distance Formula

d = √[(x₂ − x₁)² + (y₂ − y₁)²]

Derived from the Pythagorean theorem. The horizontal and vertical differences form the legs of a right triangle; the segment is the hypotenuse.

Midpoint Formula

M = ((x₁ + x₂)/2, (y₁ + y₂)/2)

The midpoint averages the x-coordinates and the y-coordinates. It is always equidistant from both endpoints.

Quick Practice — Key Facts

PointsDistanceMidpoint
(0, 0) and (3, 4)5(1.5, 2)
(1, 1) and (4, 5)5(2.5, 3)
(−2, 3) and (4, 11)10(1, 7)
(0, −5) and (12, 0)13(6, −2.5)

Slope and Equations of Lines

The slope of a line measures steepness and direction. Given two points (x₁, y₁) and (x₂, y₂):

m = (y₂ − y₁) / (x₂ − x₁)

Slope-Intercept Form

y = mx + b

m = slope, b = y-intercept. Best for graphing and reading slope instantly.

Point-Slope Form

y − y₁ = m(x − x₁)

Use when you know one point and the slope. Fastest path to a line equation.

Two-Point Form

(y − y₁)/(y₂ − y₁) = (x − x₁)/(x₂ − x₁)

Encodes both points directly. Derive it by substituting the slope formula into point-slope.

Intercept Form

x/a + y/b = 1

a is the x-intercept, b is the y-intercept. Useful when both intercepts are known. Does not work for lines through the origin.

Normal/General Form

Ax + By + C = 0

Distance from point (x₀, y₀) to this line: d = |Ax₀ + By₀ + C| / √(A² + B²). Essential for locus and distance-to-line problems.

Parallel and Perpendicular Lines

Parallel Lines

Parallel lines have equal slopes and different y-intercepts — they never intersect.

m₁ = m₂   and   b₁ ≠ b₂

Example: y = 5x + 2 ∥ y = 5x − 7 (equal slope 5, different intercepts)

Perpendicular Lines

Perpendicular lines meet at 90°. Their slopes are negative reciprocals.

m₁ · m₂ = −1   →   m₂ = −1/m₁

Example: slope 3/4 ⊥ slope −4/3. Product: (3/4)(−4/3) = −1 ✓

Slope Relationship Reference

Given SlopeParallel SlopePerpendicular Slope
m = 3m = 3m = −1/3
m = −2/5m = −2/5m = 5/2
m = 7m = 7m = −1/7
m = 0 (horizontal)m = 0undefined (vertical)
undefined (vertical)undefinedm = 0 (horizontal)

Circles: Standard and General Form

A circle is the locus of all points in a plane equidistant from a fixed center point. That constant distance is the radius.

Standard Form

(x − h)² + (y − k)² = r²

Center (h, k), radius r. The signs inside the parentheses are opposite to the coordinates of the center. If the equation reads (x + 3)², then h = −3.

Center (2, −5), r = 4: (x − 2)² + (y + 5)² = 16

General Form

x² + y² + Dx + Ey + F = 0

Convert to standard by completing the square for x and y separately. The circle is real when (D/2)² + (E/2)² − F > 0, a point when it equals 0, and imaginary when it is negative.

Completing the Square — Step-by-Step

1

Group and move constant

Move F to the right side and group x-terms and y-terms: (x² + Dx) + (y² + Ey) = −F

2

Complete the square for x

Take half of D, square it, add (D/2)² to both sides: (x² + Dx + (D/2)²) + (y² + Ey) = −F + (D/2)²

3

Complete the square for y

Take half of E, square it, add (E/2)² to both sides: (x² + Dx + (D/2)²) + (y² + Ey + (E/2)²) = −F + (D/2)² + (E/2)²

4

Rewrite as perfect squares

Factor each group: (x + D/2)² + (y + E/2)² = r², where r² = (D/2)² + (E/2)² − F

Coordinate Geometry Proofs

Coordinate proofs translate geometric statements into algebraic equations. Place figures strategically to minimize computation, then verify properties using the distance, slope, and midpoint formulas.

Prove ABCD is a parallelogram

Method 1 (Slopes): Show slope AB = slope CD and slope BC = slope AD — both pairs of opposite sides are parallel. Method 2 (Distances): Show AB = CD and BC = AD using the distance formula. Method 3 (Diagonals): Find midpoints of AC and BD — if they are the same point, the diagonals bisect each other, proving a parallelogram.

Prove a quadrilateral is a rectangle

First prove it is a parallelogram (equal opposite slopes). Then show one interior angle is 90° by confirming two adjacent sides have slopes that are negative reciprocals. Alternatively, show the diagonals are equal in length (distance formula) in addition to bisecting each other.

Prove a triangle is isosceles

Use the distance formula to show two sides are equal. Then optionally show the altitude to the third side bisects it (using the midpoint formula), confirming the symmetry of an isosceles triangle.

Prove a triangle is a right triangle

Calculate the lengths of all three sides using the distance formula. Verify the Pythagorean theorem: a² + b² = c² where c is the longest side. Alternatively, show two sides have slopes whose product is −1.

Strategic Placement Tips

  • Place one vertex at the origin to simplify calculations — many coordinates become 0.
  • Align one side along the x-axis so a vertex lies at (a, 0) for simpler distance computations.
  • For symmetric figures (isosceles triangles, rectangles), use ±a and ±b to exploit symmetry automatically.
  • Label coordinates with general letters (a, b, c) rather than specific numbers — this proves the general case.

Locus Problems

A locus is the complete set of points satisfying a given geometric condition. Common loci you must recognize:

Equidistant from two points

Perpendicular bisector of the segment joining the two points

Set PA = PB, square both sides, simplify — the y² terms cancel leaving a linear equation.

Equidistant from two parallel lines

A line parallel to both, halfway between them

Average the equations of the two lines to find the locus directly.

Fixed distance from a point

Circle centered at that point with the given radius

PA = r → (x − a)² + (y − b)² = r². The definition of a circle.

Fixed distance from a line

Two lines parallel to the given line, one on each side

Use the point-to-line distance formula |Ax + By + C|/√(A² + B²) = d.

General Procedure for Locus Problems

1

Name the moving point

Let P(x, y) represent any point on the locus.

2

Translate the condition

Write the geometric condition as an algebraic equation in x and y.

3

Simplify

Expand, cancel like terms, and rearrange to recognize the curve (line, circle, parabola, etc.).

4

State restrictions

Note any points to exclude or domain restrictions implied by the original condition.

Dividing a Segment in a Ratio

The section formula locates the point that divides segment AB in a given ratio m:n.

Internal Division

P lies between A and B, dividing AB in ratio m:n from A to B.

P = ((mx₂ + nx₁)/(m + n), (my₂ + ny₁)/(m + n))

The midpoint is the special case m = n = 1: P = ((x₁ + x₂)/2, (y₁ + y₂)/2).

External Division

P lies on the extension of AB beyond B (or beyond A), dividing AB externally in ratio m:n.

P = ((mx₂ − nx₁)/(m − n), (my₂ − ny₁)/(m − n))

External division is undefined when m = n (that ratio would create a point at infinity).

Centroid of a Triangle

The centroid G is the point where all three medians meet. Each median divides internally in ratio 2:1 from vertex to midpoint. For triangle with vertices A(x₁, y₁), B(x₂, y₂), C(x₃, y₃):

G = ((x₁ + x₂ + x₃)/3, (y₁ + y₂ + y₃)/3)

Example: A(0, 0), B(6, 0), C(3, 9) → G = ((0 + 6 + 3)/3, (0 + 0 + 9)/3) = (3, 3).

Worked Examples

Example 1 — Distance and Midpoint

A = (−3, 2) and B = (5, −4)

Distance: d = √[(5 − (−3))² + (−4 − 2)²]

= √[(8)² + (−6)²] = √[64 + 36] = √100 = 10

Midpoint: M = ((−3 + 5)/2, (2 + (−4))/2) = (1, −1)

Distance = 10, Midpoint = (1, −1)

Verify: distance from (1, −1) to A = √[(1−(−3))² + (−1−2)²] = √[16 + 9] = 5 ✓   (half of 10)

Example 2 — Convert General Form Circle to Standard Form

x² + y² − 8x + 6y + 16 = 0

Step 1: Group and move constant.

(x² − 8x) + (y² + 6y) = −16

Step 2: Complete the square for x: (−8/2)² = 16. Add 16 both sides.

Step 3: Complete the square for y: (6/2)² = 9. Add 9 both sides.

(x² − 8x + 16) + (y² + 6y + 9) = −16 + 16 + 9

Step 4: Factor.

(x − 4)² + (y + 3)² = 9

Center (4, −3), radius 3

Example 3 — Coordinate Proof: Midpoints of a Quadrilateral Form a Parallelogram

Quadrilateral ABCD: A(0,0), B(a,0), C(b,c), D(d,e)

Let P, Q, R, S = midpoints of AB, BC, CD, DA.

P = (a/2, 0), Q = ((a+b)/2, c/2)

R = ((b+d)/2, (c+e)/2), S = (d/2, e/2)

Slope PQ = (c/2 − 0)/((a+b)/2 − a/2) = (c/2)/(b/2) = c/b

Slope SR = ((c+e)/2 − e/2)/((b+d)/2 − d/2) = (c/2)/(b/2) = c/b

PQ ∥ SR. By similar argument QR ∥ PS. Therefore PQRS is a parallelogram. ∎

Example 4 — Locus: Points Equidistant from (0, 4) and the x-axis

Let P(x, y) be on the locus.

Distance to (0, 4): √[x² + (y − 4)²]

Distance to x-axis: |y|

Set equal and square: x² + (y − 4)² = y²

Expand: x² + y² − 8y + 16 = y²

Simplify: x² − 8y + 16 = 0

Solve for y: y = x²/8 + 2

The locus is the parabola y = x²/8 + 2 (a classic parabola definition).

Example 5 — Section Formula: Internal Division in Ratio 3:2

A(2, −1), B(7, 9), ratio 3:2

P_x = (3·7 + 2·2)/(3 + 2) = (21 + 4)/5 = 25/5 = 5

P_y = (3·9 + 2·(−1))/(3 + 2) = (27 − 2)/5 = 25/5 = 5

P = (5, 5)

Verify: AP/PB = √[(5−2)² + (5+1)²] / √[(7−5)² + (9−5)²] = √45 / √20 = 3/2 ✓

Frequently Asked Questions

What is the distance formula and how do you derive it?

The distance formula gives the length of the segment joining two points (x₁, y₁) and (x₂, y₂): d = √[(x₂ − x₁)² + (y₂ − y₁)²]. It is derived directly from the Pythagorean theorem — the horizontal leg has length |x₂ − x₁| and the vertical leg has length |y₂ − y₁|, so the hypotenuse (the segment connecting the two points) satisfies d² = (x₂ − x₁)² + (y₂ − y₁)². Example: distance from (1, 2) to (4, 6) = √[(4−1)² + (6−2)²] = √[9 + 16] = √25 = 5.

How do you find the midpoint of a segment?

The midpoint M of the segment joining (x₁, y₁) and (x₂, y₂) is M = ((x₁ + x₂)/2, (y₁ + y₂)/2). You average the x-coordinates and average the y-coordinates. Example: midpoint of (−3, 4) and (7, −2) is ((−3 + 7)/2, (4 + (−2))/2) = (4/2, 2/2) = (2, 1). To verify, check that M is equidistant from both endpoints using the distance formula.

What is the standard form equation of a circle?

The standard form of a circle with center (h, k) and radius r is (x − h)² + (y − k)² = r². This comes directly from the definition of a circle as the set of all points exactly r units from the center. Example: a circle centered at (3, −1) with radius 5 has equation (x − 3)² + (y + 1)² = 25. To find the center and radius from a given equation, identify h, k from the subtracted values and take the square root of the right side for r.

How do you convert the general form of a circle to standard form?

The general form is x² + y² + Dx + Ey + F = 0. To convert to standard form, complete the square for both x and y. Step 1: Group x-terms and y-terms. Step 2: Complete the square — for x² + Dx, add (D/2)² to both sides; for y² + Ey, add (E/2)² to both sides. Step 3: Write each group as a perfect square binomial. Example: x² + y² − 6x + 4y + 4 = 0 → (x² − 6x + 9) + (y² + 4y + 4) = −4 + 9 + 4 → (x − 3)² + (y + 2)² = 9. Center (3, −2), radius 3.

How do you prove a quadrilateral is a parallelogram using coordinate geometry?

There are several coordinate proof strategies for a parallelogram. Method 1 (slopes): Show both pairs of opposite sides have equal slopes, proving they are parallel. Method 2 (distances): Show both pairs of opposite sides are equal in length using the distance formula. Method 3 (diagonals): Show the diagonals bisect each other by finding both midpoints — if the midpoints are the same point, the diagonals bisect each other. Any one of these three methods is sufficient to prove ABCD is a parallelogram.

What is a locus and how do you find its equation?

A locus is the set of all points satisfying a given geometric condition. To find the locus equation: Step 1 — let P(x, y) be a general point on the locus. Step 2 — translate the geometric condition into an algebraic equation involving x and y. Step 3 — simplify the equation. Example: the locus of points equidistant from A(2, 0) and B(8, 0) is the perpendicular bisector. Set PA = PB: √[(x−2)² + y²] = √[(x−8)² + y²]. Square both sides: (x−2)² + y² = (x−8)². Simplify: x² − 4x + 4 = x² − 16x + 64 → 12x = 60 → x = 5. The locus is the vertical line x = 5.

How do you divide a line segment in a given ratio?

The section formula finds point P dividing segment AB from A(x₁, y₁) to B(x₂, y₂) in ratio m:n internally: P = ((mx₂ + nx₁)/(m + n), (my₂ + ny₁)/(m + n)). For external division (ratio m:n but outside the segment): P = ((mx₂ − nx₁)/(m − n), (my₂ − ny₁)/(m − n)). Example: point dividing from A(1, 3) to B(7, 9) in ratio 2:1 internally is P = ((2·7 + 1·1)/3, (2·9 + 1·3)/3) = (15/3, 21/3) = (5, 7).

How do you find the equation of a line perpendicular to a given line through a specific point?

Step 1: Find the slope m of the given line by rearranging to slope-intercept form y = mx + b. Step 2: The perpendicular slope is −1/m (the negative reciprocal). Step 3: Use point-slope form y − y₀ = (−1/m)(x − x₀) with the given point (x₀, y₀). Step 4: Simplify to the desired form. Example: line 3x − 4y = 8 has slope 3/4. A line perpendicular to it through (6, 2) has slope −4/3: y − 2 = −(4/3)(x − 6) → y = −(4/3)x + 10.

What is the collinearity test in coordinate geometry?

Three points A, B, C are collinear (lie on the same line) if and only if the slope from A to B equals the slope from B to C. Equivalently, use the area method: compute area of triangle ABC = (1/2)|x₁(y₂ − y₃) + x₂(y₃ − y₁) + x₃(y₁ − y₂)|. If the area equals 0, the points are collinear. Example: A(1, 2), B(3, 6), C(5, 10). Slope AB = (6−2)/(3−1) = 2. Slope BC = (10−6)/(5−3) = 2. Equal slopes confirm the three points are collinear.

Related Topics

Practice Analytic Geometry

Interactive problems with step-by-step solutions and private tutoring — free to try.

Start Practicing Free