Math ClubMath Club
v1 · padrão canônico

Lesson 22 — Equation of a Line

Slope-intercept form y = mx + n, general form Ax + By + C = 0, point-slope and parametric. Slope as tangent of inclination angle. Parallel, perpendicular, point-to-line distance and real applications.

Used in: 1st year HS (15–16 years) · Equiv. Math I Japanese §直線の方程式 · Equiv. Class 10 Analytic Geometry German

y=mx+nAx+By+C=0y = mx + n \qquad \Longleftrightarrow \qquad Ax + By + C = 0

The equation of a line admits three equivalent forms: slope-intercept form y=mx+ny = mx + n, general form Ax+By+C=0Ax + By + C = 0, and point-slope form yy0=m(xx0)y - y_0 = m(x - x_0). The slope m=tanαm = \tan\alpha measures how much yy changes per unit of xx.

Choose your door

Rigorous notation, full derivation, hypotheses

Rigorous definition

Slope

"The slope of a line passing through two points (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2) is m=(y2y1)/(x2x1)m = (y_2 - y_1)/(x_2 - x_1), assuming x1x2x_1 \neq x_2." — OpenStax College Algebra 2e, §4.1

Forms of the line equation

"The general equation of a line is Ax+By+C=0Ax + By + C = 0, where AA and BB are not both zero. [...] If B0B \neq 0, the equation can be put in slope-intercept form y=(A/B)x+(C/B)y = (-A/B)x + (-C/B)." — Stitz–Zeager Precalculus, §2.1

Figure: the four positions of a line

increasing (m > 0)decreasing (m < 0)horizontal (m = 0)vertical (m undef.)

Four positions of a line in the plane. Vertical lines have undefined slope.

Parallelism and perpendicularity

Distance from a point to a line

Worked Examples

Exercise list

45 exercises · 11 with worked solution (25%)

Application 27Understanding 7Modeling 7Challenge 2Proof 2
  1. Ex. 22.1Application

    Terry is skiing down a steep hill. Terry's elevation, E(t)E(t), in feet after tt seconds, is given by E(t)=300070tE(t) = 3000 - 70t. What is Terry's initial elevation (the value of EE when t=0t = 0)?

    Select the correct option
    Select an option first
    Show solution
    Substituting t=0t=0 in the formula, E(0)=300070cdot0=3000E(0)=3000-70cdot0=3000, so Terry's initial elevation is 3000 feet.
    Show step-by-step (with the why)
    1. Write the expression E(t)=300070tE(t)=3000-70t.
    2. Set t=0t=0 in the expression.
    3. Calculate E(0)=30000E(0)=3000-0.
    4. Conclude that E(0)=3000E(0)=3000 feet.
  2. Ex. 22.2Application

    Jessica is walking home from a friend's house. After 2 minutes, she is 1.4 miles from home. Twelve minutes after leaving, she is 0.9 miles from home. What is her speed in miles per hour?

    Select the correct option
    Select an option first
    Show solution
    The change in distance is 0.50.5 miles in 1010 minutes (12212-2). Converting 1010 minutes to hours (1/61/6 h), the speed is 0.5/(1/6)=30.5/(1/6)=3 miles/h.
    Show step-by-step (with the why)
    1. Calculate the difference in distance: 1.40.9=0.51.4-0.9=0.5 miles.
    2. Calculate the difference in time: 122=1012-2=10 minutes.
    3. Convert 10 minutes to hours: 10/60=1/610/60=1/6 hour.
    4. Divide distance by time: 0.5div(1/6)=30.5div(1/6)=3 miles/h.
  3. Ex. 22.3ApplicationAnswer key

    A boat is 100 miles from the marina, sailing directly toward it at 10 miles per hour. Write an equation for the distance from the boat to the marina after tt hours.

    Select the correct option
    Select an option first
    Show solution
    Each hour the distance decreases by 10 miles, so d(t)=10010td(t)=100-10t.
  4. Ex. 22.4Application

    Find the slope of the line passing through points (2,4)(2,4) and (4,10)(4,10).

    Select the correct option
    Select an option first
    Show solution
    The change in yy is 104=610-4=6 and in xx is 42=24-2=2, so m=6/2=3m=6/2=3.
    Show step-by-step (with the why)
    1. Calculate $\Delta y = y_2-y_1 = 10-4 = 6$.
    2. Calculate $\Delta x = x_2-x_1 = 4-2 = 2$.
    3. Divide $\Delta y$ by $\Delta x$: $6/2 = 3$.
    4. The slope of the line is m=3m=3.
  5. Ex. 22.5Application

    Find the slope of the line passing through points (1,5)(1,5) and (4,11)(4,11).

    Select the correct option
    Select an option first
    Show solution
    The change in yy is 115=611-5=6, in xx is 41=34-1=3, so m=6/3=2m=6/3=2.
  6. Ex. 22.6ApplicationAnswer key

    Find the slope of the line passing through points (1,4)(-1,4) and (5,2)(5,2).

    Select the correct option
    Select an option first
    Show solution
    The change in yy is 24=22-4=-2, in xx is 5(1)=65-(-1)=6, so m=2/6=1/3m=-2/6=-1/3.
  7. Ex. 22.7Application

    Find the slope of the line passing through points (8,2)(8,-2) and (4,6)(4,6).

    Select the correct option
    Select an option first
    Show solution
    The change in yy is 6(2)=86-(-2)=8, in xx is 48=44-8=-4, so m=8/(4)=2m=8/(-4)=-2.
  8. Ex. 22.8Application

    Find the slope of the line passing through points (6,11)(6,11) and (4,3)(-4,3).

    Select the correct option
    Select an option first
    Show solution
    The change in yy is 311=83-11=-8, in xx is 46=10-4-6=-10, so m=8/10=4/5m=-8/-10=4/5.
  9. Ex. 22.9Modeling

    Find the linear equation satisfying f(5)=4f(-5) = -4 and f(5)=2f(5) = 2.

    Select the correct option
    Select an option first
    Show solution
    The slope is m=(2(4))/(5(5))=6/10=3/5m = (2-(-4))/(5-(-5)) = 6/10 = 3/5. Using y+4 = rac{3}{5}(x+5) we get y = rac{3}{5}x -1.
    Show step-by-step (with the why)
    1. Calculate the slope: m=(2+4)/(5+5)=6/10=3/5m = (2+4)/(5+5) = 6/10 = 3/5.
    2. Choose a point, say (5,4)(-5,-4), and write point-slope form: y+4 = rac{3}{5}(x+5).
    3. Distribute and isolate yy: y = rac{3}{5}x -1.
    4. Check by substituting both given points.
  10. Ex. 22.10Modeling

    Find the linear equation satisfying f(1)=4f(-1) = 4 and f(5)=1f(5) = 1.

    Select the correct option
    Select an option first
    Show solution
    The slope is m=(14)/(5(1))=3/6=1/2m = (1-4)/(5-(-1)) = -3/6 = -1/2. With y-4 = - rac{1}{2}(x+1) we get y = - rac{1}{2}x + rac{7}{2}.
  11. Ex. 22.11Modeling

    Find the equation of the line passing through points (2,4)(2,4) and (4,10)(4,10).

    Select the correct option
    Select an option first
    Show solution
    The slope is m=3m=3. Substituting (2,4)(2,4) in y=3x+by=3x+b gives 4=6+b4=6+b, so b=2b=-2 and y=3x2y=3x-2.
  12. Ex. 22.12ModelingAnswer key

    Find the equation of the line passing through points (1,5)(1,5) and (4,11)(4,11).

    Select the correct option
    Select an option first
    Show solution
    The slope is m=2m=2. Using y=2x+by=2x+b and point (1,5)(1,5): 5=2+b5=2+b, so b=3b=3.
  13. Ex. 22.13Modeling

    Find the equation of the line passing through points (1,4)(-1,4) and (5,2)(5,2).

    Select the correct option
    Select an option first
    Show solution
    The slope is m=(24)/(5(1))=2/6=1/3m = (2-4)/(5-(-1)) = -2/6 = -1/3. With y = - rac{1}{3}x + b and (1,4)(-1,4): 4 = rac{1}{3} + b, so b=11/3b = 11/3.
  14. Ex. 22.14Modeling

    Find the equation of the line passing through points (2,8)(-2,8) and (4,6)(4,6).

    Select the correct option
    Select an option first
    Show solution
    The slope is m=(68)/(4(2))=2/6=1/3m = (6-8)/(4-(-2)) = -2/6 = -1/3. Using y = - rac{1}{3}x + b and (2,8)(-2,8): 8 = rac{2}{3} + b, so b=22/3b = 22/3.
  15. Ex. 22.15Modeling

    Find the equation of the line whose intercepts are (2,0)(-2,0) (x-axis) and (0,3)(0,-3) (y-axis).

    Select the correct option
    Select an option first
    Show solution
    The slope is m = rac{-3-0}{0-(-2)} = -3/2. Using y=mx+by = mx + b with b=3b=-3, we get y = - rac{3}{2}x - 3.
  16. Ex. 22.16Application

    Determine whether the lines 4x7y=104x - 7y = 10 and 7x+4y=17x + 4y = 1 are parallel, perpendicular, or neither.

    Select the correct option
    Select an option first
    Show solution
    Rewriting: y = rac{4}{7}x - rac{10}{7} and y = - rac{7}{4}x + rac{1}{4}. Since rac{4}{7}\cdot(- rac{7}{4}) = -1, the lines are perpendicular.
  17. Ex. 22.17Application

    Determine whether the lines 3y+x=123y + x = 12 and y=8x+1-y = 8x + 1 are parallel, perpendicular, or neither.

    Select the correct option
    Select an option first
    Show solution
    First: y = 4 - rac{1}{3}x (slope 1/3-1/3). Second: y=8x1y = -8x -1 (slope 8-8). Slopes are different and product is not 1-1, so neither parallel nor perpendicular.
  18. Ex. 22.18ApplicationAnswer key

    Determine whether the lines 3y+4x=123y + 4x = 12 and 6y=8x+1-6y = 8x + 1 are parallel, perpendicular, or neither.

    Select the correct option
    Select an option first
    Show solution
    First: y = 4 - rac{4}{3}x (slope 4/3-4/3). Second: y = - rac{4}{3}x - rac{1}{6} (same slope). Since slopes are equal and intercepts differ, the lines are parallel.
  19. Ex. 22.19Application

    Determine whether the lines 6x9y=106x - 9y = 10 and 3x+2y=13x + 2y = 1 are parallel, perpendicular, or neither.

    Select the correct option
    Select an option first
    Show solution
    First: y = rac{2}{3}x - rac{10}{9} (slope 2/32/3). Second: y = - rac{3}{2}x + rac{1}{2} (slope 3/2-3/2). Since (2/3)(3/2)=1(2/3)(-3/2) = -1, the lines are perpendicular.
  20. Ex. 22.20ApplicationAnswer key

    Find the x and y intercepts of the line f(x)=x+2f(x) = -x + 2.

    Select the correct option
    Select an option first
    Show solution
    For y=0y=0, 0=x+2Rightarrowx=20 = -x + 2 Rightarrow x = 2. For x=0x=0, y=2y = 2. Thus (2,0)(2,0) and (0,2)(0,2).
    Show step-by-step (with the why)
    1. Set y=0y=0 and solve 0=x+20 = -x + 2x=2x = 2.
    2. Set x=0x=0 and calculate y=0+2y = -0 + 2y=2y = 2.
    3. Write the intercept points: (2,0)(2,0) and (0,2)(0,2).
  21. Ex. 22.21Application

    Find the x and y intercepts of the line g(x)=2x+4g(x) = 2x + 4.

    Select the correct option
    Select an option first
    Show solution
    For y=0y=0, 0=2x+4Rightarrowx=20 = 2x + 4 Rightarrow x = -2. For x=0x=0, y=4y = 4. Thus (2,0)(-2,0) and (0,4)(0,4).
  22. Ex. 22.22Application

    Find the x and y intercepts of the line h(x)=3x5h(x) = 3x - 5.

    Select the correct option
    Select an option first
    Show solution
    For y=0y=0, 0=3x5Rightarrowx=5/30 = 3x -5 Rightarrow x = 5/3. For x=0x=0, y=5y = -5. Thus (5/3,0)(5/3,0) and (0,5)(0,-5).
  23. Ex. 22.23ApplicationAnswer key

    Find the x and y intercepts of the line k(x)=5x+1k(x) = -5x + 1.

    Select the correct option
    Select an option first
    Show solution
    For y=0y=0, 0=5x+1Rightarrowx=1/50 = -5x +1 Rightarrow x = 1/5. For x=0x=0, y=1y = 1. Thus (1/5,0)(1/5,0) and (0,1)(0,1).
  24. Ex. 22.24Application

    Find the x and y intercepts of the line 2x+5y=20-2x + 5y = 20.

    Select the correct option
    Select an option first
    Show solution
    For y=0y=0, 2x=20Rightarrowx=10-2x = 20 Rightarrow x = -10. For x=0x=0, 5y=20Rightarrowy=45y = 20 Rightarrow y = 4. Thus (10,0)(-10,0) and (0,4)(0,4).
  25. Ex. 22.25ApplicationAnswer key

    Find the x and y intercepts of the line 7x+2y=567x + 2y = 56.

    Select the correct option
    Select an option first
    Show solution
    For y=0y=0, 7x=56Rightarrowx=87x = 56 Rightarrow x = 8. For x=0x=0, 2y=56Rightarrowy=282y = 56 Rightarrow y = 28. Thus (8,0)(8,0) and (0,28)(0,28).
  26. Ex. 22.26Application

    Find the slopes of the lines: Line 1 passes through (0,6)(0,6) and (3,24)(3,-24); Line 2 passes through (1,19)(-1,19) and (8,71)(8,-71). Are the lines parallel, perpendicular, or neither?

    Select the correct option
    Select an option first
    Show solution
    Slope of Line 1: m1=(246)/(30)=30/3=10m_1 = (-24-6)/(3-0) = -30/3 = -10. Slope of Line 2: m2=(7119)/(8(1))=90/9=10m_2 = (-71-19)/(8-(-1)) = -90/9 = -10. Since m1=m2m_1 = m_2, the lines are parallel.
  27. Ex. 22.27ApplicationAnswer key

    Find the slopes of the lines: Line 1 passes through (8,55)(-8,-55) and (10,89)(10,89); Line 2 passes through (9,44)(9,-44) and (4,14)(4,-14). Are the lines parallel, perpendicular, or neither?

    Select the correct option
    Select an option first
    Show solution
    Slope of Line 1: m1=(89+55)/(10+8)=144/18=8m_1 = (89+55)/(10+8) = 144/18 = 8. Slope of Line 2: m2=(14+44)/(49)=30/(5)=6m_2 = (-14+44)/(4-9) = 30/(-5) = -6. Since m1eqm2m_1 eq m_2 and m1m2eq1m_1 m_2 eq -1, the lines are neither parallel nor perpendicular.
  28. Ex. 22.28Application

    Find the slopes of the lines: Line 1 passes through (2,3)(2,3) and (4,1)(4,-1); Line 2 passes through (6,3)(6,3) and (8,5)(8,5). Are the lines parallel, perpendicular, or neither?

    Select the correct option
    Select an option first
    Show solution
    Slope of Line 1: m1=(13)/(42)=4/2=2m_1 = (-1-3)/(4-2) = -4/2 = -2. Slope of Line 2: m2=(53)/(86)=2/2=1m_2 = (5-3)/(8-6) = 2/2 = 1. Since m1eqm2m_1 eq m_2 and m1m2eq1m_1 m_2 eq -1, the lines are neither parallel nor perpendicular.
  29. Ex. 22.29ApplicationAnswer key

    Find the slopes of the lines: Line 1 passes through (1,7)(1,7) and (5,5)(5,5); Line 2 passes through (1,3)(-1,-3) and (1,1)(1,1). Are the lines parallel, perpendicular, or neither?

    Select the correct option
    Select an option first
    Show solution
    Slope of Line 1: m1=(57)/(51)=2/4=1/2m_1 = (5-7)/(5-1) = -2/4 = -1/2. Slope of Line 2: m2=(1+3)/(1+1)=4/2=2m_2 = (1+3)/(1+1) = 4/2 = 2. Since m1m2=1m_1 m_2 = -1, the lines are perpendicular.
  30. Ex. 22.30Application

    Find the slopes of the lines: Line 1 passes through (2,5)(2,5) and (5,1)(5,-1); Line 2 passes through (3,7)(-3,7) and (3,5)(3,-5). Are the lines parallel, perpendicular, or neither?

    Select the correct option
    Select an option first
    Show solution
    Slope of Line 1: m1=(15)/(52)=6/3=2m_1 = (-1-5)/(5-2) = -6/3 = -2. Slope of Line 2: m2=(57)/(3(3))=12/6=2m_2 = (-5-7)/(3-(-3)) = -12/6 = -2. Since m1=m2m_1 = m_2, the lines are parallel.
  31. Ex. 22.31ApplicationAnswer key

    Write the equation of the line parallel to f(x)=5x3f(x) = -5x -3 passing through (2,12)(2,-12).

    Select the correct option
    Select an option first
    Show solution
    The slope is 5-5. Using point (2,12)(2,-12): y+12=5(x2)Rightarrowy=5x2y+12 = -5(x-2) Rightarrow y = -5x -2.
  32. Ex. 22.32Application

    Write the equation of the line parallel to g(x)=3x1g(x) = 3x -1 passing through (4,9)(4,9).

    Select the correct option
    Select an option first
    Show solution
    The slope is 33. With point (4,9)(4,9): y9=3(x4)Rightarrowy=3x3y-9 = 3(x-4) Rightarrow y = 3x -3.
  33. Ex. 22.33Application

    Write the equation of the line perpendicular to h(t)=2t+4h(t) = -2t + 4 passing through (4,1)(-4,-1).

    Select the correct option
    Select an option first
    Show solution
    The original slope is 2-2, so the perpendicular slope is rac{1}{2}. Using (4,1)(-4,-1): y+1 = rac{1}{2}(x+4) \Rightarrow y = rac{1}{2}x + 1.
  34. Ex. 22.34Application

    Write the equation of the line perpendicular to p(t)=3t+4p(t) = 3t + 4 passing through (3,1)(3,1).

    Select the correct option
    Select an option first
    Show solution
    The original slope is 33, so the perpendicular slope is 1/3-1/3. With (3,1)(3,1): y-1 = - rac{1}{3}(x-3) \Rightarrow y = - rac{1}{3}x + 2.
  35. Ex. 22.35Challenge

    Which of the descriptions below corresponds to the graph of the function f(x)=x1f(x) = -x - 1?

    Select the correct option
    Select an option first
    Show solution
    The function has slope 1-1, so the line is decreasing and intersects the y-axis at 1-1.
    Show step-by-step (with the why)
    1. Identify the slope: m=1m = -1 (negative slope).
    2. Identify the constant term: b=1b = -1 (y-intercept).
    3. Conclude that the line descends from left to right and crosses the y-axis at 1-1.
    4. Choose the option that describes this behavior.
  36. Ex. 22.36Challenge

    Which of the descriptions below corresponds to the graph of the function f(x)=3x1f(x) = -3x - 1?

    Select the correct option
    Select an option first
    Show solution
    The slope 3-3 indicates negative slope with greater magnitude than 1-1, so the line is steeper and decreasing, crossing the y-axis at 1-1.
    Show step-by-step (with the why)
    1. Slope m=3m = -3 → negative slope.
    2. Constant term b=1b = -1 → y-intercept at 1-1.
    3. The magnitude m=3|m|=3 indicates steeper slope than 1-1.
    4. Select the alternative that describes this line.
  37. Ex. 22.37Understanding

    If two lines are perpendicular, how do their slopes relate?

    Select the correct option
    Select an option first
    Show solution
    For perpendicular lines, m1cdotm2=1m_1 cdot m_2 = -1.
    Show step-by-step (with the why)
    1. Denote the slopes m1m_1 and m2m_2.
    2. Use the geometric property of right angles.
    3. Conclude that m1m2=1m_1 m_2 = -1.
  38. Ex. 22.38Understanding

    What intersection point results from combining a horizontal line f(x)=af(x)=a and a vertical line x=ax=a?

    Select the correct option
    Select an option first
    Show solution
    The horizontal line has y=ay=a, the vertical has x=ax=a, so the intersection is (a,a)(a,a).
  39. Ex. 22.39Understanding

    Can the equation y=14x+6y = \frac{1}{4}x + 6 be written as a linear function?

    Select the correct option
    Select an option first
    Show solution
    The form y=mx+by = mx + b characterizes linear functions; therefore the equation represents a line.
  40. Ex. 22.40Understanding

    Can the equation y=3x5y = 3x - 5 be written as a linear function?

    Select the correct option
    Select an option first
    Show solution
    The expression has the standard form y=mx+by = mx + b, so it is linear.
  41. Ex. 22.41UnderstandingAnswer key

    Does the equation y=3x22y = 3x^{2} - 2 represent a linear function?

    Select the correct option
    Select an option first
    Show solution
    The presence of the x2x^{2} term makes the relation nonlinear.
  42. Ex. 22.42Understanding

    Can the equation 3x+5y=153x + 5y = 15 be written as a linear function?

    Select the correct option
    Select an option first
    Show solution
    Isolating yy: 5y = -3x + 15 \Rightarrow y = - rac{3}{5}x + 3, linear form.
  43. Ex. 22.43Understanding

    Does the equation 3x2+5y=153x^{2} + 5y = 15 represent a linear function?

    Select the correct option
    Select an option first
    Show solution
    The x2x^{2} term prevents the relation from being linear.
  44. Ex. 22.44Proof

    Sketch the graph of the function f(x)=2x1f(x) = -2x - 1.

    Select the correct option
    Select an option first
    Show solution
    With b=1b=-1 and m=2m=-2, the line descends two units in yy for each unit advanced in xx.
    Show step-by-step (with the why)
    1. Identify the slope m=2m=-2 (negative slope).
    2. Identify the y-intercept at 1-1.
    3. Mark the points (0,1)(0,-1) and (1,3)(1,-3).
    4. Draw a straight line through these points.
  45. Ex. 22.45Proof

    Sketch the graph of the function f(x)=3x+2f(x) = -3x + 2.

    Select the correct option
    Select an option first
    Show solution
    The y-intercept is $y=2$ and the slope is $-3$, indicating a line that descends three units in $y$ for each unit advanced in $x$.
    Show step-by-step (with the why)
    1. Slope m=3m=-3 (negative slope).
    2. y-intercept at 22.
    3. Mark (0,2)(0,2) and (1,1)(1,-1).
    4. Draw the line through these points.

Fontes

  • OpenStax College Algebra 2e — Jay Abramson et al. (OpenStax) · 2022 · EN · CC-BY 4.0 · §4.1 Linear Functions, §4.2 Modeling with Linear Functions, §4.3 Fitting Linear Models to Data. Primary source.
  • Stitz–Zeager Precalculus — Carl Stitz & Jeff Zeager · 2013 · EN · CC-BY-NC-SA · §2.1 Linear Functions, §2.2 Absolute Value Functions.
  • OpenStax Algebra and Trigonometry 2e — OpenStax · 2022 · EN · CC-BY 4.0 · §2.2 Graphs of Linear Functions.

Updated on 2026-05-05 · Author(s): Clube da Matemática

Found an error? Open an issue on GitHub or submit a PR — open source forever.