Math Core

Lesson 8.2 · Graphing and Linear Functions

Graphing linear equations

An equation like x+3=7x + 3 = 7 has one solution. An equation with two variables, like y=2x−1y = 2x - 1, has infinitely many. Graphing lets you see all of those solutions at once, and for many equations they line up perfectly in a straight line.

Solutions are ordered pairs

A solution of an equation in xx and yy is an ordered pair (x,y)(x, y) that makes the equation true.

Is (3,5)(3, 5) a solution of y=2x−1y = 2x - 1? Substitute x=3x = 3 and y=5y = 5:

5=?2(3)−1=6−1=5✓5 \overset{?}{=} 2(3) - 1 = 6 - 1 = 5 \quad \checkmark

Yes. What about (1,4)(1, 4)? Then 2(1)−1=12(1) - 1 = 1, not 4, so (1,4)(1, 4) is not a solution.

Make a table, then plot

To find solutions, pick values for xx and work out yy. Small numbers like −1-1, 0, 1 and 2 keep the arithmetic easy.

Worked example: Graphing y = 2x − 1

Make a table of values and graph y=2x−1y = 2x - 1.

xx2x−12x - 1yypoint
−1-12(−1)−12(-1) - 1−3-3(−1,−3)(-1, -3)
02(0)−12(0) - 1−1-1(0,−1)(0, -1)
12(1)−12(1) - 11(1,1)(1, 1)
22(2)−12(2) - 13(2,3)(2, 3)

Plot the points. They fall in a straight line, so draw the line through them and put arrows on both ends.

y = 2x - 1(-1, -3)(0, -1)(1, 1)(2, 3)Open in grapher →

Why draw the whole line and not just four dots? Because xx doesn't have to be a whole number. If x=1.5x = 1.5, then y=2(1.5)−1=2y = 2(1.5) - 1 = 2, and the point (1.5,2)(1.5, 2) is on the line too. The line shows every solution.

The graph of an equation

The graph of an equation is the set of all of its solutions.

  • Every point on the graph is a solution.
  • Every solution is a point on the graph.

An equation whose graph is a straight line is called a linear equation.

Two points are enough to draw a line, but plot a third as a check. If the three points don't line up, you made an arithmetic mistake.

Common mistake

When xx is negative, use parentheses as you substitute. For y=−3x+2y = -3x + 2 with x=−2x = -2, write y=−3(−2)+2=6+2=8y = -3(-2) + 2 = 6 + 2 = 8. Dropping the parentheses and writing −3−2-3 - 2 gives the wrong point.

Equations in other forms

Not every linear equation starts with "y=y =". For an equation like 2x+3y=62x + 3y = 6, the quickest points to find are where the line crosses the axes.

  • Where a line crosses the yy-axis, x=0x = 0. This point is the yy-intercept.
  • Where a line crosses the xx-axis, y=0y = 0. This point is the xx-intercept.

Worked example: Graphing with intercepts

Graph 2x+3y=62x + 3y = 6.

yy-intercept: set x=0x = 0. Then 3y=63y = 6, so y=2y = 2. The point is (0,2)(0, 2).

xx-intercept: set y=0y = 0. Then 2x=62x = 6, so x=3x = 3. The point is (3,0)(3, 0).

Check point: try x=6x = 6. Then 12+3y=612 + 3y = 6, so 3y=−63y = -6 and y=−2y = -2. The point (6,−2)(6, -2) should be on the same line.

2x + 3y = 6(0, 2)(3, 0)(6, -2)Open in grapher →

Horizontal and vertical lines

The equation y=3y = 3 says "yy is always 3, whatever xx is." Points like (−2,3)(-2, 3), (0,3)(0, 3) and (5,3)(5, 3) all work, so the graph is a horizontal line.

The equation x=−2x = -2 says "xx is always −2-2," so its graph is a vertical line.

y = 3x = -2(0, 3)(-2, 0)Open in grapher →

Lines that tell a story

Worked example: A savings plan

Maya has $10 saved and adds $5 each week. Her total after xx weeks is y=5x+10y = 5x + 10 dollars. When will she have $45?

Make a table: x=0x = 0 gives 10, x=1x = 1 gives 15, x=2x = 2 gives 20. Each week adds 5.

To reach 45, solve 5x+10=455x + 10 = 45. Subtract 10: 5x=355x = 35. Divide by 5: x=7x = 7. After 7 weeks, the point (7,45)(7, 45) is on her line.

Tip

To test whether a point is on a line, you don't need to graph. Just substitute both coordinates into the equation and see if it comes out true.

Practice

Practice 1

For the equation y=3x+4y = 3x + 4, what is yy when x=2x = 2?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 2

Which point is on the graph of y=−2x+5y = -2x + 5?

Practice 3

For the equation y=12x−3y = \dfrac{1}{2}x - 3, what is yy when x=−4x = -4?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 4

What is the xx-intercept of the line 4x+5y=204x + 5y = 20? Give it as an ordered pair.

Enter a point like (2, -3)

Practice 5

Which equation has this graph?

y = -2(-3, -2)(2, -2)Open in grapher →
Practice 6

The point (k,7)(k, 7) is on the graph of y=2x−3y = 2x - 3. What is kk?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 7

A taxi ride costs y=2x+3y = 2x + 3 dollars for a trip of xx miles. A ride cost $19. How many miles long was it?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 8

The lines y=x+1y = x + 1 and y=−x+5y = -x + 5 cross at one point. What is it?

Enter a point like (2, -3)