Lesson 30 of 46 · Algebra

Coordinate geometry: lines, slopes and intercepts

Find slopes and intercepts, write the equation of a line, use parallel and perpendicular slopes, and find midpoints and distances on the plane.

About 22 minutes

In this lesson

  • Find the slope of a line from two points or from its equation in any form.
  • Write the equation of a line from a point and a slope, and find its intercepts.
  • Use the slope rules for parallel and perpendicular lines.
  • Find the midpoint of, and the distance between, two points.

The idea

Slope is rise over run

The slope of the line through (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2) is

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

It measures how much yy changes when xx increases by 1. Take both differences in the same order: if you start the top with the second point, start the bottom with the second point too. Mixing the order flips the sign.

Slope The line
positive rises from left to right
negative falls from left to right
zero horizontal, y=cy = c
undefined vertical, x=cx = c

Three forms of a line

Slope-intercept form, y=mx+by = mx + b: mm is the slope and bb is the yy-intercept, where the line crosses the yy-axis. This is the most useful form for reading a line at a glance.

Point-slope form, y−y1=m(x−x1)y - y_1 = m(x - x_1): use it when you know one point (x1,y1)(x_1, y_1) and the slope. Then rearrange to y=mx+by = mx + b.

Standard form, Ax+By=CAx + By = C: common in questions. To read its slope, solve for yy: y=−ABx+CBy = -\frac{A}{B}x + \frac{C}{B}, so the slope is −AB-\frac{A}{B}. Forgetting the minus sign is the usual slip.

Intercepts

The yy-intercept is where x=0x = 0; the xx-intercept is where y=0y = 0. For 3x+4y=243x + 4y = 24, setting x=0x = 0 gives y=6y = 6, and setting y=0y = 0 gives x=8x = 8. Standard form makes intercepts quick; slope-intercept form makes the slope quick. Choose the form that suits the question.

Is a point on the line?

A point lies on a line exactly when its coordinates satisfy the equation. To test (4,1)(4, 1) against y=−12x+3y = -\frac{1}{2}x + 3, substitute x=4x = 4: y=−2+3=1y = -2 + 3 = 1. It matches, so the point is on the line. This is often the fastest way through a question that lists points as options.

Parallel and perpendicular lines

  • Parallel lines have equal slopes (and different intercepts).
  • Perpendicular lines have slopes whose product is −1-1: each slope is the negative reciprocal of the other. A slope of 23\frac{2}{3} pairs with −32-\frac{3}{2}; a slope of −4-4 pairs with 14\frac{1}{4}.

Both parts of "negative reciprocal" matter. Flipping the fraction without changing the sign, or changing the sign without flipping, gives a line that is not perpendicular. A horizontal line (slope 0) is perpendicular to a vertical line, which has no slope; this is the one case the product rule does not cover.

Midpoint and distance

The midpoint of (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2) averages the coordinates:

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

The distance between them comes from the Pythagorean theorem, with the horizontal and vertical gaps as the two legs:

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

Sketching the right triangle is often quicker than the formula, and it shows when the gaps form a familiar triple such as 6, 8, 10.

Regions on either side of a line

An inequality such as y>2x−1y > 2x - 1 describes the points above the line y=2x−1y = 2x - 1, and y<2x−1y < 2x - 1 the points below it. To check which side a region is on, test a convenient point such as (0,0)(0, 0): here 0>−10 > -1 is true, so the origin is in the region y>2x−1y > 2x - 1.

Draw it

Even a rough sketch on scratch paper catches sign errors. A line through (−1,4)(-1, 4) and (3,−4)(3, -4) obviously falls, so a positive slope is impossible; a perpendicular slope that has the same sign as the original slope is impossible too.

Worked examples

Example 1: From two points to an equation

Find the equation of the line through (−1,4)(-1, 4) and (3,−4)(3, -4), and its xx-intercept.

  1. Slope, taking both differences in the same order: m=−4−43−(−1)=−84=−2m = \frac{-4 - 4}{3 - (-1)} = \frac{-8}{4} = -2.

  2. Point-slope form with (−1,4)(-1, 4): y−4=−2(x+1)y - 4 = -2(x + 1), so y=−2x−2+4=−2x+2y = -2x - 2 + 4 = -2x + 2.

  3. Check with the other point: −2(3)+2=−4-2(3) + 2 = -4. It matches.

  4. xx-intercept: set y=0y = 0, so 0=−2x+20 = -2x + 2 and x=1x = 1.

Answer

y=−2x+2y = -2x + 2, with xx-intercept 1 and yy-intercept 2. Computing 3−(−1)3 - (-1) as 22 would give a slope of −4-4, which the check with (3,−4)(3, -4) rejects.

Example 2: A perpendicular line through a point

Find the line perpendicular to 2x+3y=62x + 3y = 6 that passes through (4,1)(4, 1).

  1. Slope of the given line: 3y=−2x+63y = -2x + 6, so y=−23x+2y = -\frac{2}{3}x + 2 and the slope is −23-\frac{2}{3}.

  2. Negative reciprocal: flip to −32-\frac{3}{2} and change the sign to get 32\frac{3}{2}. Check: −23×32=−1-\frac{2}{3} \times \frac{3}{2} = -1.

  3. Point-slope form: y−1=32(x−4)y - 1 = \frac{3}{2}(x - 4), so y=32x−6+1=32x−5y = \frac{3}{2}x - 6 + 1 = \frac{3}{2}x - 5.

  4. Check the point: 32(4)−5=1\frac{3}{2}(4) - 5 = 1.

Answer

y=32x−5y = \frac{3}{2}x - 5. Using −32-\frac{3}{2} (flipped but not negated) gives a line that is not perpendicular.

Example 3: The triangle cut off by a line

The line 3x+4y=243x + 4y = 24 and the two axes enclose a triangle. Find its area and the length of its longest side.

  1. Intercepts: x=0x = 0 gives y=6y = 6; y=0y = 0 gives x=8x = 8. The vertices are (0,0)(0, 0), (8,0)(8, 0) and (0,6)(0, 6).

  2. The legs lie along the axes, with lengths 8 and 6, so the area is 12×8×6=24\frac{1}{2} \times 8 \times 6 = 24.

  3. The longest side joins (8,0)(8, 0) and (0,6)(0, 6): 82+62=100=10\sqrt{8^2 + 6^2} = \sqrt{100} = 10.

Answer

The area is 24 and the longest side is 10. Forgetting the 12\frac{1}{2} gives 48.

Example 4: Midpoint and distance

Find the midpoint of, and the distance between, (−2,5)(-2, 5) and (4,−3)(4, -3).

  1. Midpoint: (−2+42,5+(−3)2)=(1,1)\left(\frac{-2 + 4}{2}, \frac{5 + (-3)}{2}\right) = (1, 1).

  2. Gaps: horizontal 4−(−2)=64 - (-2) = 6, vertical −3−5=−8-3 - 5 = -8, which has length 8.

  3. Distance: 62+82=100=10\sqrt{6^2 + 8^2} = \sqrt{100} = 10.

  4. Check: the midpoint should be half the distance from each end; from (1,1)(1, 1) to (4,−3)(4, -3) is 9+16=5\sqrt{9 + 16} = 5.

Answer

The midpoint is (1,1)(1, 1) and the distance is 10.

Common traps

  • Run over rise

    Slope is the change in yy over the change in xx. Writing it upside down gives the reciprocal, which is often an option. Say "rise over run" as you write it.

  • The sign of a slope from standard form

    Ax+By=CAx + By = C has slope −AB-\frac{A}{B}. For 2x−5y=102x - 5y = 10 the slope is −2−5=25-\frac{2}{-5} = \frac{2}{5}. Solving for yy is slower but safer than a remembered formula.

  • Half a negative reciprocal

    A line perpendicular to slope 25\frac{2}{5} has slope −52-\frac{5}{2}. Only flipping (52\frac{5}{2}) or only negating (−25-\frac{2}{5}) is wrong, and both are tempting options.

  • Subtracting a negative coordinate

    3−(−1)=43 - (-1) = 4, not 2. Write the brackets in every difference of coordinates.

Check yourself

Answer each question before you open its answer.

Question 1: From two points to the intercept

Coordinate Geometry

Line kk passes through the points (2,−1)(2, -1) and (6,7)(6, 7). What is the yy-intercept of line kk?

  1. A.−5-5
  2. B.−2-2
  3. C.52\frac{5}{2}
  4. D.33
  5. E.55
Show the answer

Answer: A. −5-5

Working

Slope: 7−(−1)6−2=84=2\frac{7 - (-1)}{6 - 2} = \frac{8}{4} = 2. Then −1=2(2)+b-1 = 2(2) + b, so b=−5b = -5. Check with the other point: 2(6)−5=72(6) - 5 = 7.

Why the other options are wrong

  • B. Uses the slope upside down, 12\frac{1}{2}, so −1=1+b-1 = 1 + b.
  • C. This is the xx-intercept, where y=0y = 0, not the yy-intercept.
  • D. Uses a slope of −2-2, with the differences taken in opposite orders, so −1=−4+b-1 = -4 + b.
  • E. From −1=4+b-1 = 4 + b, adds 4 instead of subtracting it.

What carries over

Find the slope, then substitute one point into y=mx+by = mx + b and check with the other point.

Question 2: Comparing two slopes

Quantitative Comparison

Line ℓ\ell has equation 2x−5y=102x - 5y = 10. Line pp is perpendicular to line ℓ\ell.

Quantity A Quantity B
The slope of line ℓ\ell The slope of line pp
  1. A.Quantity A is greater.
  2. B.Quantity B is greater.
  3. C.The two quantities are equal.
  4. D.The relationship cannot be determined from the information given.
Show the answer

Answer: A. Quantity A is greater.

Working

Solve for yy: −5y=−2x+10-5y = -2x + 10, so y=25x−2y = \frac{2}{5}x - 2, and the slope of ℓ\ell is 25\frac{2}{5}. The perpendicular slope is −52-\frac{5}{2}. Since 25>−52\frac{2}{5} > -\frac{5}{2}, Quantity A is greater.

Why the other options are wrong

  • B. Reads the slope of ℓ\ell as −25-\frac{2}{5} by dropping the sign of −5y-5y; then the perpendicular slope would be 52\frac{5}{2}, which is larger.
  • C. Equal slopes belong to parallel lines; perpendicular lines have slopes that multiply to −1-1.
  • D. Line pp could be any of many perpendicular lines, but all of them share the slope −52-\frac{5}{2}.

What carries over

Rewrite a line in the form y = mx + b before reading its slope, then take the negative reciprocal for a perpendicular line.

Question 3: Which point is on the line?

Coordinate Geometry

A line has slope −12-\frac{1}{2} and yy-intercept 3. Which of the following points lies on the line?

  1. A.(−4,1)(-4, 1)
  2. B.(1,1)(1, 1)
  3. C.(4,1)(4, 1)
  4. D.(3,0)(3, 0)
  5. E.(2,7)(2, 7)
Show the answer

Answer: C. (4,1)(4, 1)

Working

The line is y=−12x+3y = -\frac{1}{2}x + 3. At x=4x = 4: y=−2+3=1y = -2 + 3 = 1, so (4,1)(4, 1) is on the line. Testing the others: x=−4x = -4 gives 5, x=1x = 1 gives 2.5, x=3x = 3 gives 1.5, and x=2x = 2 gives 2, none matching.

Why the other options are wrong

  • A. Lies on the line with slope +12+\frac{1}{2}; on the given line, x=−4x = -4 gives y=5y = 5.
  • B. Lies on a line with slope −2-2, the slope flipped upside down; the given line has y=2.5y = 2.5 at x=1x = 1.
  • D. Treats 3 as the xx-intercept; the xx-intercept is 6, and at x=3x = 3 the line has y=1.5y = 1.5.
  • E. Lies on a line with slope 2, the reciprocal without the sign; the given line has y=2y = 2 at x=2x = 2.

What carries over

To test a point, substitute its x-coordinate into the equation and compare the y-value.

Key points

  • Slope is rise over run, with both differences in the same order.

  • Read a slope from y=mx+by = mx + b; for Ax+By=CAx + By = C it is −AB-\frac{A}{B}.

  • Parallel lines share a slope; perpendicular slopes are negative reciprocals.

  • Intercepts: set x=0x = 0 for the yy-intercept and y=0y = 0 for the xx-intercept.

  • Distance is the Pythagorean theorem on the horizontal and vertical gaps.

All questions here are original and written for UniExamer; none comes from the test maker.

Written by the UniExamer team with AI assistance. Every worked example and check question was re-solved by an independent checker before publication. No subject expert has reviewed this lesson yet. If you find a mistake, write to support@uniexamer.com.

Practica este tema

Preguntas nuevas sobre esta habilidad, con explicaciones resueltas. La práctica requiere un Single Exam Pass o Plus.