edubun
English
1 / 17

2 / 6 · Basic

Graphing a linear equation

The equation y = 2x − 1 has infinitely many solutions, such as (0, −1), (1, 1) and (2, 3). Plotted, they all sit on one straight line.

Jump to the 10 practice questions

You will learn

  • See the solutions of a two-variable equation as points on a line
  • Graph a line from three points or two intercepts
  • Test a point by substituting or by looking

Before this: The coordinate plane

1Explain

Solutions are ordered pairs

The equations in the linear equations course had one variable and usually one solution. An equation such as y = 2x − 1 has two variables, and its solutions are pairs of numbers: an x and a y that make the equation true together. Pick x = 2, work out y = 2 × 2 − 1 = 3, and the ordered pair (2, 3) is a solution. Pick x = 0 and you get (0, −1). Every choice of x gives exactly one y, so there are infinitely many solutions, far too many to list. A graph shows them all at once.

2Problem

y when x = 4

For y = 2x − 1, what is y when x = 4?

Hint

2 · 4 − 1.

Solution

Answer: 7

y = 2 × 4 − 1 = 7, so (4, 7) is on the line.

3Explain

They line up

Plot several solutions of y = 2x − 1 and they line up exactly. That is true of every linear equation in two variables, an equation that can be written as Ax + By = C with A and B not both zero. The graph is a straight line, and every point on the line is a solution. Points off the line are not solutions. So the graph is a picture of the solution set, and reading a point from the line is the same as reading a solution.

xy = 2x − 1(x, y)
−12(−1) − 1 = −3(−1, −3)
02(0) − 1 = −1(0, −1)
12(1) − 1 = 1(1, 1)
22(2) − 1 = 3(2, 3)

4Explain

Plot three points, then draw

Two points are enough to fix a line, but OpenStax recommends finding three. If all three line up, you can be confident; if one is off, a calculation went wrong and the third point shows it. Choose small x-values such as −1, 0 and 1, or values that make the arithmetic easy. For y = (1/2)x + 3, choose even numbers such as 0, 2 and 4, so y comes out whole: (0, 3), (2, 4), (4, 5). Then draw the line through the points with arrows on both ends, because it keeps going.

5Problem

A third point

Why plot a third point when two fix the line?

Hint

A check.

Solution

Answer: To catch a calculation mistake

If one point is off the line through the other two, one of the y-values was worked out wrongly.

6Explore

The two intercepts

Two points are especially quick to find. The y-intercept is where the line crosses the y-axis, so x = 0 there. The x-intercept is where it crosses the x-axis, so y = 0 there. For x + 2y = 6, put x = 0 to get 2y = 6 and the y-intercept (0, 3). Put y = 0 to get x = 6 and the x-intercept (6, 0). Two intercepts and one check point give a quick, reliable graph. Some lines are even simpler: y = 4 is a horizontal line through every point with y-coordinate 4, and x = −2 is a vertical line.

Set A, B and C: the green dot is where y = 0, the orange dot where x = 0. With B = 0 the line is vertical.

−6−6−4−4−2−2224466
equationx + 2y = 6
x-intercept (y = 0)x = 6
y-intercept (x = 0)y = 3

7Problem

x-intercept of x + 2y = 6

What is the x-coordinate of the x-intercept of x + 2y = 6?

Hint

Set y = 0.

Solution

Answer: 6

Put y = 0: x + 0 = 6, so the x-intercept is (6, 0).

8Problem

y-intercept of x + 2y = 6

What is the y-coordinate of the y-intercept of x + 2y = 6?

Hint

Set x = 0.

Solution

Answer: 3

Put x = 0: 2y = 6, y = 3. The y-intercept is (0, 3).

9Problem

x-intercept of 3x − 4y = 12

What is the x-coordinate of the x-intercept of 3x − 4y = 12?

Hint

3x = 12.

Solution

Answer: 4

Put y = 0: 3x = 12, x = 4.

10Problem

y-intercept of 3x − 4y = 12

What is the y-coordinate of the y-intercept of 3x − 4y = 12?

Hint

−4y = 12.

Solution

Answer: −3

Put x = 0: −4y = 12, y = −3.

11Problem

y = 4

What does the graph of y = 4 look like?

Hint

y never changes.

Solution

Answer: A horizontal line

Every point with y = 4 is on it, whatever x is, so it runs left and right.

12Explore

The line as a test

The line also works as a test. To decide whether (3, 5) is a solution of y = 2x − 1 you can substitute, 2 × 3 − 1 = 5, or you can look: the point sits on the line. The point (1, 2) is off the line, and substituting agrees, because 2 × 1 − 1 = 1, not 2. In the graph lab, move the slope and intercept sliders and watch the five table points ride along with the line; each one is still a solution of the new equation.

Loading

Drag to turn. Scroll or pinch to zoom.

y = 2x − 1 with its points for x = −2 to 2. The red dot is the y-intercept and the green dot the x-intercept; the panel lists both and a short table.

13Problem

(3, 5)

Is (3, 5) on the line y = 2x − 1?

Hint

2 · 3 − 1.

Solution

Answer: Yes

When x = 3, y = 2 × 3 − 1 = 5. That matches.

14Problem

(1, 2)

Is (1, 2) on the line y = 2x − 1?

Hint

2 · 1 − 1.

Solution

Answer: No

When x = 1, y = 2 × 1 − 1 = 1. The point has y = 2, so it is not on the line.

15Problem

(2, −2) on y = −3x + 4

Is (2, −2) on the line y = −3x + 4?

Hint

−6 + 4.

Solution

Answer: Yes

When x = 2, y = −3 × 2 + 4 = −2. That matches.

16Explain

Read the scale

Before plotting, read the scale on each axis. A grid square need not represent the same numerical step on both axes. Locate each coordinate using its own axis labels, then check the plotted point by substitution. The equation tests the numbers rather than the appearance of the picture, so it can catch a misplaced point even when the line looks plausible.

17

Summary

  • A solution of an equation in two variables is an ordered pair.
  • The graph of a linear equation is a straight line of all its solutions.
  • Find three points; the third is a check.
  • Intercepts: put x = 0 for the y-intercept, y = 0 for the x-intercept.

Next unitSlope
Full text · The whole lesson as one text

Solutions are ordered pairs

The equations in the linear equations course had one variable and usually one solution. An equation such as y = 2x − 1 has two variables, and its solutions are pairs of numbers: an x and a y that make the equation true together. Pick x = 2, work out y = 2 × 2 − 1 = 3, and the ordered pair (2, 3) is a solution. Pick x = 0 and you get (0, −1). Every choice of x gives exactly one y, so there are infinitely many solutions, far too many to list. A graph shows them all at once.

Plot several solutions of y = 2x − 1 and they line up exactly. That is true of every linear equation in two variables, an equation that can be written as Ax + By = C with A and B not both zero. The graph is a straight line, and every point on the line is a solution. Points off the line are not solutions. So the graph is a picture of the solution set, and reading a point from the line is the same as reading a solution.

xy = 2x − 1(x, y)
−12(−1) − 1 = −3(−1, −3)
02(0) − 1 = −1(0, −1)
12(1) − 1 = 1(1, 1)
22(2) − 1 = 3(2, 3)

Plot three points, then draw

Two points are enough to fix a line, but OpenStax recommends finding three. If all three line up, you can be confident; if one is off, a calculation went wrong and the third point shows it. Choose small x-values such as −1, 0 and 1, or values that make the arithmetic easy. For y = (1/2)x + 3, choose even numbers such as 0, 2 and 4, so y comes out whole: (0, 3), (2, 4), (4, 5). Then draw the line through the points with arrows on both ends, because it keeps going.

Two points are especially quick to find. The y-intercept is where the line crosses the y-axis, so x = 0 there. The x-intercept is where it crosses the x-axis, so y = 0 there. For x + 2y = 6, put x = 0 to get 2y = 6 and the y-intercept (0, 3). Put y = 0 to get x = 6 and the x-intercept (6, 0). Two intercepts and one check point give a quick, reliable graph. Some lines are even simpler: y = 4 is a horizontal line through every point with y-coordinate 4, and x = −2 is a vertical line.

The line also works as a test. To decide whether (3, 5) is a solution of y = 2x − 1 you can substitute, 2 × 3 − 1 = 5, or you can look: the point sits on the line. The point (1, 2) is off the line, and substituting agrees, because 2 × 1 − 1 = 1, not 2. In the graph lab, move the slope and intercept sliders and watch the five table points ride along with the line; each one is still a solution of the new equation.

y = 2x − 1 with its points for x = −2 to 2. The red dot is the y-intercept and the green dot the x-intercept; the panel lists both and a short table.

Before plotting, read the scale on each axis. A grid square need not represent the same numerical step on both axes. Locate each coordinate using its own axis labels, then check the plotted point by substitution. The equation tests the numbers rather than the appearance of the picture, so it can catch a misplaced point even when the line looks plausible.

Key points
  • A solution of an equation in two variables is an ordered pair.
  • The graph of a linear equation is a straight line of all its solutions.
  • Find three points; the third is a check.
  • Intercepts: put x = 0 for the y-intercept, y = 0 for the x-intercept.

Practice questions from Graphing a linear equation on edubun

Embed this quiz

Free to embed. Please keep the credit line.

Sources for this course (6)
  • OpenStax, Elementary Algebra 2e , chapter 4 Graphs: 4.1 Use the Rectangular Coordinate System (quadrants numbered from the upper right, counterclockwise; ordered pairs: openstax.org/books/elementary-algebra-2e/pages/4-1-use-the-rectangular-coordinate-system)
  • 4.2 Graph Linear Equations in Two Variables, 4.3 Graph with Intercepts, 4.4 Understand Slope of a Line (m = rise/run, horizontal 0, vertical undefined, roof pitch, road grade as a percent, wheelchair ramp 1-inch rise per 12-inch run: .../pages/4-4-understand-slope-of-a-line)
  • 4.5 Use the Slope-Intercept Form (x + 2y = 6, F = 9/5 C + 32, parallel lines same slope, perpendicular slopes multiply to −1: .../pages/4-5-use-the-slope-intercept-form-of-an-equation-of-a-line)
  • 4.6 Find the Equation of a Line (point-slope form: .../pages/4-6-find-the-equation-of-a-line)
  • 5.1 Solve Systems of Equations by Graphing (3x − y = 7, x − 2y = 4 and (2, −1); consistent, inconsistent, independent, dependent, coincident lines: .../pages/5-1-solve-systems-of-equations-by-graphing)
  • MacTutor, University of St Andrews, René Descartes biography (La Géométrie, published at Leiden in 1637 as an appendix to the Discours de la méthode: mathshistory.st-andrews.ac.uk/Biographies/Descartes).

Checked: 2026-10-17