letx=

Coordinate geometry formulas

Coordinate geometry turns shapes into numbers: a point is a pair (x, y), a line is an equation, and lengths and angles come from arithmetic on coordinates. These are the formulas for working with two points, writing the equation of a line or a circle, and measuring how far a point is from a line.

Printable cheat sheetFormula finder

Distance formula

d=(x2−x1)2+(y2−y1)2

The straight-line distance between two points (x1,y1) and (x2,y2): Pythagoras on a grid.

Midpoint formula

M=(x1+x22,y1+y22)

The point exactly halfway between two points: average the x-coordinates and average the y-coordinates.

Slope formula

m=y2−y1x2−x1

The steepness of the line through two points: rise over run.

Slope-intercept form

y=mx+b

The equation of a straight line from its slope m and the point b where it crosses the y-axis.

Point-slope form

y−y1=m(x−x1)

The equation of a line through a known point with a known slope, without first finding the intercept.

Equation of a circle

(x−h)2+(y−k)2=r2

Every point (x, y) on a circle with centre (h, k) and radius r satisfies this equation.

Slopes of perpendicular lines

m1·m2=−1⇔m2=−1m1

Two lines are perpendicular when their slopes multiply to −1: flip the slope and change its sign.

Distance from a point to a line

d=|ax0+by0+c|a2+b2

The shortest distance from a point (x0,y0) to the line ax+by+c=0, measured along the perpendicular.