Algebra

Slope and linear equations tutorial

A linear equation describes a straight line. The most useful form is slope-intercept form, $y = mx + b$, because $m$ and $b$ tell you everything about the line at a glance. This tutorial covers what slope means, how to read and write equations in this form, and how to find slope from two points.

Key formulas

Slope-intercept form: $y = mx + b$

Slope from two points: $m = \dfrac{y_2 - y_1}{x_2 - x_1}$

where $m$ = slope and $b$ = y-intercept.

What is slope?

Slope ($m$) measures the steepness of a line — how much $y$ changes for every 1-unit increase in $x$. It is often described as rise over run:

$$m = \frac{\text{rise}}{\text{run}} = \frac{\Delta y}{\Delta x} = \frac{y_2 - y_1}{x_2 - x_1}$$

  • Positive slope ($m > 0$): line goes up left to right.
  • Negative slope ($m < 0$): line goes down left to right.
  • Zero slope ($m = 0$): horizontal line.
  • Undefined slope: vertical line (division by zero in the formula).

The y-intercept

The y-intercept ($b$) is the point where the line crosses the y-axis — the value of $y$ when $x = 0$.

In the equation $y = 3x + 2$, the line crosses the y-axis at $(0, 2)$, so $b = 2$.

b = 2 y = x + 2 x y
Advertisement

Reading $y = mx + b$

Once an equation is in slope-intercept form, you can read $m$ and $b$ directly. The coefficient in front of $x$ is the slope; the constant at the end is the y-intercept.

Example: $y = 4x - 3$

Slope $m = 4$, y-intercept $b = -3$, line crosses y-axis at $(0, -3)$.

Example: $y = -2x + 5$

Slope $m = -2$ (line falls left to right), y-intercept $b = 5$.

Example: $y = x$

Slope $m = 1$ (coefficient of 1 is usually hidden), y-intercept $b = 0$.

Finding slope from two points

If you are given two points rather than an equation, use the slope formula:

$$m = \frac{y_2 - y_1}{x_2 - x_1}$$

Example: Find the slope through $(1, 3)$ and $(4, 9)$.

$m = \dfrac{9 - 3}{4 - 1} = \dfrac{6}{3} = 2$

Step-by-step checklist

Reading slope and intercept

  1. Make sure the equation is in the form $y = mx + b$ (isolate $y$ first if needed).
  2. The coefficient of $x$ is $m$.
  3. The constant term is $b$.

Finding slope from two points

  1. Label the two points $(x_1, y_1)$ and $(x_2, y_2)$.
  2. Compute $y_2 - y_1$ (the rise).
  3. Compute $x_2 - x_1$ (the run).
  4. Divide rise ÷ run.

Try a sample problem

Use the formula to answer the question. Click Check answer to see the worked solution.