MAT040 Beginning Algebra All classes

Lines and Graphing · Chapter 9

Linear Equations in Two Variables

The numbered examples below are interactive: the numbers change every time you load the page. Type your answer, press Enter or Check, and use New numbers to practice again.

The Cartesian Plane and Paired Data

The Cartesian plane has two number lines: xx is the horizontal axis and yy is the vertical axis.

Example. The speed of a race car.

time (seconds)speed (mph)
00
172.7
2129.9
3162.8
4192.2
5212.4
6228.1

  

Graph of speed against time, with x from 0 to 7 and y from 0 to 250. Points at (0, 0), (1, 72.7), (2, 129.9), (3, 162.8), (4, 192.2), (5, 212.4) and (6, 228.1) are joined by a smooth curve that rises steeply at first and then levels off.

This is paired data: there is a speed associated with each time.

There is also a position and a value for paired data. For example if we have a list of odd numbers, each number has a position:

{1,3,5,7,9,…}first, second, third, fourth, fifth\{1,3,5,7,9,\ldots\}\qquad\text{first, second, third, fourth, fifth}
Odd numbers
positionvalue
11
23
35
47
59

    

Squares
positionvalue
11
24
39
416
525
Graph titled “Odd numbers” with points at (0, 0), (1, 1), (2, 3), (3, 5), (4, 7) and (5, 9). From x = 1 on, the points rise in a straight line.
Graph titled “Squares” with points at (0, 0), (1, 1), (2, 4), (3, 9), (4, 16) and (5, 25) joined by a smooth curve that bends upward, rising faster as x increases.

Ordered Pairs and Quadrants

An ordered pair (x,y)(x,y) names a point. The first number is the xx-coordinate and the second is the yy-coordinate.

To plot (2,3)(2,3):  1. Start at the origin.  2. Move across the xx-axis.  3. Move up or down the yy-axis.

Coordinate grid from −1 to 5 on both axes. A red arrow runs right along the x-axis from (0, 0) to (2, 0), then a blue arrow runs straight up from (2, 0) to the plotted point (2, 3).

The axes divide the plane into four quadrants, labeled counterclockwise starting at the upper right.

Coordinate plane with x and y axes from −3 to 3. The upper right region is labeled Quadrant I, the upper left Quadrant II, the lower left Quadrant III and the lower right Quadrant IV. The origin is marked where the axes cross.
Example 1

Plot each point on a coordinate plane.

a. (3,4) (3,−4) (−3,4) (−3,−4)a.\ (3,4)\ (3,-4)\ (-3,4)\ (-3,-4)

Start at the origin, move across the xx-axis by the first coordinate and up or down by the second. The four points are plotted in the graph above.

Example 2

State the quadrant of each point, or say that it lies on an axis.

a. (−1,3)b. (2,5)c. (0,0)d. (0,−3)e. (4,0)f. (2,−3)a.\ (-1,3)\quad b.\ (2,5)\quad c.\ (0,0)\quad d.\ (0,-3)\quad e.\ (4,0)\quad f.\ (2,-3)

Coordinate plane with four red points, one in each quadrant: (3, 4), (3, −4), (−3, 4) and (−3, −4).

a. (−1,3)a.\ (-1,3): Quadrant II  b. (2,5)b.\ (2,5): Quadrant I  c. (0,0)c.\ (0,0): the origin  d. (0,−3)d.\ (0,-3): on the yy-axis  e. (4,0)e.\ (4,0): on the xx-axis  f. (2,−3)f.\ (2,-3): Quadrant IV

Solutions to Linear Equations in Two Variables

In y=−2x+3y=-2x+3, xx is the independent variable and yy is the dependent variable: the value of yy depends on the value of xx.

To find possible solutions to an equation with two variables, get the variables on opposite sides of the equal sign, get the dependent variable by itself, then plug in a number for xx and find the corresponding yy value.

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

2x=6−3y→2x−6=−3y→2x−6−3=y→y=−23x+22x=6-3y\quad\to\quad2x-6=-3y\quad\to\quad\frac{2x-6}{-3}=y\quad\to\quad y=-\frac23x+2
xxyy
02
143\frac43
223\frac23
30
4−23-\frac23
5−43-\frac43
6−2-2

Example. 2x+y=32x+y=3. Multiple answers could be true.

x=2, y=−1:2(2)+(−1)=4+(−1)=3 ✓x=0, y=3:2(0)+3=0+3=3 ✓x=5, y=−7:2(5)+(−7)=10+(−7)=3 ✓\begin{align*} x=2,\ y=-1:&\quad2(2)+(-1)=4+(-1)=3\ \checkmark\\ x=0,\ y=3:&\quad2(0)+3=0+3=3\ \checkmark\\ x=5,\ y=-7:&\quad2(5)+(-7)=10+(-7)=3\ \checkmark \end{align*}

So (2,−1)(2,-1), (0,3)(0,3) and (5,−7)(5,-7) are all solutions. Solving for yy gives y=−2x+3y=-2x+3 and we can make a table of as many solutions as we like:

xxyy
−3-399
−2-277
−1-155
0033
1111
22−1-1
33−3-3
44−5-5
55−7-7

Example. 2x−5y=202x-5y=20:

2x−20=5y→y=2x−205=25x−42x-20=5y\quad\to\quad y=\frac{2x-20}5=\frac25x-4
xx−5-5−4-4−3-3−2-2−1-1001122334455
yy−6-6−285-\frac{28}5−265-\frac{26}5−245-\frac{24}5−225-\frac{22}5−4-4−185-\frac{18}5−165-\frac{16}5−145-\frac{14}5−125-\frac{12}5−2-2

Example. 6=2(4x+1)−4y6=2(4x+1)-4y:

6+4y=2(4x+1)6+4y=8x+24y=8x+2−64y=8x−4y=2x−1\begin{align*} 6+4y&=2(4x+1)\\ 6+4y&=8x+2\\ 4y&=8x+2-6\\ 4y&=8x-4\\ y&=2x-1 \end{align*}

Graphing Lines in the Plane

To graph a line: solve for yy, make a table of values, plot the points, and draw the line through them with arrows on the ends.

Example 3

Graph y=2x−1y=2x-1, x+y=5x+y=5, y=3x−1y=3x-1 and y=−13x+2y=-\frac13x+2.

y=2x−1y=2x-1
xxyy
−3-3−7-7
−2-2−5-5
−1-1−3-3
00−1-1
1111
2233
3355

 

x+y=5→y=5−xx+y=5\to y=5-x
xxyy
−3-388
−2-277
−1-166
0055
1144
2233
3322

 

y=3x−1y=3x-1
xxyy
−3-3−10-10
−2-2−7-7
−1-1−4-4
00−1-1
1122
2255
3388

 

y=−13x+2y=-\frac13x+2
xxyy
−6-644
−3-333
0022
3311
6600

See the four graphs above. Each line passes through every point in its table.

Graph of y = 2x − 1: a blue line sloping up to the right through the plotted points (−3, −7), (−2, −5), (−1, −3), (0, −1), (1, 1), (2, 3) and (3, 5).
Graph of x + y = 5: a green line sloping down to the right through the plotted points (−3, 8), (−2, 7), (−1, 6), (0, 5), (1, 4), (2, 3) and (3, 2).
Graph of y = 3x − 1: a red line sloping steeply up to the right through the plotted points (−2, −7), (−1, −4), (0, −1), (1, 2), (2, 5) and (3, 8).
Graph of y = −(1/3)x + 2: a purple line sloping gently down to the right through the plotted points (−6, 4), (−3, 3), (0, 2), (3, 1) and (6, 0).

Example. Graph 3x−2y=63x-2y=6.

3x=6+2y→3x−6=2y→3x−62=y→y=32x−33x=6+2y\quad\to\quad3x-6=2y\quad\to\quad\frac{3x-6}2=y\quad\to\quad y=\frac32x-3
xx−8-8−6-6−4-4−2-20022446688
yy−15-15−12-12−9-9−6-6−3-300336699
Example 4

Graph each equation.

a. y=12xb. x=3c. y=−2a.\ y=\dfrac12x\qquad b.\ x=3\qquad c.\ y=-2

y=12xy=\frac12x
xxyy
−6-6−3-3
−4-4−2-2
−2-2−1-1
0000
2211
4422
6633

  

x=3x=3
xxyy
3311
3322
3333

  

y=−2y=-2
xxyy
00−2-2
11−2-2
22−2-2
33−2-2

See the four graphs above. The graph of 3x−2y=63x-2y=6 crosses the axes at (2,0)(2,0) and (0,−3)(0,-3), the intercepts we found earlier.

Graph of 3x − 2y = 6: a blue line sloping up to the right through the plotted points (−2, −6), (0, −3), (2, 0), (4, 3) and (6, 6).
Graph of y = (1/2)x: a green line through the origin, sloping up to the right, with plotted points at (−6, −3), (−4, −2), (−2, −1), (0, 0), (2, 1), (4, 2) and (6, 3).
Graph of x = 3: a vertical blue line through the plotted points (3, −4), (3, −2), (3, 0), (3, 2) and (3, 4).
Graph of y = −2: a horizontal gray line through the plotted points (−4, −2), (−2, −2), (0, −2), (2, −2) and (4, −2).

A vertical line x=3x=3 has the same xx-value for every point, and a horizontal line y=−2y=-2 has the same yy-value for every point.

Intercepts

An intercept is where the graphed line crosses an axis.
The xx-intercept is where the line crosses the xx-axis, and where y=0y=0.
The yy-intercept is where the line crosses the yy-axis, and where x=0x=0.

Graph of the line y = x + 1 sloping up to the right through the plotted points (−3, −2), (−2, −1), (−1, 0), (0, 1), (1, 2) and (2, 3). The points (0, 1) and (−1, 0) are labeled.

Here the yy-intercept is (0,1)(0,1) and the xx-intercept is (−1,0)(-1,0). So y=1y=1 when x=0x=0 and x=−1x=-1 when y=0y=0.

Example. Find the intercepts of 3x−2y=63x-2y=6. First solve for 2y2y: 3x−6=2y3x-6=2y.

xx-intercept (set y=0y=0): 3x−6=2(0)=0 → 3x=6 → x=63=23x-6=2(0)=0\ \to\ 3x=6\ \to\ x=\dfrac63=2. The xx-intercept is (2,0)(2,0).

yy-intercept (set x=0x=0): 3(0)−6=2y → −6=2y → y=−33(0)-6=2y\ \to\ -6=2y\ \to\ y=-3. The yy-intercept is (0,−3)(0,-3).

Example. Find the intercepts of −x+2y=4-x+2y=4. Then 2y=4+x2y=4+x.

xx-intercept: 0=4+x → x=−40=4+x\ \to\ x=-4, so (−4,0)(-4,0).
yy-intercept: 2y=4+0 → y=22y=4+0\ \to\ y=2, so (0,2)(0,2).

Example. Find the intercepts of −13x+2=y-\dfrac13x+2=y.

xx-intercept: −13x+2=0 → −13x=−2 → x=−2⋅(−3)=6-\dfrac13x+2=0\ \to\ -\dfrac13x=-2\ \to\ x=-2\cdot(-3)=6, so (6,0)(6,0).
yy-intercept: 0+2=y0+2=y, so (0,2)(0,2).

Worked-example videos