Algebra Guide

Graphing Linear Functions Explained Step-by-Step

Learn how to graph linear functions using slope, intercepts, slope-intercept form, point-slope form, and equations that need to be rewritten first.

Graphing linear functions is one of the most important skills in algebra because it connects equations with visual patterns. A graph can show a line's slope, intercepts, direction, and rate of change at a glance.

In this guide, you will learn several ways to graph a linear function and how to decide which method is most useful for the equation you are given.

What Is a Linear Function?

A linear function is a function whose graph is a straight line. Linear functions usually have a constant rate of change, called the slope.

\[ y = mx + b \]

This is called slope-intercept form.

Slope-intercept form

Slope-intercept form is one of the easiest ways to graph a line.

\[ y = mx + b \]

In this form:

  • \(m\) is the slope
  • \(b\) is the \(y\)-intercept

Worked Example

Graphing From Slope-Intercept Form

Graph the linear function:

\[ y = 2x + 3 \]
Slope \(m = 2\)
Y-Intercept \((0,3)\)
Rise / Run \(2/1\)
Step 1
Identify the slope and y-intercept. \(m = 2\) and \(b = 3\).
Step 2
Plot the y-intercept at \((0,3)\).
Step 3
Rewrite the slope as \(2 = \frac{2}{1}\).
Step 4
From \((0,3)\), move up 2 and then right 1 to reach \((1,5)\).
Step 5
Draw the straight line through the two points and extend it in both directions.

Read the Direction of a Line

What Does Slope Mean?

Slope measures a line's rate of change. It compares the vertical change, called the rise, with the horizontal change, called the run.

\[ m = \frac{\text{rise}}{\text{run}} \]
↗
Positive Slope

The line rises from left to right.

↘
Negative Slope

The line falls from left to right.

→
Zero Slope

A horizontal line has no vertical change.

↑
Undefined Slope

A vertical line has zero horizontal change.

A steeper line has a larger absolute slope. For example, \(m = 4\) is steeper than \(m = 1\), while \(m = -4\) is steeper downward than \(m = -1\).

Start From Any Known Point

Graphing From Point-Slope Form

Point-slope form is useful when you know the slope of a line and one point that lies on it.

\[ y - y_1 = m(x - x_1) \]

For example, suppose a line has slope \(3\) and passes through \((2,4)\). Substituting those values gives:

\[ y - 4 = 3(x - 2) \]
Known Point \((2,4)\)
Slope \(m = 3\)
Point-Slope Form \(y - 4 = 3(x - 2)\)
Step 1
Plot the known point \((2,4)\).
Step 2
Rewrite the slope as \(3 = \frac{3}{1}\).
Step 3
From \((2,4)\), move up 3 and then right 1 to reach \((3,7)\).
Step 4
Draw the straight line through the two points.
If you convert the equation to slope-intercept form, \[ y - 4 = 3(x - 2) \] simplifies to \[ y = 3x - 2. \] Both equations represent the same line.

Find Where the Line Crosses the Axes

How Intercepts Help With Graphing

An intercept is a point where a graph crosses one of the coordinate axes.

\[ y = -2x + 6 \]
Y-Intercept \((0,6)\)
X-Intercept \((3,0)\)
Slope \(m=-2\)
Y-Intercept
Set \(x=0\). Then \(y=6\), so the line crosses the y-axis at \((0,6)\).
X-Intercept
Set \(y=0\). Then \(0=-2x+6\), so \(x=3\). The line crosses the x-axis at \((3,0)\).
Graph
Plot both intercepts and draw the straight line through them.
Intercepts are especially useful when both axis crossings are easy to calculate. In some problems, graphing from the intercepts can be faster than starting with slope.

Rewrite Before You Graph

What If the Equation Is Not Solved for y?

Linear equations are not always given in slope-intercept form. If y is not isolated, you can often rewrite the equation first and then graph it using the slope and y-intercept.

\[ 2x + y = 6 \]
Step 1
Start with \(2x + y = 6\).
Step 2
Subtract \(2x\) from both sides: \(y = -2x + 6\).
Step 3
Now identify \(m=-2\) and \(b=6\).
Step 4
Plot \((0,6)\), then use the slope \(-2=-2/1\) to find another point.
Original Form \(2x+y=6\)
Rewritten Form \(y=-2x+6\)
Slope / Intercept \(m=-2,\ b=6\)
Rewriting the equation does not change the line. It only changes the form of the equation so the slope and y-intercept are easier to see.

Watch for These Errors

Common Mistakes When Graphing Linear Functions

Most graphing mistakes come from misreading the equation, using the slope incorrectly, or losing track of signs.

Confusing the slope and y-intercept

In \(y=mx+b\), the coefficient of \(x\) is the slope, while \(b\) is the y-intercept.

Using run over rise instead of rise over run

Slope is always vertical change divided by horizontal change: \(m=\frac{\text{rise}}{\text{run}}\).

Moving the wrong way for a negative slope

A negative slope means that as you move to the right, the line moves downward. For example, \(-2=-2/1\) means down 2 and right 1.

Mixing up x-intercepts and y-intercepts

The y-intercept occurs where \(x=0\). The x-intercept occurs where \(y=0\).

Making sign errors in point-slope form

Remember that point-slope form uses \(x-x_1\) and \(y-y_1\). Negative coordinates create double negatives that simplify to addition.

Graphing before rewriting the equation

If the equation is not already easy to read, rewrite it first. For example, \(2x+y=6\) becomes \(y=-2x+6\).

Choose How You Want to Practice

Practice Graphing Linear Functions

Different kinds of practice build different skills. Use the option that best matches what you want to work on.

Problems + PDF

Graphing Linear Functions Practice

Work through traditional graphing problems, review worked examples, and use the downloadable practice PDF.

Open Practice Page

Visual Exploration

Graphing Lab

Enter equations, compare graphs, explore slope and intercepts, and see how changing an equation changes the graph.

Open Graphing Lab

Build the Bigger Picture

Why Graphing Linear Functions Matters

Graphing linear functions connects equations, slope, coordinates, intercepts, and visual reasoning. These ideas show up throughout algebra and become especially important when working with systems of equations, functions, modeling, and later math courses.

The goal is not just to draw a line correctly. It is to be able to move between an equation, a graph, and the information each one reveals about the relationship.

Personalized Math Support

Need Help Making Sense of the Math?

If a concept still feels confusing, you do not have to work through it alone. Tell me what you are studying and where you are getting stuck, and I will help you determine the best next step.

Support Free Math Resources

Find this resource helpful?

RaulTheTutor.com provides free interactive tools, guides, reference resources, and practice materials for students, parents, and teachers. If this resource helped you, consider making an optional contribution to support the development of more free math resources.

Support Free Math Resources