Mathematics · Functions

Line Equation and Slope

The slope m measures the change in y per step in x; together with the y-intercept b it fixes the line y = mx + b.

BasicExam-relevant

Free · no credit card · in your study plan in 2 minutes

Formula

LaTeX: m = \frac{y_{2} - y_{1}}{x_{2} - x_{1}}, \quad y = m \cdot x + b
Dimensionless (algebra) · in applied contexts m carries the unit y-unit per x-unit

Variables & units – Line Equation and Slope

SymbolMeaningUnit
mSlope (change in y per x unit)dimensionless
by-intercept (intersection with the y-axis)dimensionless
(x₁|y₁), (x₂|y₂)Two points of the linedimensionless

Derivation & background – Line Equation and Slope

The slope triangle makes m concrete: m = Δy/Δx. We have m > 0 rising, m < 0 falling, m = 0 horizontal; vertical lines have no slope. Parallel lines share the same m, perpendicular ones satisfy m₁·m₂ = −1. The angle of inclination θ to the x-axis satisfies tan θ = m; m = 1 corresponds to 45°. In calculus m becomes local: the tangent slope is the derivative.

Exam blueprint

Validity range

Holds for all non-vertical lines in the plane; vertical lines (x = c) have no slope. The two-point formula requires x₁ ≠ x₂.

Derivation steps

The slope triangle between two points fixes m, one point then fixes b.

  1. 1Between two points m = Δy/Δx = (y₂ − y₁)/(x₂ − x₁); the ratio is the same for any choice of points.
  2. 2Inserting one point into y = mx + b yields b = y₁ − m·x₁.

Rearrangements

Determine the y-intercept

One known point plus m suffices for the whole line.

Point-slope form

Directly usable without computing b first.

Root

Intersection with the x-axis (m ≠ 0).

Task variant

Determine the line through P(2|3) with slope m = −2.

b = 3 − (−2)·2 = 7, so y = −2x + 7. Check: −2·2 + 7 = 3 ✓.

Which line passes through (−1|5) and (3|−3)?

m = (−3 − 5)/(3 − (−1)) = −8/4 = −2. b: 5 = −2·(−1) + b, so b = 3. Line: y = −2x + 3. Check with (3|−3): −6 + 3 = −3 ✓.

Common mistakes

Swapping numerator and denominator of the slope formula (Δx/Δy).

Slope is vertical change per horizontal step: Δy on top, Δx below.

Mixing the point order: (y₂ − y₁)/(x₁ − x₂).

Same order in numerator and denominator, otherwise the sign flips.

Confusing slope m and y-intercept b.

m multiplies x and measures the incline; b is the intersection with the y-axis.

Exam context

  • Linear models in word problems, tangents and normals in calculus, families of lines, systems of linear equations.

These mistakes cost points in real exams. The set drills them until they stick.

Worked example

Line through P(1|2) and Q(4|11): m = (11 − 2)/(4 − 1) = 9/3 = 3. b via P: 2 = 3·1 + b, so b = −1. Result: y = 3x − 1. Check with Q: 3·4 − 1 = 11 ✓.

Applications

Linear processes (tariffs, filling processes, depreciation), tangent and normal equations in calculus, linear interpolation, conversion formulas (e.g. °C to °F)

Quanta exam set

Curated exam set for "Line Equation and Slope":

Question (front)

Which formula describes Line Equation and Slope?

Answer in your set

Question (front)

How do you rearrange m = Δy/Δx, y = mx + b for Determine the y-intercept?

Answer in your set

Question (front)

Which common mistake happens with Line Equation and Slope?

Answer in your set

+ 7 more cards: units, variables, derivation, example, exam task

These 10 cards are ready. One click and they sit in your deck, FSRS schedules the reviews until exam day.

Scientific sources

Common notations & search queries

m=(y2-y1)/(x2-x1)y=mx+by=mx+nSteigung berechnen zwei PunkteGeradengleichung aufstellenlineare Funktion Formelslope formulaSteigungsdreiecky-Achsenabschnitt bestimmen

Related formulas

More Mathematics formulas

Frequently asked questions about Line Equation and Slope

How do you calculate the slope from two points?+

With the two-point formula m = (y₂ − y₁)/(x₂ − x₁): y-difference over x-difference, in the same point order. Example: P(1|2) and Q(4|11) give m = (11 − 2)/(4 − 1) = 9/3 = 3; the line climbs 3 units per step to the right. Mind two traps: first, Δy belongs in the numerator (not Δx), second, you must not mix the order, otherwise the sign flips. Intuitively m is the slope triangle: 1 to the right, m upwards. For x₁ = x₂ the formula is undefined; that is the vertical line, which has no slope.

What does a negative slope mean?+

The line falls: per step to the right it drops by |m| units. So y = −2x + 7 loses 2 units per x-step. In applied contexts a negative slope describes decrease processes, e.g. a water level sinking 2 cm per hour, or a battery losing 0.5 % per minute; m then carries the unit y-unit per x-unit. Fully sorted: m > 0 rising, m = 0 horizontal (constant function), m < 0 falling; the larger |m|, the steeper. The angle of inclination is measured negative for negative m accordingly: tan θ = m, for m = −1 that is −45°.

How do you determine the y-intercept b?+

Three routes. First, read it off: b is the y-value where the line crosses the y-axis, i.e. f(0). Second, compute: if m is known and a point (x₁|y₁) is given, b follows from substituting into y = mx + b, rearranged b = y₁ − m·x₁. Example: m = 3 and P(1|2) give b = 2 − 3·1 = −1, so y = 3x − 1. Third, work without b: the point-slope form y = m(x − x₁) + y₁ yields the line directly. Finally check with the second point if available. Do not confuse b with the root: b lies on the y-axis, the root x₀ = −b/m on the x-axis.

When are two lines parallel or perpendicular to each other?+

Lines are parallel exactly when their slopes agree: m₁ = m₂ (and b differs, otherwise they are identical). They are perpendicular when m₁·m₂ = −1; the second slope is the negative reciprocal of the first. Example: to y = 2x + 1 every line with m = 2 is parallel and every line with m = −1/2 perpendicular, e.g. y = −0.5x + 4. This rule is the tool for normals in calculus: the normal at a curve point has slope −1/f′(x₀). Special case: horizontal (m = 0) and vertical lines are also perpendicular to each other, although the product rule formally fails there because the vertical line has no slope.

How are slope, angle of inclination and percentages related?+

The angle of inclination θ between line and x-axis satisfies tan θ = m, so θ = arctan(m). For m = 1 that is 45°, for m = 3 about 71.6°. Traffic signs state gradients in percent: 12 % means m = 0.12, i.e. 12 m of height gain per 100 m horizontal distance; the angle is arctan(0.12) ≈ 6.8°. Conversely 100 % corresponds to exactly 45°, not 90°; that is a popular trick question. Note that percentage and angle are not proportional, because the tangent does not grow linearly. In applied tasks it pays to distinguish consistently between m (ratio), angle (degrees) and percent (m·100).

Retain Line Equation and Slope for exams

Create a curated FSRS exam set for m = Δy/Δx, y = mx + b: formula recall, variables, derivation, rearrangement, worked example, common mistakes and exam context.

Free · curated formula set · LaTeX · FSRS spaced repetition

How do you calculate with Line Equation and Slope?

Here is how to work through a typical Line Equation and Slope (m = Δy/Δx, y = mx + b) task step by step:

  1. 1

    Task

    Determine the line through P(2|3) with slope m = −2.

    Solution path

    b = 3 − (−2)·2 = 7, so y = −2x + 7. Check: −2·2 + 7 = 3 ✓.

  2. 2

    Task

    Which line passes through (−1|5) and (3|−3)?

    Solution path

    m = (−3 − 5)/(3 − (−1)) = −8/4 = −2. b: 5 = −2·(−1) + b, so b = 3. Line: y = −2x + 3. Check with (3|−3): −6 + 3 = −3 ✓.