Algebra

Graphing Linear Equations

Last updated: March 2026 · Intermediate
Before you start

You should be comfortable with:

Real-world applications
💰
Retail & Finance

Discounts, tax, tips, profit margins

💊
Nursing

Medication dosages, IV drip rates, vital monitoring

A linear equation in two variables produces a straight line when graphed on a coordinate plane. Learning to graph these equations lets you visualize relationships between quantities — costs and quantities, dosages and weights, distance and time — and quickly identify trends, intercepts, and break-even points.

Slope-Intercept Form: y=mx+by = mx + b

This is the most common form for graphing. The equation gives you two pieces of information directly:

  • mm = the slope (steepness and direction of the line)
  • bb = the y-intercept (where the line crosses the yy-axis)

How to Graph from Slope-Intercept Form

  1. Plot the y-intercept (0,b)(0, b) on the yy-axis
  2. Use the slope to find a second point: from the y-intercept, move up (or down) by the rise and right by the run
  3. Draw a straight line through both points and extend it in both directions

Example 1: Graph y=2x+1y = 2x + 1

Step 1 — Identify slope and y-intercept:

m=2=21m = 2 = \frac{2}{1} (rise 2, run 1), b=1b = 1

Step 2 — Plot the y-intercept: Place a point at (0,1)(0, 1).

Step 3 — Use the slope: From (0,1)(0, 1), move up 2 and right 1 to reach (1,3)(1, 3).

Step 4 — Plot a third point for accuracy: From (1,3)(1, 3), move up 2 and right 1 to reach (2,5)(2, 5).

Step 5 — Draw the line through (0,1)(0, 1), (1,3)(1, 3), and (2,5)(2, 5).

Graph of y = 2x + 1

-11234-112345670+1+2m = 2(0, 1)(1, 3)(2, 5)b = 1xy

Example 2: Graph y=34x+6y = -\frac{3}{4}x + 6

Step 1 — Identify slope and y-intercept:

m=34m = -\frac{3}{4} (down 3, right 4), b=6b = 6

Step 2 — Plot the y-intercept: Place a point at (0,6)(0, 6).

Step 3 — Use the slope: From (0,6)(0, 6), move down 3 and right 4 to reach (4,3)(4, 3).

Step 4 — Draw the line through the points. The negative slope means the line falls from left to right.

Graphing Using X and Y Intercepts

An alternative method that works well when the equation is not in slope-intercept form.

  • The y-intercept is found by setting x=0x = 0
  • The x-intercept is found by setting y=0y = 0

Example 3: Graph 3x+2y=123x + 2y = 12

Find the y-intercept (set x=0x = 0):

3(0)+2y=12    2y=12    y=63(0) + 2y = 12 \implies 2y = 12 \implies y = 6

Y-intercept: (0,6)(0, 6)

Find the x-intercept (set y=0y = 0):

3x+2(0)=12    3x=12    x=43x + 2(0) = 12 \implies 3x = 12 \implies x = 4

X-intercept: (4,0)(4, 0)

Draw the line through (0,6)(0, 6) and (4,0)(4, 0).

Point-Slope Form: yy1=m(xx1)y - y_1 = m(x - x_1)

Use this form when you know the slope and one point on the line (but not necessarily the y-intercept).

Example 4: Write and graph the equation of a line with slope 33 passing through (2,5)(2, 5)

Step 1 — Substitute into point-slope form:

y5=3(x2)y - 5 = 3(x - 2)

Step 2 — Convert to slope-intercept form (optional, for graphing):

y5=3x6y - 5 = 3x - 6

y=3x1y = 3x - 1

Step 3 — Graph: The y-intercept is (0,1)(0, -1) and the slope is 3. Plot (0,1)(0, -1), then move up 3 and right 1 to (1,2)(1, 2), then to (2,5)(2, 5).

Horizontal and Vertical Lines

Horizontal lines have the form y=cy = c (where cc is a constant). The slope is 0.

  • Example: y=4y = 4 is a flat line crossing the yy-axis at 4

Vertical lines have the form x=cx = c. The slope is undefined.

  • Example: x=2x = -2 is a vertical line crossing the xx-axis at 2-2

Vertical lines are not functions because a single xx-value maps to infinitely many yy-values.

Real-World Application: Retail — Break-Even Analysis

A small business sells custom phone cases. The costs and revenue can be modeled as linear equations:

  • Cost: y=5x+200y = 5x + 200 (each case costs $5 to produce, plus $200 in fixed monthly expenses)
  • Revenue: y=12xy = 12x (each case sells for $12)

To graph these:

Cost line: y-intercept at (0,200)(0, 200), slope of 5 (up 5, right 1)

Revenue line: y-intercept at (0,0)(0, 0), slope of 12 (up 12, right 1)

The break-even point is where the two lines intersect. Setting cost equal to revenue:

5x+200=12x5x + 200 = 12x

200=7x200 = 7x

x28.6x \approx 28.6

The business must sell approximately 29 cases to break even. On a graph, you can see this visually: below 29 cases the cost line is above the revenue line (operating at a loss), and above 29 cases the revenue line is higher (profit).

Common Mistakes to Avoid

  1. Plotting slope backwards. Slope is riserun\frac{\text{rise}}{\text{run}}, not runrise\frac{\text{run}}{\text{rise}}. For m=23m = \frac{2}{3}, move up 2 and right 3 — not up 3 and right 2.

  2. Forgetting the negative in a negative slope. For m=34m = -\frac{3}{4}, you move down 3 and right 4 (or up 3 and left 4).

  3. Confusing x-intercept and y-intercept. The y-intercept is where x=0x = 0; the x-intercept is where y=0y = 0.

  4. Not plotting enough points. Two points define a line, but plotting a third point helps you catch errors.

Practice Problems

Test your understanding with these problems. Click to reveal each answer.

Problem 1: Identify the slope and y-intercept of y=4x+7y = -4x + 7.

Slope: m=4m = -4

Y-intercept: b=7b = 7, so the line crosses the yy-axis at (0,7)(0, 7)

Answer: Slope is 4-4, y-intercept is (0,7)(0, 7).

Problem 2: Find the x-intercept and y-intercept of 2x5y=102x - 5y = 10.

Y-intercept (set x=0x = 0): 5y=10    y=2-5y = 10 \implies y = -2. Point: (0,2)(0, -2)

X-intercept (set y=0y = 0): 2x=10    x=52x = 10 \implies x = 5. Point: (5,0)(5, 0)

Answer: Y-intercept is (0,2)(0, -2); x-intercept is (5,0)(5, 0).

Problem 3: Write the equation of a line with slope 2-2 passing through (3,1)(3, 1) in slope-intercept form.

Start with point-slope: y1=2(x3)y - 1 = -2(x - 3)

Distribute: y1=2x+6y - 1 = -2x + 6

Add 1: y=2x+7y = -2x + 7

Answer: y=2x+7y = -2x + 7

Problem 4: A plumber charges a $75 service call fee plus $50 per hour. Write the equation and identify the y-intercept and slope.

y=50x+75y = 50x + 75

The slope is 5050 (cost increases $50 per hour). The y-intercept is 7575 (the base fee before any work begins).

Answer: y=50x+75y = 50x + 75, slope = 5050, y-intercept = (0,75)(0, 75).

Problem 5: Is the line x=5x = 5 horizontal or vertical? What is its slope?

x=5x = 5 is a vertical line. Every point on this line has x=5x = 5 regardless of the yy-value.

The slope is undefined (the run is 0, and you cannot divide by zero).

Answer: Vertical line, undefined slope.

Key Takeaways

  • Slope-intercept form (y=mx+by = mx + b) gives you the slope and y-intercept directly — it is the fastest way to graph a line
  • Point-slope form (yy1=m(xx1)y - y_1 = m(x - x_1)) is useful when you know a point and the slope but not the y-intercept
  • Intercept method: set x=0x = 0 to find the y-intercept and y=0y = 0 to find the x-intercept, then connect them
  • Horizontal lines (y=cy = c) have zero slope; vertical lines (x=cx = c) have undefined slope
  • Graphing lets you visualize relationships and quickly identify key values like break-even points and trends

Return to Algebra for more topics in this section.

Last updated: March 28, 2026