Graphing Linear Equations — Step-by-Step Guide

Learn to graph linear equations y = mx + b online. Find slope, y-intercept, x-intercept, parallel and perpendicular lines, and solve systems graphically.

← All Guides
Beginner6 min read

Linear equations produce straight-line graphs and are the foundation of algebra. Understanding how to graph y = mx + b — and what each part means — is an essential skill for students at every level. This guide uses the free graphing calculator so you can try every example instantly.

The Slope-Intercept Form: y = mx + b

Every linear equation can be written as:

  • m = the slope (steepness and direction of the line)
  • b = the y-intercept (where the line crosses the y-axis)

Try it: Basic linear graph

Open the calculator and enter:

  • y = 2x + 1 — slope 2, crosses y-axis at (0, 1)
  • y = -x + 3 — negative slope (goes down), crosses at (0, 3)

💡 A positive slope goes up from left to right. A negative slope goes down. A slope of 0 is a horizontal line.

Understanding Slope

Slope measures how much y changes for each 1-unit increase in x. It is calculated as:

m = (y₂ − y₁) / (x₂ − x₁) = rise / run

  • y = 3x — steep upward slope (rises 3 for every 1 right)
  • y = 0.5x — gentle slope
  • y = -2x — steep downward slope
  • y = 5 — horizontal line, slope = 0

Finding the X-Intercept

The x-intercept is where the line crosses the x-axis (y = 0). To find it algebraically, set y = 0 and solve for x.

For y = 2x + 4: set 0 = 2x + 4, so x = -2. The x-intercept is (-2, 0).

On the graphing calculator, root markers are shown automatically where the line crosses the x-axis. Hover over the marker to see the exact coordinate.

Parallel and Perpendicular Lines

Parallel lines

Parallel lines have the same slope but different y-intercepts. They never intersect. Try:

  • y = 2x + 1
  • y = 2x - 3

Perpendicular lines

Perpendicular lines meet at a right angle. Their slopes are negative reciprocals: if one slope is m, the other is −1/m. Try:

  • y = 2x (slope = 2)
  • y = -0.5x (slope = −1/2)

Systems of Linear Equations

A system of two linear equations has a solution where the lines intersect. Graph both lines to find the solution visually.

Enter both equations:

  • y = x + 2
  • y = -x + 6

The calculator marks intersection points automatically. Hover over the intersection dot to read the exact solution (x = 2, y = 4 in this case).

Using Sliders to Explore

Type y = m*x + b in the calculator. Sliders for m and b appear automatically. Drag them to explore how changing slope and intercept affects the line in real time — a great way to build intuition.

Standard Form: Ax + By = C

If you have an equation in standard form like 2x + 3y = 12, rearrange it to slope-intercept form first:y = (-2/3)x + 4.

Or just enter it as 2*x + 3*y = 12 directly — the calculator can handle it.

📝 Practice problems
  1. Graph y = 3x - 2. What is the y-intercept? Where does it cross the x-axis?
  2. Graph y = x + 1 and y = -x + 5. Where do they intersect?
  3. Find a line parallel to y = 4x + 1 that passes through (0, −3).