Allday Education

Graphing Linear Functions

The graph of a linear function is a straight line, and every point on that line is a solution of the equation. That second part is the key idea: a graph is not decoration — it is a picture of every input-output pair the function produces.

Because two points determine a line, graphing a linear function only ever takes three moves: find two points, plot them, and draw the line through them. Everything in this article is a strategy for finding those two points quickly.

Function notation is just yy

When you see f(x)=2x1f(x) = 2x - 1, read f(x)f(x) as the yy-value. The equation y=2x1y = 2x - 1 and the function f(x)=2x1f(x) = 2x - 1 have exactly the same graph. Writing f(3)f(3) just means the yy-value when x=3x = 3.

To find a point, pick any xx, substitute, and compute. For f(x)=2x1f(x) = 2x - 1: f(0)=1f(0) = -1 gives the point (0,1)(0, -1), and f(2)=3f(2) = 3 gives the point (2,3)(2, 3). Plot both and connect them — the graph below shows the result.

-3-2-11234-3-2-11234xy

Choosing smart points

Any two xx-values work, but some make the arithmetic easier. x=0x = 0 is almost always a good first pick, because it gives the yy-intercept immediately. For an equation like x+2y=4x + 2y = 4 that is not solved for yy, use the intercepts: set x=0x = 0 to find where the line crosses the yy-axis, then set y=0y = 0 to find where it crosses the xx-axis.

If the function has a fraction slope, pick xx-values that clear the fraction. For f(x)=23x+1f(x) = \dfrac{2}{3}x + 1, choosing x=0x = 0 and x=3x = 3 keeps every coordinate a whole number.

Is a point on the graph?

A point is on the graph exactly when substituting its xx-value into the function produces its yy-value. To test whether (2,5)(2, 5) is on the graph of f(x)=4x3f(x) = 4x - 3, compute f(2)=4(2)3=5f(2) = 4(2) - 3 = 5. It matches, so the point is on the line. If the output had been anything other than 55, the point would miss the line.

Worked examples

Example 1: graph from function notation

Graph f(x)=2x1f(x) = 2x - 1.

Evaluate at x=0x = 0f(0)=2(0)1=1f(0) = 2(0) - 1 = -1
Evaluate at x=2x = 2f(2)=2(2)1=3f(2) = 2(2) - 1 = 3
Plot (0,1)(0, -1) and (2,3)(2, 3), then draw the line through them

Answer: The line through (0,1)(0, -1) and (2,3)(2, 3).

Example 2: graph using intercepts

Graph x+2y=4x + 2y = 4.

Set x=0x = 0 and solve2y=4    y=22y = 4 \;\Rightarrow\; y = 2
Set y=0y = 0 and solvex=4x = 4
Plot (0,2)(0, 2) and (4,0)(4, 0), then draw the line through them

Answer: The line through (0,2)(0, 2) and (4,0)(4, 0).

Example 3: test whether a point is on the graph

Is (2,5)(2, 5) on the graph of f(x)=4x3f(x) = 4x - 3?

Substitute the xx-valuef(2)=4(2)3f(2) = 4(2) - 3
Simplifyf(2)=5f(2) = 5
The output equals the point's yy-value

Answer: Yes — (2,5)(2, 5) is on the graph.

Try one yourself

Common questions

Why do I only need two points?

Two points determine exactly one line. A third point is still worth plotting as a check — if it doesn't land on the same line, one of your points has an arithmetic mistake.

What's the difference between f(x)f(x) and yy?

On a graph, nothing — f(x)f(x) is the yy-coordinate. Function notation just makes it easier to talk about specific inputs, like f(3)f(3) meaning the yy-value at x=3x = 3.

Which two points should I pick?

Whichever make the arithmetic clean. x=0x = 0 is usually the easiest start. If the slope is a fraction, pick an xx-value that's a multiple of the denominator.

How do I graph an equation like x+2y=4x + 2y = 4 that isn't solved for yy?

Use the intercepts: plug in x=0x = 0 to get one point, then y=0y = 0 to get another. Or solve the equation for yy first and graph it like any other function.

Want the video version?

Allday Everyday Math has video lessons, practice, and an AI tutor for every topic, Pre-Algebra through Algebra 2.

Try it for $1