Precalculus · Textbook draft · 10 minute reading

Coordinates, Lines, and Distance

Build coordinate equations from geometry and interpret slope with units.

Before you begin

  • Equations, square roots, and the Pythagorean theorem.

Learning objectives

  • Calculate distances, midpoints, and slopes.
  • Write and compare line equations.
  • Translate circle geometry into a coordinate equation.

Coordinates turn geometric relationships into equations. A point records two quantities in a chosen order, so its axes and units are part of the description. In a distance calculation both coordinates must use compatible length units; in a time–position graph, the slope instead compares two different kinds of quantity.

Distance and midpoint

For points P=(x1,y1)P=(x_1,y_1) and Q=(x2,y2)Q=(x_2,y_2), the horizontal and vertical coordinate differences form the legs of a right triangle. Pythagoras gives

d(P,Q)=(x2−x1)2+(y2−y1)2.d(P,Q)=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}.

For P=(−1,2)P=(-1,2) and Q=(5,10)Q=(5,10), the differences are 6 and 8, giving distance 10. Reversing their order negates both differences but leaves their squares unchanged.

The midpoint averages the coordinates: M=((x1+x2)/2,(y1+y2)/2)M=((x_1+x_2)/2,(y_1+y_2)/2). Here M=(2,6)M=(2,6), and its coordinate differences from either endpoint are half the full differences. Its distance from either is therefore 5.

Distance depends on the coordinate scale. If one axis is in metres and the other in centimetres, convert before using the formula. A graph with unequal display scales can also make a perpendicular pair of coordinate directions look misleadingly stretched.

Slope is a rate between coordinates

For x1≠x2x_1\ne x_2, the slope of the line through P,QP,Q is

m=y2−y1x2−x1.m=\frac{y_2-y_1}{x_2-x_1}.

Every pair of distinct points on a nonvertical line gives the same slope. A horizontal line has slope zero; a vertical line has undefined slope because its horizontal change is zero.

If xx is elapsed hours and yy is distance in kilometres, slope has units kilometres per hour. For a line through (2,30)(2,30) and (5,75)(5,75), the slope is 15. Its interpretation depends on whether the vertical coordinate is position, cumulative distance, cost, or another measured quantity.

Forms of a line equation

A line of slope mm through (x0,y0)(x_0,y_0) satisfies y−y0=m(x−x0)y-y_0=m(x-x_0). This point-slope form follows directly from the constant ratio of changes. Expanding gives y=mx+by=mx+b, where b=y0−mx0b=y_0-mx_0 is the vertical intercept.

Through (−1,2)(-1,2) with slope 3, the equation is y−2=3(x+1)y-2=3(x+1), or y=3x+5y=3x+5. Setting y=0y=0 finds the horizontal intercept x=−5/3x=-5/3.

The general form Ax+By=CAx+By=C, with A,BA,B not both zero, also includes vertical lines. If B≠0B\ne0, solve for yy to recover slope −A/B-A/B. If B=0B=0, the line is x=C/Ax=C/A. The equation 0x+0y=C0x+0y=C instead describes either the entire plane when C=0C=0 or no points when C≠0C\ne0.

Parallel and perpendicular directions

Two distinct nonvertical lines with equal slopes are parallel. For nonvertical perpendicular lines with finite slopes, m1m2=−1m_1m_2=-1. One way to see the perpendicular relationship is to take direction vectors (1,m1)(1,m_1) and (1,m2)(1,m_2): their scalar product 1+m1m21+m_1m_2 must be zero. The vector chapter will develop this product geometrically.

The line perpendicular to y=2x+1y=2x+1 through (4,3)(4,3) has slope −1/2-1/2 and equation y−3=−(x−4)/2y-3=-(x-4)/2. Horizontal and vertical lines form a perpendicular pair outside the finite-slope product rule.

A circle is a distance constraint

A point (x,y)(x,y) lies on the circle of radius r>0r>0 centered at (h,k)(h,k) when its distance from the center is rr. Squaring the distance gives

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

The circle (x−2)2+(y+1)2=9(x-2)^2+(y+1)^2=9 has center (2,−1)(2,-1) and radius 3. Its equation determines a set of points, but usually not one value of yy for each xx. Solving gives two branches y=−1±9−(x−2)2y=-1\pm\sqrt{9-(x-2)^2} on −1≤x≤5-1\le x\le5. This distinction between a curve and a function will matter in the next chapter.

Exercises

  1. Find the distance and midpoint between (1,−2)(1,-2) and (7,6)(7,6).
  2. Write the line through (2,5)(2,5) with slope −3-3.
  3. Find the slope and intercepts of 2x+3y=122x+3y=12.
  4. Write the vertical line through (−4,7)(-4,7).
  5. Find the line perpendicular to y=−x/4+2y=-x/4+2 through (1,3)(1,3).
  6. Find the center, radius, and horizontal extent of (x+3)2+(y−2)2=16(x+3)^2+(y-2)^2=16.
Worked solutions
  1. Coordinate differences are 6 and 8, so distance is 10. The midpoint is (4,2)(4,2).
  2. y−5=−3(x−2)y-5=-3(x-2), or y=−3x+11y=-3x+11.
  3. y=−2x/3+4y=-2x/3+4, so slope is −2/3-2/3. Intercepts are (6,0)(6,0) and (0,4)(0,4).
  4. The fixed horizontal coordinate gives x=−4x=-4.
  5. The perpendicular slope is 4, so y−3=4(x−1)y-3=4(x-1), or y=4x−1y=4x-1.
  6. Center (−3,2)(-3,2), radius 4. Horizontal coordinates run from −7-7 to 1, including both.
Your study progress · Optional

Keep your place

Mark this lesson complete after you've read it, attempted its exercises, and explained its central idea in your own words.

Progress is not saved unless you choose to mark the lesson complete.

Saved only in this browser's local storage. No required account, server transmission, or analytics. You can reset your saved progress on the course page. Clearing browser data also clears the record.