maths.freeAlgebra › 3. Graphs and Functions › Graph Linear Equations in Two Variables

Graph Linear Equations in Two Variables

Plot points in a rectangular coordinate system

Plot Points on a Rectangular Coordinate System

Just like maps use a grid system to identify locations, a grid system is used in algebra to show a relationship between two variables in a rectangular coordinate system. The rectangular coordinate system is also called the xy-plane or the “coordinate plane.”

The rectangular coordinate system is formed by two intersecting number lines, one horizontal and one vertical. The horizontal number line is called the x-axis. The vertical number line is called the y-axis. These axes divide a plane into four regions, called quadrants. The quadrants are identified by Roman numerals, beginning on the upper right and proceeding counterclockwise. See .

In the rectangular coordinate system, every point is represented by an ordered pair. The first number in the ordered pair is the x-coordinate of the point, and the second number is the y-coordinate of the point. The phrase “ordered pair” means that the order is important.

What is the ordered pair of the point where the axes cross? At that point both coordinates are zero, so its ordered pair is \((0,0).\) The point \((0,0)\) has a special name. It is called the origin.

We use the coordinates to locate a point on the xy-plane. Let’s plot the point \((1,3)\) as an example. First, locate 1 on the x-axis and lightly sketch a vertical line through \(x=1.\) Then, locate 3 on the y-axis and sketch a horizontal line through \(y=3.\) Now, find the point where these two lines meet—that is the point with coordinates \((1,3).\) See .

Notice that the vertical line through \(x=1\) and the horizontal line through \(y=3\) are not part of the graph. We just used them to help us locate the point \((1,3).\)

When one of the coordinate is zero, the point lies on one of the axes. In the point \((0,4)\) is on the y-axis and the point \((-2,0)\) is on the x-axis.

Condensed — the full section is in OpenStax Intermediate Algebra 2e.

Graph a Linear Equation by Plotting Points

There are several methods that can be used to graph a linear equation. The first method we will use is called plotting points, or the Point-Plotting Method. We find three points whose coordinates are solutions to the equation and then plot them in a rectangular coordinate system. By connecting these points in a line, we have the graph of the linear equation.

How to Graph a Linear Equation by Plotting Points

Try it.

Graph the equation \(y=2x+1\) by plotting points.

Solution

The steps to take when graphing a linear equation by plotting points are summarized here.

It is true that it only takes two points to determine a line, but it is a good habit to use three points. If you only plot two points and one of them is incorrect, you can still draw a line but it will not represent the solutions to the equation. It will be the wrong line.

If you use three points, and one is incorrect, the points will not line up. This tells you something is wrong and you need to check your work. Look at the difference between these illustrations.

When an equation includes a fraction as the coefficient of \(x\), we can still substitute any numbers for x. But the arithmetic is easier if we make “good” choices for the values of x. This way we will avoid fractional answers, which are hard to graph precisely.

Example

Try it.

Graph the equation: \(y=\frac{1}{2}x+3.\)

Solution

Find three points that are solutions to the equation. Since this equation has the fraction \(\frac{1}{2}\) as a coefficient of x, we will choose values of x carefully. We will use zero as one choice and multiples of 2 for the other choices. Why are multiples of two a good choice for values of x? By choosing multiples of 2 the multiplication by \(\frac{1}{2}\) simplifies to a whole number

The points are shown in .

\(y=\frac{1}{2}x+3\)
xy\((x,y)\)
03\((0,3)\)
24\((2,4)\)
45\((4,5)\)

Plot the points, check that they line up, and draw the line.

Graph Vertical and Horizontal Lines

Some linear equations have only one variable. They may have just x and no y, or just y without an x. This changes how we make a table of values to get the points to plot.

Let’s consider the equation \(x=-3.\) This equation has only one variable, x. The equation says that x is always equal to\(-3,\) so its value does not depend on y. No matter what is the value of y, the value of x is always \(-3.\)

So to make a table of values, write \(-3\) in for all the x-values. Then choose any values for y. Since x does not depend on y, you can choose any numbers you like. But to fit the points on our coordinate graph, we’ll use 1, 2, and 3 for the y-coordinates. See .

\(x=-3\)
xy\((x,y)\)
\(-3\)1\((-3,1)\)
\(-3\)2\((-3,2)\)
\(-3\)3\((-3,3)\)

Plot the points from the table and connect them with a straight line. Notice that we have graphed a vertical line.

What if the equation has y but no x? Let’s graph the equation \(y=4.\) This time the y-value is a constant, so in this equation, y does not depend on x. Fill in 4 for all the y’s in and then choose any values for x. We’ll use 0, 2, and 4 for the x-coordinates.

\(y=4\)
xy\((x,y)\)
04\((0,4)\)
24\((2,4)\)
44\((4,4)\)

In this figure, we have graphed a horizontal line passing through the y-axis at 4.

Example

Try it.

Graph: ⓐ \(x=2\) ⓑ \(y=-1.\)

Solution

ⓐ The equation has only one variable, x, and x is always equal to 2. We create a table where x is always 2 and then put in any values for y. The graph is a vertical line passing through the x-axis at 2.

\(x=2\)
xy\((x,y)\)
21\((2,1)\)
22\((2,2)\)
23\((2,3)\)


ⓑ Similarly, the equation \(y=-1\) has only one variable, y. The value of y is constant. All the ordered pairs in the next table have the same y-coordinate. The graph is a horizontal line passing through the y-axis at \(-1.\)
\(y=-1\)
xy\((x,y)\)
0\(-1\)\((0,-1)\)
3\(-1\)\((3,-1)\)
\(-3\)\(-1\)\((-3,-1)\)

What is the difference between the equations \(y=4x\) and \(y=4?\)

Example

Try it.

Graph \(y=-3x\) and \(y=-3\) in the same rectangular coordinate system.

Solution

We notice that the first equation has the variable x, while the second does not. We make a table of points for each equation and then graph the lines. The two graphs are shown.


Condensed — the full section is in OpenStax Intermediate Algebra 2e.

Find

Every linear equation can be represented by a unique line that shows all the solutions of the equation. We have seen that when graphing a line by plotting points, you can use any three solutions to graph. This means that two people graphing the line might use different sets of three points.

At first glance, their two lines might not appear to be the same, since they would have different points labeled. But if all the work was done correctly, the lines should be exactly the same. One way to recognize that they are indeed the same line is to look at where the line crosses the x-axis and the y-axis. These points are called the intercepts of a line.

Let’s look at the graphs of the lines.

First, notice where each of these lines crosses the x-axis. See .

Now, let’s look at the points where these lines cross the y-axis.

FigureThe line crosses
the x-axis at:
Ordered pair
for this point
The line crosses
the y-axis at:
Ordered pair
for this point
Figure (a)3\((3,0)\)6\((0,6)\)
Figure (b)4\((4,0)\)\(-3\)\((0,-3)\)
Figure (c)5\((5,0)\)\(-5\)\((0,5)\)
Figure (d)0\((0,0)\)0\((0,0)\)
General Figurea\((a,0)\)b\((0,b)\)

Do you see a pattern?

For each line, the y-coordinate of the point where the line crosses the x-axis is zero. The point where the line crosses the x-axis has the form \((a,0)\) and is called the x-intercept of the line. The x-intercept occurs when y is zero.

Example

Try it.

Find the x- and y-intercepts on each graph shown.

Solution

ⓐ The graph crosses the x-axis at the point \((4,0).\) The x-intercept is \((4,0).\)
The graph crosses the y-axis at the point \((0,2).\) The y-intercept is \((0,2).\)

ⓑ The graph crosses the x-axis at the point \((2,0).\) The x-intercept is \((2,0).\)
The graph crosses the y-axis at the point \((0,-6).\) The y-intercept is \((0,-6).\)

ⓒ The graph crosses the x-axis at the point \((-5,0).\) The x-intercept is \((-5,0).\)
The graph crosses the y-axis at the point \((0,-5).\) The y-intercept is \((0,-5).\)

Condensed — the full section is in OpenStax Intermediate Algebra 2e.

Graph a Line Using the Intercepts

To graph a linear equation by plotting points, you need to find three points whose coordinates are solutions to the equation. You can use the x- and y- intercepts as two of your three points. Find the intercepts, and then find a third point to ensure accuracy. Make sure the points line up—then draw the line. This method is often the quickest way to graph a line.

How to Graph a Line Using the Intercepts

Try it.

Graph \(-x+2y=6\) using the intercepts.

Solution

The steps to graph a linear equation using the intercepts are summarized here.

Example

Try it.

Graph \(4x-3y=12\) using the intercepts.

Solution

Find the intercepts and a third point.


We list the points in the table and show the graph.

\(4x-3y=12\)
xy\((x,y)\)
30\((3,0)\)
0\(-4\)\((0,-4)\)
64\((6,4)\)

When the line passes through the origin, the x-intercept and the y-intercept are the same point.

Example

Try it.

Graph \(y=5x\) using the intercepts.

Solution


This line has only one intercept. It is the point \((0,0).\)
To ensure accuracy, we need to plot three points. Since the x- and y-intercepts are the same point, we need two more points to graph the line.

The resulting three points are summarized in the table.

\(y=5x\)
xy\((x,y)\)
00\((0,0)\)
15\((1,5)\)
\(-1\)\(-5\)\((-1,-5)\)

Plot the three points, check that they line up, and draw the line.

Key Concepts

  • Points on the Axes
    • Points with a y-coordinate equal to 0 are on the x-axis, and have coordinates \((a,0).\)
    • Points with an x-coordinate equal to \(0\) are on the y-axis, and have coordinates \((0,b).\)
  • Quadrant \[\begin{array}{llll}\text{Quadrant I} & \ \text{Quadrant II} & \ \text{Quadrant III} & \ \text{Quadrant IV} \\ (x,y) & \ (x,y) & \ (x,y) & \ (x,y) \\ (+,+) & \ (-,+) & \ (-,-) & \ (+,-)\end{array}\]
  • Graph of a Linear Equation: The graph of a linear equation \(Ax+By=C\) is a straight line.
    Every point on the line is a solution of the equation.
    Every solution of this equation is a point on this line.
  • How to graph a linear equation by plotting points.
    1. Find three points whose coordinates are solutions to the equation. Organize them in a table.
    2. Plot the points in a rectangular coordinate system. Check that the points line up. If they do not, carefully check your work.
    3. Draw the line through the three points. Extend the line to fill the grid and put arrows on both ends of the line.
  • x-intercept and y-intercept of a Line
    • The x-intercept is the point \((a,0)\) where the line crosses the x-axis.
    • The y-intercept is the point \((0,b)\) where the line crosses the y-axis.
  • Find the x- and y-intercepts from the Equation of a Line
    • Use the equation of the line. To find:
      the x-intercept of the line, let \(y=0\) and solve for x.
      the y-intercept of the line, let \(x=0\) and solve for y.
  • How to graph a linear equation using the intercepts.
    1. Find the x- and y-intercepts of the line.
      Let \(y=0\) and solve for x.
      Let \(x=0\) and solve for y.
    2. Find a third solution to the equation.
    3. Plot the three points and check that they line up.
    4. Draw the line

Graph Linear Equations in Two Variables

Plot Points in a Rectangular Coordinate System

In the following exercises, plot each point in a rectangular coordinate system and identify the quadrant in which the point is located.

Try it.

ⓐ \((-4,2)\) ⓑ \((-1,-2)\) ⓒ \((3,-5)\) ⓓ \((-3,0)\) ⓔ \((\frac{5}{3},2)\)

Solution

Try it.

ⓐ \((-2,-3)\) ⓑ \((3,-3)\) ⓒ \((-4,1)\) ⓓ \((4,-1)\) ⓔ \((\frac{3}{2},1)\)

Try it.

ⓐ \((3,-1)\) ⓑ \((-3,1)\) ⓒ \((-2,\ \text{0})\) ⓓ \((-4,-3)\) ⓔ \((1,\frac{14}{5})\)

Solution

Try it.

ⓐ \((-1,1)\) ⓑ \((-2,-1)\) ⓒ \((2,0)\) ⓓ \((1,-4)\) ⓔ \((3,\frac{7}{2})\)

In the following exercises, for each ordered pair, decide

ⓐ is the ordered pair a solution to the equation? ⓑ is the point on the line?

Try it.

\(y=x+2;\)
A: \((0,2);\) B: \((1,2);\) C: \((-1,1);\) D: \((-3,-1).\)

Solution

ⓐ A: yes, B: no, C: yes, D: yes ⓑ A: yes, B: no, C: yes, D: yes

Try it.

\(y=x-4;\)
A: \((0,-4);\) B: \((3,-1);\) C: \((2,2);\) D: \((1,-5).\)

Try it.

\(y=\frac{1}{2}x-3;\)
A: \((0,-3);\) B: \((2,-2);\) C: \((-2,-4);\) D: \((4,1)\)

Solution

ⓐ A: yes, B: yes, C: yes, D: no ⓑ A: yes, B: yes, C: yes, D: no

Try it.

\(y=\frac{1}{3}x+2;\)
A: \((0,2);\) B: \((3,3);\) C: \((-3,2);\) D: \((-6,0).\)

Graph a Linear Equation by Plotting Points

In the following exercises, graph by plotting points.

Try it.

\(y=x+2\)

Solution

Try it.

\(y=x-3\)

Try it.

\(y=3x-1\)

Solution

Try it.

\(y=-2x+2\)

Try it.

\(y=\text{-}x-3\)

Solution

Try it.

\(y=\text{-}x-2\)

Try it.

\(y=2x\)

Solution

Try it.

\(y=-2x\)

Try it.

\(y=\frac{1}{2}x+2\)

Solution

Try it.

\(y=\frac{1}{3}x-1\)

Try it.

\(y=\frac{4}{3}x-5\)

Solution

Try it.

\(y=\frac{3}{2}x-3\)

Try it.

\(y=-\frac{2}{5}x+1\)

Solution

Try it.

\(y=-\frac{4}{5}x-1\)

Try it.

\(y=-\frac{3}{2}x+2\)

Solution

Try it.

\(y=-\frac{5}{3}x+4\)

Graph Vertical and Horizontal lines

In the following exercises, graph each equation.

Try it.

ⓐ \(x=4\) ⓑ \(y=3\)

Solution





Try it.

ⓐ \(x=3\) ⓑ \(y=1\)

Try it.

ⓐ \(x=-2\) ⓑ \(y=-5\)

Solution





Try it.

ⓐ \(x=-5\) ⓑ \(y=-2\)

In the following exercises, graph each pair of equations in the same rectangular coordinate system.

Try it.

\(y=2x\) and \(y=2\)

Solution

Try it.

\(y=5x\) and \(y=5\)

Try it.

\(y=-\frac{1}{2}x\) and \(y=-\frac{1}{2}\)

Solution

Try it.

\(y=-\frac{1}{3}x\) and \(y=-\frac{1}{3}\)

Find x- and y-Intercepts

In the following exercises, find the x- and y-intercepts on each graph.

Try it.


Solution

\((3,0),(0,3)\)

Try it.


Try it.


Solution

\((5,0),(0,-5)\)

Try it.


In the following exercises, find the intercepts for each equation.

Try it.

\(x-y=5\)

Solution

\((5,0),(0,-5)\)

Try it.

\(x-y=-4\)

Try it.

\(3x+y=6\)

Solution

\((2,0),(0,6)\)

Try it.

\(x-2y=8\)

Try it.

\(4x-y=8\)

Solution

\((2,0),(0,-8)\)

Try it.

\(5x-y=5\)

Try it.

\(2x+5y=10\)

Solution

\((5,0),(0,2)\)

Try it.

\(3x-2y=12\)

Graph a Line Using the Intercepts

In the following exercises, graph using the intercepts.

Try it.

\(-x+4y=8\)

Solution

Try it.

\(x+2y=4\)

Try it.

\(x+y=-3\)

Solution

Try it.

\(x-y=-4\)

Try it.

\(4x+y=4\)

Solution

Try it.

\(3x+y=3\)

Try it.

\(3x-y=-6\)

Solution

Try it.

\(2x-y=-8\)

Try it.

\(2x+4y=12\)

Solution

Try it.

\(3x-2y=6\)

Try it.

\(2x-5y=-20\)

Solution

Try it.

\(3x-4y=-12\)

Try it.

\(y=-2x\)

Solution

Try it.

\(y=5x\)

Try it.

\(y=x\)

Solution

Try it.

\(y=\text{-}x\)

Mixed Practice

In the following exercises, graph each equation.

Try it.

\(y=\frac{3}{2}x\)

Solution

Try it.

\(y=-\frac{2}{3}x\)

Try it.

\(y=-\frac{1}{2}x+3\)

Solution

Try it.

\(y=\frac{1}{4}x-2\)

Try it.

\(4x+y=2\)

Solution

Try it.

\(5x+2y=10\)

Try it.

\(y=-1\)

Solution

Try it.

\(x=3\)

Condensed — the full section is in OpenStax Intermediate Algebra 2e.

Recognize the Relationship Between the Solutions of an Equation and its Graph

In the previous section, we found several solutions to the equation \(3x+2y=6\). They are listed in . So, the ordered pairs \((0,3)\), \((2,0)\), and \((1,\frac{3}{2})\) are some solutions to the equation \(3x+2y=6\). We can plot these solutions in the rectangular coordinate system as shown in .

\(3x+2y=6\)
\(x\)\(y\)\((x,y)\)
03\((0,3)\)
20\((2,0)\)
1\(\frac{3}{2}\)\((1,\frac{3}{2})\)

Notice how the points line up perfectly? We connect the points with a line to get the graph of the equation \(3x+2y=6\). See . Notice the arrows on the ends of each side of the line. These arrows indicate the line continues.

Every point on the line is a solution of the equation. Also, every solution of this equation is a point on this line. Points not on the line are not solutions.

Notice that the point whose coordinates are \((-2,6)\) is on the line shown in . If you substitute \(x=-2\) and \(y=6\) into the equation, you find that it is a solution to the equation.

So the point \((-2,6)\) is a solution to the equation \(3x+2y=6\). (The phrase “the point whose coordinates are \((-2,6)\)” is often shortened to “the point \((-2,6)\).”)

So \((4,1)\) is not a solution to the equation \(3x+2y=6\). Therefore, the point \((4,1)\) is not on the line. See . This is an example of the saying, “A picture is worth a thousand words.” The line shows you all the solutions to the equation. Every point on the line is a solution of the equation. And, every solution of this equation is on this line. This line is called the graph of the equation \(3x+2y=6\).

Example

Try it.

The graph of \(y=2x-3\) is shown.

For each ordered pair, decide:

ⓐ Is the ordered pair a solution to the equation?
ⓑ Is the point on the line?

A \((0,-3)\) B \((3,3)\) C \((2,-3)\) D \((-1,-5)\)

Solution

Substitute the x- and y- values into the equation to check if the ordered pair is a solution to the equation.


  1. ⓑ Plot the points A \((0,3)\), B \((3,3)\), C \((2,-3)\), and D \((-1,-5)\).

The points \((0,3)\), \((3,3)\), and \((-1,-5)\) are on the line \(y=2x-3\), and the point \((2,-3)\) is not on the line.

The points that are solutions to \(y=2x-3\) are on the line, but the point that is not a solution is not on the line.

Graph a Linear Equation by Plotting Points

There are several methods that can be used to graph a linear equation. The method we used to graph \(3x+2y=6\) is called plotting points, or the Point–Plotting Method.

How To Graph an Equation By Plotting Points

Try it.

Graph the equation \(y=2x+1\) by plotting points.

Solution

The steps to take when graphing a linear equation by plotting points are summarized below.

It is true that it only takes two points to determine a line, but it is a good habit to use three points. If you only plot two points and one of them is incorrect, you can still draw a line but it will not represent the solutions to the equation. It will be the wrong line.

If you use three points, and one is incorrect, the points will not line up. This tells you something is wrong and you need to check your work. Look at the difference between part (a) and part (b) in .

Let’s do another example. This time, we’ll show the last two steps all on one grid.

Example

Try it.

Graph the equation \(y=-3x\).

Solution

Find three points that are solutions to the equation. Here, again, it’s easier to choose values for \(x\). Do you see why?

We list the points in .

\(y=-3x\)
\(x\)\(y\)\((x,y)\)
00\((0,0)\)
1\(-3\)\((1,-3)\)
\(-2\)6\((-2,6)\)

Plot the points, check that they line up, and draw the line.

When an equation includes a fraction as the coefficient of \(x\), we can still substitute any numbers for \(x\). But the math is easier if we make ‘good’ choices for the values of \(x\). This way we will avoid fraction answers, which are hard to graph precisely.

Example

Try it.

Graph the equation \(y=\frac{1}{2}x+3\).

Solution

Find three points that are solutions to the equation. Since this equation has the fraction \(\frac{1}{2}\) as a coefficient of \(x,\) we will choose values of \(x\) carefully. We will use zero as one choice and multiples of 2 for the other choices. Why are multiples of 2 a good choice for values of \(x\)?

The points are shown in .

\(y=\frac{1}{2}x+3\)
\(x\)\(y\)\((x,y)\)
03\((0,3)\)
24\((2,4)\)
45\((4,5)\)

Plot the points, check that they line up, and draw the line.

\(2x+y=3\)
\(x\)\(y\)\((x,y)\)
03\((0,3)\)
11\((1,1)\)
\(-1\)5\((-1,5)\)

Condensed — the full section is in OpenStax Elementary Algebra 2e.

Graph Vertical and Horizontal Lines

Can we graph an equation with only one variable? Just \(x\) and no \(y\), or just \(y\) without an \(x\)? How will we make a table of values to get the points to plot?

Let’s consider the equation \(x=-3\). This equation has only one variable, \(x\). The equation says that \(x\) is always equal to \(-3\), so its value does not depend on \(y\). No matter what \(y\) is, the value of \(x\) is always \(-3\).

So to make a table of values, write \(-3\) in for all the \(x\) values. Then choose any values for \(y\). Since \(x\) does not depend on \(y\), you can choose any numbers you like. But to fit the points on our coordinate graph, we’ll use 1, 2, and 3 for the y-coordinates. See .

\(x=-3\)
\(x\)\(y\)\((x,y)\)
\(-3\)1\((-3,1)\)
\(-3\)2\((-3,2)\)
\(-3\)3\((-3,3)\)

Plot the points from and connect them with a straight line. Notice in that we have graphed a vertical line.

 

Example

Try it.

Graph the equation \(x=2\).

Solution

The equation has only one variable, \(x\), and \(x\) is always equal to 2. We create where \(x\) is always 2 and then put in any values for \(y\). The graph is a vertical line passing through the x-axis at 2. See .

\(x=2\)
\(x\)\(y\)\((x,y)\)
21\((2,1)\)
22\((2,2)\)
23\((2,3)\)

What if the equation has \(y\) but no \(x\)? Let’s graph the equation \(y=4\). This time the y- value is a constant, so in this equation, \(y\) does not depend on \(x\). Fill in 4 for all the \(y\)’s in and then choose any values for \(x\). We’ll use 0, 2, and 4 for the x-coordinates.

\(y=4\)
\(x\)\(y\)\((x,y)\)
04\((0,4)\)
24\((2,4)\)
44\((4,4)\)

The graph is a horizontal line passing through the y-axis at 4. See .

Example

Try it.

Graph the equation \(y=-1.\)

Solution

The equation \(y=-1\) has only one variable, \(y\). The value of \(y\) is constant. All the ordered pairs in have the same y-coordinate. The graph is a horizontal line passing through the y-axis at \(-1\), as shown in .

\(y=-1\)
\(x\)\(y\)\((x,y)\)
0\(-1\)\((0,-1)\)
3\(-1\)\((3,-1)\)
\(-3\)\(-1\)\((-3,-1)\)
\(y=4x\)\(y=4\)
\(x\)\(y\)\((x,y)\)\(x\)\(y\)\((x,y)\)
00\((0,0)\)04\((0,4)\)
14\((1,4)\)14\((1,4)\)
28\((2,8)\)24\((2,4)\)
Example

Try it.

Graph \(y=-3x\) and \(y=-3\) in the same rectangular coordinate system.

Solution

Notice that the first equation has the variable \(x\), while the second does not. See . The two graphs are shown in .

\(y=-3x\)\(y=-3\)
\(x\)\(y\)\((x,y)\)\(x\)\(y\)\((x,y)\)
00\((0,0)\)0\(-3\)\((0,-3)\)
1\(-3\)\((1,-3)\)1\(-3\)\((1,-3)\)
2\(-6\)\((2,-6)\)2\(-3\)\((2,-3)\)

Condensed — the full section is in OpenStax Elementary Algebra 2e.

Key Concepts

  • Graph a Linear Equation by Plotting Points
    1. Find three points whose coordinates are solutions to the equation. Organize them in a table.
    2. Plot the points in a rectangular coordinate system. Check that the points line up. If they do not, carefully check your work!
    3. Draw the line through the three points. Extend the line to fill the grid and put arrows on both ends of the line.

Graph Linear Equations in Two Variables

Recognize the Relationship Between the Solutions of an Equation and its Graph

In the following exercises, for each ordered pair, decide:

ⓐ Is the ordered pair a solution to the equation? ⓑ Is the point on the line?

Try it.

\(y=x+2\)

  1. ⓐ \((0,2)\)
  2. ⓑ \((1,2)\)
  3. ⓒ \((-1,1)\)
  4. ⓓ \((-3,-1)\)
Solution

ⓐ yes; yes ⓑ no; no ⓒ yes; yes ⓓ yes; yes

Try it.

\(y=x-4\)

  1. ⓐ \((0,-4)\)
  2. ⓑ \((3,-1)\)
  3. ⓒ \((2,2)\)
  4. ⓓ \((1,-5)\)

Try it.

\(y=\frac{1}{2}x-3\)

  1. ⓐ \((0,-3)\)
  2. ⓑ \((2,-2)\)
  3. ⓒ \((-2,-4)\)
  4. ⓓ \((4,1)\)
Solution

ⓐ yes; yes ⓑ yes; yes ⓒ yes; yes ⓓ no; no

Try it.

\(y=\frac{1}{3}x+2\)

  1. ⓐ \((0,2)\)
  2. ⓑ \((3,3)\)
  3. ⓒ \((-3,2)\)
  4. ⓓ \((-6,0)\)

Graph a Linear Equation by Plotting Points

In the following exercises, graph by plotting points.

Try it.

\(y=3x-1\)

Solution

Try it.

\(y=2x+3\)

Try it.

\(y=-2x+2\)

Solution

Try it.

\(y=-3x+1\)

Try it.

\(y=x+2\)

Solution

Try it.

\(y=x-3\)

Try it.

\(y=\text{-}x-3\)

Solution

Try it.

\(y=\text{-}x-2\)

Try it.

\(y=2x\)

Solution

Try it.

\(y=3x\)

Try it.

\(y=-4x\)

Solution

Try it.

\(y=-2x\)

Try it.

\(y=\frac{1}{2}x+2\)

Solution

Try it.

\(y=\frac{1}{3}x-1\)

Try it.

\(y=\frac{4}{3}x-5\)

Solution

Try it.

\(y=\frac{3}{2}x-3\)

Try it.

\(y=-\frac{2}{5}x+1\)

Solution

Try it.

\(y=-\frac{4}{5}x-1\)

Try it.

\(y=-\frac{3}{2}x+2\)

Solution

Try it.

\(y=-\frac{5}{3}x+4\)

Try it.

\(x+y=6\)

Solution

Try it.

\(x+y=4\)

Try it.

\(x+y=-3\)

Solution

Try it.

\(x+y=-2\)

Try it.

\(x-y=2\)

Solution

Try it.

\(x-y=1\)

Try it.

\(x-y=-1\)

Solution

Try it.

\(x-y=-3\)

Try it.

\(3x+y=7\)

Solution

Try it.

\(5x+y=6\)

Try it.

\(2x+y=-3\)

Solution

Try it.

\(4x+y=-5\)

Try it.

\(\frac{1}{3}x+y=2\)

Solution

Try it.

\(\frac{1}{2}x+y=3\)

Try it.

\(\frac{2}{5}x-y=4\)

Solution

Try it.

\(\frac{3}{4}x-y=6\)

Try it.

\(2x+3y=12\)

Solution

Try it.

\(4x+2y=12\)

Try it.

\(3x-4y=12\)

Solution

Try it.

\(2x-5y=10\)

Try it.

\(x-6y=3\)

Solution

Try it.

\(x-4y=2\)

Try it.

\(5x+2y=4\)

Solution

Try it.

\(3x+5y=5\)

Graph Vertical and Horizontal Lines

In the following exercises, graph each equation.

Try it.

\(x=4\)

Solution

Try it.

\(x=3\)

Try it.

\(x=-2\)

Solution

Try it.

\(x=-5\)

Try it.

\(y=3\)

Solution

Try it.

\(y=1\)

Try it.

\(y=-5\)

Solution

Try it.

\(y=-2\)

Try it.

\(x=\frac{7}{3}\)

Solution

Try it.

\(x=\frac{5}{4}\)

Try it.

\(y=-\frac{15}{4}\)

Solution

Try it.

\(y=-\frac{5}{3}\)

In the following exercises, graph each pair of equations in the same rectangular coordinate system.

Try it.

\(y=2x\) and \(y=2\)

Solution

Try it.

\(y=5x\) and \(y=5\)

Try it.

\(y=-\frac{1}{2}x\) and \(y=-\frac{1}{2}\)

Solution

Try it.

\(y=-\frac{1}{3}x\) and \(y=-\frac{1}{3}\)

In the following exercises, graph each equation.

Try it.

\(y=4x\)

Solution

Try it.

\(y=2x\)

Try it.

\(y=-\frac{1}{2}x+3\)

Solution

Try it.

\(y=\frac{1}{4}x-2\)

Try it.

\(y=\text{-}x\)

Solution

Try it.

\(y=x\)

Try it.

\(x-y=3\)

Solution

Try it.

\(x+y=-5\)

Try it.

\(4x+y=2\)

Solution

Try it.

\(2x+y=6\)

Try it.

\(y=-1\)

Solution

Try it.

\(y=5\)

Try it.

\(2x+6y=12\)

Solution

Try it.

\(5x+2y=10\)

Try it.

\(x=3\)

Solution

Try it.

\(x=-4\)

Try it.

Explain how you would choose three x- values to make a table to graph the line \(y=\frac{1}{5}x-2\).

Solution

Answers will vary.

Try it.

What is the difference between the equations of a vertical and a horizontal line?

Condensed — the full section is in OpenStax Elementary Algebra 2e.

Practice (40)

Try each one on paper first. Reveal the answer to check; verified ones can be opened in the solver for every step.

  1. Evaluate \(5x-4\) when \(x=-1.\)
    If you missed this problem, review .

    كشفت الإجابة

    \(-9\)

  2. Evaluate \(3x-2y\) when \(x=4,y=-3.\)
    If you missed this problem, review .

    كشفت الإجابة

    \(18\)

  3. Solve for y: \(8-3y=20.\)
    If you missed this problem, review .

    كشفت الإجابة

    \(y=-4\)

  4. Plot each point in the rectangular coordinate system and identify the quadrant in which the point is located:

    ⓐ \((-5,4)\) ⓑ \((-3,-4)\) ⓒ \((2,-3)\) ⓓ \((0,-1)\) ⓔ \((3,\frac{5}{2}).\)

    كشفت الإجابة

    The first number of the coordinate pair is the x-coordinate, and the second number is the y-coordinate. To plot each point, sketch a vertical line through the x-coordinate and a horizontal line through the y-coordinate. Their intersection is the point.
    ⓐ Since \(x=-5,\) the point is to the left of the y-axis. Also, since \(y=4,\) the point is above the x-axis. The point \((-5,4)\) is in Quadrant II.
    ⓑ Since \(x=-3,\) the point is to the left of the y-axis. Also, since \(y=-4,\) the point is below the x-axis. The point \((-3,-4)\) is in Quadrant III.
    ⓒ Since \(x=2,\) the point is to the right of the y-axis. Since \(y=-3,\) the point is below the x-axis. The point \((2,-3)\) is in Quadrant IV.
    ⓓ Since \(x=0,\) the point whose coordinates are \((0,-1)\) is on the y-axis.
    ⓔ Since \(x=3,\) the point is to the right of the y-axis. Since \(y=\frac{5}{2},\) the point is above the x-axis. (It may be helpful to write \(\frac{5}{2}\) as a mixed number or decimal.) The point \((3,\frac{5}{2})\) is in Quadrant I.

  5. Plot each point in a rectangular coordinate system and identify the quadrant in which the point is located:
    ⓐ \((-2,1)\) ⓑ \((-3,-1)\) ⓒ \((4,-4)\) ⓓ \((-4,4)\) ⓔ \((-4,\frac{3}{2})\)

  6. Plot each point in a rectangular coordinate system and identify the quadrant in which the point is located:
    ⓐ \((-4,1)\) ⓑ \((-2,3)\) ⓒ \((2,-5)\) ⓓ \((-2,5)\) ⓔ \((-3,\frac{5}{2})\)

  7. The graph of \(y=2x-3\) is shown.

    For each ordered pair, decide:

    ⓐ Is the ordered pair a solution to the equation?

    ⓑ Is the point on the line?

    A: \((0,-3)\) B: \((3,3)\) C: \((2,-3)\) D: \((-1,-5)\)

    كشفت الإجابة

    Substitute the x- and y-values into the equation to check if the ordered pair is a solution to the equation.




    ⓑ Plot the points \((0,-3),\)\((3,3),\)\((2,-3),\) and \((-1,-5).\)

    The points \((0,3),\)\((3,-3),\) and \((-1,-5)\) are on the line \(y=2x-3,\) and the point \((2,-3)\) is not on the line.
    The points that are solutions to \(y=2x-3\) are on the line, but the point that is not a solution is not on the line.

  8. Use graph of \(y=3x-1.\) For each ordered pair, decide:

    ⓐ Is the ordered pair a solution to the equation?
    ⓑ Is the point on the line?

    A \((0,-1)\) B \((2,5)\)

    كشفت الإجابة

    ⓐ yes, yes ⓑ yes, yes

  9. Use graph of \(y=3x-1.\) For each ordered pair, decide:

    ⓐ Is the ordered pair a solution to the equation?
    ⓑ Is the point on the line?

    A\((3,-1)\) B\((-1,-4)\)

    كشفت الإجابة

    ⓐ no, no ⓑ yes, yes

  10. Graph the equation \(y=2x+1\) by plotting points.

  11. Graph the equation by plotting points: \(y=2x-3.\)

    كشفت الإجابة


  12. Graph the equation by plotting points: \(y=-2x+4.\)

    كشفت الإجابة


  13. Graph the equation: \(y=\frac{1}{2}x+3.\)

    كشفت الإجابة

    Find three points that are solutions to the equation. Since this equation has the fraction \(\frac{1}{2}\) as a coefficient of x, we will choose values of x carefully. We will use zero as one choice and multiples of 2 for the other choices. Why are multiples of two a good choice for values of x? By choosing multiples of 2 the multiplication by \(\frac{1}{2}\) simplifies to a whole number

    The points are shown in .

    \(y=\frac{1}{2}x+3\)
    xy\((x,y)\)
    03\((0,3)\)
    24\((2,4)\)
    45\((4,5)\)

    Plot the points, check that they line up, and draw the line.

  14. Graph the equation: \(y=\frac{1}{3}x-1.\)

    كشفت الإجابة


  15. Graph the equation: \(y=\frac{1}{4}x+2.\)

    كشفت الإجابة


  16. Graph: ⓐ \(x=2\) ⓑ \(y=-1.\)

    كشفت الإجابة

    ⓐ The equation has only one variable, x, and x is always equal to 2. We create a table where x is always 2 and then put in any values for y. The graph is a vertical line passing through the x-axis at 2.

    \(x=2\)
    xy\((x,y)\)
    21\((2,1)\)
    22\((2,2)\)
    23\((2,3)\)


    ⓑ Similarly, the equation \(y=-1\) has only one variable, y. The value of y is constant. All the ordered pairs in the next table have the same y-coordinate. The graph is a horizontal line passing through the y-axis at \(-1.\)
    \(y=-1\)
    xy\((x,y)\)
    0\(-1\)\((0,-1)\)
    3\(-1\)\((3,-1)\)
    \(-3\)\(-1\)\((-3,-1)\)

  17. Graph the equations: ⓐ \(x=5\) ⓑ \(y=-4.\)

    كشفت الإجابة





  18. Graph the equations: ⓐ \(x=-2\) ⓑ \(y=3.\)

    كشفت الإجابة





  19. Graph \(y=-3x\) and \(y=-3\) in the same rectangular coordinate system.

    كشفت الإجابة

    We notice that the first equation has the variable x, while the second does not. We make a table of points for each equation and then graph the lines. The two graphs are shown.


  20. Graph the equations in the same rectangular coordinate system: \(y=-4x\) and \(y=-4.\)

    كشفت الإجابة


  21. Graph the equations in the same rectangular coordinate system: \(y=3\) and \(y=3x.\)

    كشفت الإجابة


  22. Find the x- and y-intercepts on each graph shown.

    كشفت الإجابة

    ⓐ The graph crosses the x-axis at the point \((4,0).\) The x-intercept is \((4,0).\)
    The graph crosses the y-axis at the point \((0,2).\) The y-intercept is \((0,2).\)

    ⓑ The graph crosses the x-axis at the point \((2,0).\) The x-intercept is \((2,0).\)
    The graph crosses the y-axis at the point \((0,-6).\) The y-intercept is \((0,-6).\)

    ⓒ The graph crosses the x-axis at the point \((-5,0).\) The x-intercept is \((-5,0).\)
    The graph crosses the y-axis at the point \((0,-5).\) The y-intercept is \((0,-5).\)

  23. Find the x- and y-intercepts on the graph.

    كشفت الإجابة

    x-intercept: \((2,0),\)
    y-intercept: \((0,-2)\)

  24. Find the x- and y-intercepts on the graph.

    كشفت الإجابة

    x-intercept: \((3,0),\)
    y-intercept: \((0,2)\)

  25. Find the intercepts of \(2x+y=8.\)

    كشفت الإجابة

    We will let \(y=0\) to find the x-intercept, and let \(x=0\) to find the y-intercept. We will fill in a table, which reminds us of what we need to find.

    To find the x-intercept, let \(y=0.\)
    Let \(y=0.\)
    Simplify.
    The x-intercept is:\(\ (4,0)\)
    To find the y-intercept, let \(x=0.\)
    Let \(x=0.\)
    Simplify.
    The y-intercept is:\(\ (0,8)\)

    The intercepts are the points \((4,0)\) and \((0,8)\) as shown in the table.
    \(2x+y=8\)
    xy
    40
    08

  26. Find the intercepts: \(3x+y=12.\)

    كشفت الإجابة

    x-intercept: \((4,0),\)
    y-intercept: \((0,12)\)

  27. Find the intercepts: \(x+4y=8.\)

    كشفت الإجابة

    x-intercept: \((8,0),\)
    y-intercept: \((0,2)\)

  28. Graph \(-x+2y=6\) using the intercepts.

  29. Graph using the intercepts: \(x-2y=4.\)

  30. Graph using the intercepts: \(-x+3y=6.\)

    كشفت الإجابة


  31. Graph \(4x-3y=12\) using the intercepts.

    كشفت الإجابة

    Find the intercepts and a third point.


    We list the points in the table and show the graph.

    \(4x-3y=12\)
    xy\((x,y)\)
    30\((3,0)\)
    0\(-4\)\((0,-4)\)
    64\((6,4)\)

  32. Graph using the intercepts: \(5x-2y=10.\)

    كشفت الإجابة


  33. Graph using the intercepts: \(3x-4y=12.\)

    كشفت الإجابة


  34. Graph \(y=5x\) using the intercepts.

    كشفت الإجابة


    This line has only one intercept. It is the point \((0,0).\)
    To ensure accuracy, we need to plot three points. Since the x- and y-intercepts are the same point, we need two more points to graph the line.

    The resulting three points are summarized in the table.

    \(y=5x\)
    xy\((x,y)\)
    00\((0,0)\)
    15\((1,5)\)
    \(-1\)\(-5\)\((-1,-5)\)

    Plot the three points, check that they line up, and draw the line.

  35. Graph using the intercepts: \(y=4x.\)

    كشفت الإجابة


  36. Graph the intercepts: \(y=\text{-}x.\)

    كشفت الإجابة


  37. ⓐ \((-4,2)\) ⓑ \((-1,-2)\) ⓒ \((3,-5)\) ⓓ \((-3,0)\) ⓔ \((\frac{5}{3},2)\)

    كشفت الإجابة

  38. ⓐ \((-2,-3)\) ⓑ \((3,-3)\) ⓒ \((-4,1)\) ⓓ \((4,-1)\) ⓔ \((\frac{3}{2},1)\)

  39. ⓐ \((3,-1)\) ⓑ \((-3,1)\) ⓒ \((-2,\ \text{0})\) ⓓ \((-4,-3)\) ⓔ \((1,\frac{14}{5})\)

    كشفت الإجابة

  40. ⓐ \((-1,1)\) ⓑ \((-2,-1)\) ⓒ \((2,0)\) ⓓ \((1,-4)\) ⓔ \((3,\frac{7}{2})\)

Symbols used here

\pm
plus or minus
Both signs at once: x = 3 ± 2 means 5 and 1.
\neq
not equal
The two sides are different.
\leq,\ \geq
less/greater than or equal
Inequalities that allow equality; < and > exclude it.
\sqrt{x},\ \sqrt[n]{x}
square root, n-th root
The non-negative number whose square (n-th power) is x.
|x|
absolute value / modulus
Distance from zero: |−3| = 3. For a complex number, distance from the origin.
i
imaginary unit
i² = −1.
\log_b x,\ \ln x
logarithm, natural log
The exponent b must be raised to for x; ln uses base e.
\mathbb{N},\ \mathbb{Z},\ \mathbb{Q},\ \mathbb{R},\ \mathbb{C}
number sets
Naturals, integers, rationals, reals, complex numbers.

How to: Graph Linear Equations in Two Variables

  1. Plot points in a rectangular coordinate system
  2. Graph a linear equation by plotting points
  3. Graph vertical and horizontal lines
  4. Find the x- and y-intercepts
  5. Graph a line using the intercepts
  6. Every point on the line is a solution of the equation.
  7. Every solution of this equation is a point on this line.
  8. Find three points whose coordinates are solutions to the equation. Organize them in a table.

Questions people ask

What does it mean to solve an equation?

To find every value of the unknown that makes both sides equal. Each step is an operation applied to both sides that keeps the solution set the same, until the unknown stands alone.

Why do I sometimes get two answers?

A quadratic can cross the axis twice, so it can have two solutions. A degree-n polynomial has up to n. The graph shows where each one comes from.

How do I know whether to factor or use the quadratic formula?

Try factoring for a few seconds: look for two numbers that multiply to a·c and add to b. If nothing obvious appears, the discriminant b² − 4ac tells you how many real roots there are, and the formula finds them without guessing.

جرّب نفسك

Parts of this page are adapted from OpenStax Elementary Algebra 2e (CC BY-NC-SA 4.0), OpenStax Intermediate Algebra 2e (CC BY-NC-SA 4.0). Condensed and re-explained here; errors are ours.

أكثر في Algebra