Skip to main content
Mathematics LibreTexts

1.1: Graph Linear Equations with Two Variables

  • Page ID
    66272
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    Learning Objectives

    By the end of this section, you will be able to:

    • Plot points in a rectangular coordinate system
    • Graph a linear equation by plotting points
    • Graph vertical and horizontal lines
    • Find the \(x\)- and \(y\)-intercepts
    • Graph a line using the intercepts
    Be Prepared

    Before we get started, take this readiness quiz.

    1. Evaluate \(5x−4\) when \(x=−1\).
    2. Evaluate \(3x−2y\) when \(x=4\) and \(y=−3\).
    3. Solve for \(y\): \(8−3y=20\).

    Linear Expressions and Linear Equations with One Variable

    The expressions in the Be Prepared section are examples of what we call linear expressions.

    Definition \(\PageIndex{1}\)

    1. An expression that can be written as

    \(A x+B\)

    with \(A\) and \(B\) real numbers, \(A\neq 0\), is called a linear expression (with one variable), or more specifically, a linear expression in \(x\).

    2. An equation that can be written as

    \(A x+B=0\)

    with \(A\) and \(B\) real numbers, \(A\neq 0\), is called a linear equation (with one variable), or more specifically, a linear equation in \(x\).

    3. A solution to a linear equation with one variable, say \(x\), is a number, say \(a\), that when substituted in for that variable yields a true statement. In this case we say that \(x=a\) is a solution.

    Be Prepared (3) can be written as \(0=3y+12\) by adding \(3y\) and subtracting \(8\) from both sides. So \(8-3y=20\) is a linear equation in \(y\). Notice that substituting \(y=1\), for example, into the equation gives

    \(\begin{aligned}8-3(1)&=20 \quad \text{ or }\\\quad 5&=20,\end{aligned}\)

    which is not true. However, substituting \(y=-4\) into the equation gives

    \(\begin{aligned}8-3(-4)&=20 \quad \text{ or }\\\quad 20&=20,\end{aligned}\)

    which is true. So \(y=-4\) is a solution to \(8-3y=20\), and \(y=1\) is not. In solving Be Prepared 3, we found that \(y=-4\) is the only solution.

    Introduction to Linear Expressions and Linear Equations with Two Variables

    In this section we will be looking at equations that have two variables, \(x\) and \(y\), and more than one solution. We want to represent the solutions in a picture. Consider the equation \(2x-3y=6\). The expression \(2x-3y\) is an example of a linear expression with two variables. We can evaluate the expressions on both sides of the equal sign for any particular choice of \(x\) and \(y\). For example, we can choose \(x=3\) and \(y=0\) and substitute them into the equation to get

    \(\begin{aligned}2(3) -3(0) &=6\quad \text{ or }\\\quad 6&=6,\end{aligned}\)

    which is a true statement. We can also choose \(x=-3\) and \(y=-4\) and substitute them into the equation to get

    \(\begin{aligned}2(-3) -3(-4) &=6\quad \text{ or }\\\quad 6&=6,\end{aligned}\)

    which is also true. We say that \(x=3\) and \(y=0\) is one solution, and \(x=-3\) and \(y=-4\) is another solution. We will actually see that equations like \(2x-3y=6\) have infinitely many solutions. Next we introduce what is needed to make a picture of the solutions.

    Plot Points on a Rectangular Coordinate System

    Just like maps use a grid system to identify locations, a grid system, or a rectangular coordinate system, is used in algebra to represent ordered pairs of numbers, and ultimately, to show a relationship between two variables. 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 (note that in the context of an application these may take on different names). 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.

    This figure shows a square grid. A horizontal number line in the middle is labeled x. A vertical number line in the middle is labeled y. The number lines intersect at zero and together divide the square grid into 4 equally sized smaller squares. The square in the top right is labeled I. The square in the top left is labeled II. The square in the bottom left is labeled III. The square in the bottom right is labeled IV.

    Definition \(\PageIndex{2}\)

    An ordered pair, \((x,y)\), gives the coordinates of a point in a rectangular coordinate system. The first number is the \(x\)-coordinate. The second number is the \(y\)-coordinate.

    This figure shows the expression (x, y). The variable x is labeled x-coordinate. The variable y is labeled y-coordinate.

    The phrase “ordered pair” means that the order is important. For example, \((2,5)\) and \((5,2)\) are different points.

    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.

    Definition \(\PageIndex{3}\)

    The point \((0,0)\) is called the origin. It is the point where the \(x\)-axis and \(y\)-axis intersect.

    We use the coordinates to locate a point on the \(xy\)-plane. Let’s plot the point \((1,3)\) as an example. First, locate the \(x\)-coordinate \(1\) on the \(x\)-axis and lightly sketch a vertical line through \(x=1\). Then, locate the \(y\)-coordinate \(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)\).

    This figure shows a point plotted on the x y-coordinate plane. The x and y axes run from negative 6 to 6. The point (1, 3) is labeled. A dashed vertical line goes through the point and intersects the x-axis at xplus1. A dashed horizontal line goes through the point and intersects the y-axis at yplus3.

    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 coordinates is zero, the point lies on one of the axes. The graph below shows that the point \((0,4)\) is on the \(y\)-axis and the point \((−2,0)\) is on the \(x\)-axis.

    This figure shows points plotted on the x y-coordinate plane. The x and y axes run from negative 6 to 6. The point (negative 2, 0) is labeled and lies on the x-axis. The point (0, 4) is labeled and lies on the y-axis.

    Points on the \(x\)- or \(y\)-axis
    1. Points with a \(y\)-coordinate equal to \(0\) are on the \(x\)-axis, and have the form \((p,0)\), where \(p\) is some real number.
    2. Points with an \(x\)-coordinate equal to \(0\) are on the \(y\)-axis, and have the form \((0,q)\), where \(q\) is some real number.
    Example \(\PageIndex{4}\)

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

    a. \((−5,4\))

    b. \((−3,−4)\)

    c. \((2,−3)\)

    d. \((0,−1)\)

    e. \(\left(3,\dfrac{5}{2}\right)\)

    f. \((-2,3)\)

    Solution

    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.

    a. Since the \(x\)-coordinate is \(−5\), the point is to the left of the \(y\)-axis. Also, since the \(y\)-coordinate is \(4\), the point is above the \(x\)-axis. The point \((−5,4)\) is in Quadrant II.

    b. Since the \(x\)-coordinate is \(−3\), the point is to the left of the \(y\)-axis. Also, since the \(y\)-coordinate is \(−4\), the point is below the \(x\)-axis. The point \((−3,−4)\) is in Quadrant III.

    c. Since the \(x\)-coordinate is \(2\), the point is to the right of the \(y\)-axis. Since the \(y\)-coordinate is \(−3\), the point is below the \(x\)-axis. The point \((2,−3)\) is in Quadrant IV.

    d. Since the \(x\)-coordinate is \(0\), the point whose coordinates are \((0,−1)\) is on the \(y\)-axis.

    e. Since the \(x\)-coordinate is \(3\), the point is to the right of the \(y\)-axis. Since the \(y\)-coordinate is \(\dfrac{5}{2}\), the point is above the \(x\)-axis. (It may be helpful to write \(\dfrac{5}{2}\) as a mixed number, \(2\dfrac{1}{2}\), or decimal, \(2.5\), so that we know \(\dfrac{5}{2}\) is between \(2\) and \(3\).) The point \(\left(3,\dfrac{5}{2}\right)\) is in Quadrant I.

    f. Since the \(x\)-coordinate is \(-2\), the point is to the left of the \(y\)-axis. Since the \(y\)-coordinate is \(3\), the point is above the \(x\)-axis. The point \((-2,3)\) is in Quadrant II.

    This figure shows points plotted on the x y-coordinate plane. The x and y axes run from negative 6 to 6. The following points are labeled: (3, 5 divided by 2), (negative 2, 3), negative 5, 4), (negative 3, negative 4), (0, negative 1), and (2, negative 3).

    Try It \(\PageIndex{5}\)

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

    a. \((−2,1)\)

    b. \((−3,−1)\)

    c. \((4,−4)\)

    d. \((−4,4)\)

    e. \(\left(−4,\dfrac{3}{2}\right)\)

    Answer

    This figure shows points plotted on the x y-coordinate plane. The x and y axes run from negative 6 to 6. The point labeled a is 2 units to the left of the origin and 1 unit above the origin and is located in quadrant II. The point labeled b is 3 units to the left of the origin and 1 unit below the origin and is located in quadrant III. The point labeled c is 4 units to the right of the origin and 4 units below the origin and is located in quadrant IV. The point labeled d is 4 units to the left of the origin and 4 units above the origin and is located in quadrant II. The point labeled e is 4 units to the left of the origin and 1 and a half units above the origin and is located in quadrant II.

    The points \((−2,1)\), \((−4,4)\), and \(\left(−4,\dfrac{3}{2}\right)\) are in Quadrant II.

    The point \((−3,−1)\) is in Quadrant III.

    The point \((4,−4)\) is in Quadrant IV.

    The signs of the \(x\)-coordinate and \(y\)-coordinate affect the location of the points. We may have noticed some patterns as we graphed the points in the previous example. We can summarize sign patterns of the quadrants in this way:

    Quadrants
    Quadrant I Quadrant II Quadrant III Quadrant IV
    \((x,y)\) \((x,y)\) \((x,y)\) \((x,y)\)
    \((+,+)\) \((−,+)\) \((−,−)\) \((+,−)\)

    This figure shows the x y-coordinate plane with the four quadrants labeled. In the top right of the plane is quadrant I labeled (plus, plus). In the top left of the plane is quadrant II labeled (minus, plus). In the bottom left of the plane is quadrant III labeled (minus, minus). In the bottom right of the plane is quadrant IV labeled (plus, minus).

    Linear Expressions and Linear Equations with Two Variables

    Up to now, all the equations we have solved were equations with just one variable. In almost every case, when we solved the equation we got exactly one solution. But equations can have more than one variable. Equations with two variables may be of the form \(Ax+By=C\). An equation of this form is called a linear equation with two variables.

    Definition \(\PageIndex{6}\)

    1. An expression that can be written as

    \(A x+B y\)

    with \(A\) and \(B\) real numbers, not both zero, is called a linear expression (with two variables), or more specifically, a linear expression in \(x\) and \(y\).

    2. An equation that can be written as

    \(A x+By=C\)

    with \(A\) and \(B\) real numbers, not both zero, is called a linear equation (with two variables), or more specifically, a linear equation in \(x\) and \(y\).

    Here is an example of a linear equation with two variables, \(x\) and \(y\).

    \(x+4y=8\)

    This equation is in the form \(Ax+By=C\) with \(A=1\), \(B=4\), and \(C=8\). The equation

    \(y=−3x+5\)

    is also a linear equation with two variables, \(x\) and \(y\), but it does not appear to be in the form \(Ax+By=C\). We can rewrite it in \(Ax+By=C\) form in the following way.

      \(y= -3x+5\)
    Add \(3x\) to both sides. \(y+3x= -3x+5+3x\)
    Simplify. \(y+3x= 5\)
    Use the Commutative Property to put it in \(Ax+By=C\) form. \(3x+y= 5\)

    By rewriting \(y=−3x+5\) as \(3x+y=5\), we can easily see that it is a linear equation with two variables because it is of the form \(Ax+By=C\) with \(A=3\), \(B=1\), and \(C=5\). When an equation is in the form \(Ax+By=C\), we say it is in standard form of a linear equation.

    Definition \(\PageIndex{7}\)

    A linear equation with two variables, \(x\) and \(y\), is in standard form when it is written as \(Ax+By=C\).

    Most people prefer to have \(A\), \(B\), and \(C\) be integers and \(A \geq 0\) when writing a linear equation in standard form, although it is not strictly necessary.

    Linear equations with two variables have infinitely many solutions. For example, if \(A \neq 0\), for every number that is substituted for \(x\) there is a corresponding \(y\)-value. This pair of values is a solution to the linear equation and is represented by the ordered pair \((x,y)\). When we substitute these values of \(x\) and \(y\) into the equation, the result is a true statement, because the value on the left side is equal to the value on the right side.

    Definition \(\PageIndex{8}\)

    An ordered pair \((p,q)\) is a solution of the linear equation \(Ax+By=C\), if the equation is a true statement when the \(x\)- and \(y\)-coordinates of the ordered pair, \(p\) and \(q\), respectively, are substituted into the equation. We can also say in this case that \((x,y)=(p,q)\) is a solution, or \(x=p\) and \(y=q\) is a solution.

    We can represent the solutions as points in the rectangular coordinate system. The points will line up perfectly in a straight line. We use a straight-edge to draw this line, and put arrows on the ends of each side of the line to indicate that the line continues in both directions.

    A graph is a visual representation of all the solutions of the equation. It is an example of the saying, “A picture is worth a thousand words.” The line (with the arrows) shows us all the solutions to that equation. Every point on the line corresponds a solution of the equation. And, every solution of this equation corresponds to a point on this line. This line is called the graph of the equation. Points not on the line do not correspond to solutions! We may say, as is common, then that the points on the line are the solutions.

    Definition \(\PageIndex{9}\)

    The graph of the linear equation \(Ax+By=C\) is the collection of all solutions \((x,y)\).

    We can represent the graph on the coordinate plane. The representation is a straight line so that

    • every solution of the equation is a point on this line, and
    • every point on the line is a solution of the equation.

    As universally accepted, a representation is also called a graph of the linear equation.

    Example \(\PageIndex{10}\)

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

    This figure shows a straight line graphed on the x y-coordinate plane. The x and y-axes run from negative 10 to 10. The line has arrows on both ends and goes through the points (negative 3, negative 9), (negative 2, negative 7), (negative 1, negative 5), (0, negative 3), (1, negative 1), (2, 1), (3, 3), (4, 5), (5, 7), and (6, 9). The line is labeled y plus 2 x minus 3.

    For each ordered pair,

    \(A(0,−3),\qquad B(3,3), \qquad C(2,−3),\qquad\text{ and } \qquad D(−1,−5),\)

    decide:

    a. is the ordered pair a solution to the equation?

    b. is the point on the line?

    Solution

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

    Point \(A(0,−3)\) \(B(3,3)\) \(C(2,−3)\) \(D(−1,−5)\)
    Write the equation of the line. \(y=3x-3\) \(y=2x-3\) \(y=2x-3\)

    \(y=2x-3\)

    Substitute the \(x\)- and \(y\)-values. \(-3\stackrel{?}{=} 2\cdot 0 -3\) \(3\stackrel{?}{=} 2\cdot 3 -3\) \(-3\stackrel{?}{=} 2\cdot 2 -3\) \(-5\stackrel{?}{=} 2\cdot (-1) -3\)
    Simplify. \(-3\stackrel{?}{=}-3\) \(3\stackrel{?}{=}3\) \(-3\stackrel{?}{=}1\) \(-5\stackrel{?}{=}5\)
    True or false? True True False True
    Answer the question. \((0,-3)\) is a solution \((3,3)\) is a solution \((2,-3)\) is not a solution \((-1,-5)\) is a solution

    b. Plot the points \((0,−3)\), \((3,3)\), \((2,−3)\), and \((−1,−5)\).

    This figure shows the graph of the linear equation y plus 2 x minus 3 and some points graphed on the x y-coordinate plane. The x and y-axes run from negative 10 to 10. The line has arrows on both ends and goes through the points (negative 1, negative 5), (0, negative 3), and (3, 3). The point (2, negative 3) is also plotted but not on the line.

    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 points that are not solutions are not on the line.

    Try It \(\PageIndex{11}\)

    The graph of \(y=3x−1\) is shown below.

    This figure shows a straight line graphed on the x y-coordinate plane. The x and y-axes run from negative 10 to 10. The line has arrows on both ends and goes through the points (negative 3, negative 10), (negative 2, negative 7), (negative 1, negative 4), (0, negative 1), (1, 2), (2, 5), and (3, 8). The line is labeled y plus 3 x minus 1.

    For each ordered pair,

    \(A(0,−1)\qquad\text{ and } \qquad B(2,5),\)

    decide:

    a. is the ordered pair a solution to the equation?
    b. is the point on the line?

    Answer

    a. Both pairs are solutions.

    b. Both pairs are on the line.

    Try It \(\PageIndex{12}\)

    The graph of \(y=3x−1\) is shown below.

    This figure shows a straight line graphed on the x y-coordinate plane. The x and y-axes run from negative 10 to 10. The line has arrows on both ends and goes through the points (negative 3, negative 10), (negative 2, negative 7), (negative 1, negative 4), (0, negative 1), (1, 2), (2, 5), and (3, 8). The line is labeled y plus 3 x minus 1.

    For each ordered pair,

    \(A(3,−1)\qquad\text{ and } \qquad B(−1,−4),\)

    decide:

    a. Is the ordered pair a solution to the equation?
    b. Is the point on the line?

    Answer

    a. \(A\) is a solution.

    \(B\) is not a solution.

    b. \(A\) is on the line.

    \(B\) 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 first method we will use is called plotting points. 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. While two points are enough to determine a line, using three points helps us detect errors.

    Example \(\PageIndex{13}\)

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

    Solution

    Step 1 is to Find three points whose coordinates are solutions to the equation. You can choose any values for x or y. In this case since y is isolated on the left side of the equations, it is easier to choose values for x. Choosing x plus 0. We substitute this into the equation y plus 2 x plus 1 to get y plus 2 times 0 plus 1. This simplifies to y plus 0 plus 1. So y plus 1. Choosing x plus 1. We substitute this into the equation y plus 2 x plus 1 to get y plus 2 times 1 plus 1. This simplifies to y plus 2 plus 1. So y plus 3. Choosing x plus negative 2. We substitute this into the equation y plus 2 x plus 1 to get y plus 2 times negative 2 plus 1. This simplifies to y plus negative 4 plus 1. The y plus negative 3. Next we want to organize the solutions in a table. For this problem we will put the three solutions we just found in a table. The table has 5 rows and 3 columns. The first row is a title row with the equation y plus 2 x plus 1. The second row is a header row with the headers x, y, and (x, y). The third row has the numbers 0, 1, and (0, 1). The fourth row has the numbers 1, 3, and (1, 3). The fifth row has the numbers negative 2, negative 3, and (negative 2, negative 3).Step 2 is to plot the points in a rectangular coordinate system. Plot: (0, 1), (1, 3), (negative 2, negative 3). The figure then shows a graph of some points plotted on the x y-coordinate plane. The x and y axes run from negative 6 to 6. The points (0, 1), (1, 3), and (negative 2, negative 3) are plotted. Check that the points line up. If they do not, carefully check your work! Do the point line up? Yes, the points in this example line up.Step 3 is to draw the line through the three points. Extend the line to fill the grid and put arrows on both ends of the line. This line is the graph of y plus 2 x plus 1. The figure shows the graph of a straight line on the x y-coordinate plane. The x and y axes run from negative 6 to 6. The points (negative 2, negative 3), (0, 1), and (1, 3) are plotted. The straight line goes through the three points and has arrows on both ends.

    Try It \(\PageIndex{14}\)

    Graph the equation \(y=2x−3\) by plotting points.

    Answer

    This figure shows a straight line graphed on the x y-coordinate plane. The x and y-axes run from negative 8 to 8. The line goes through the points (negative 2, negative 7), (negative 1, negative 5), (0, negative 3), (1, negative 1), (2, 1), (3, 3), (4, 5), and (5, 7).

    Try It \(\PageIndex{15}\)

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

    Answer

    This figure shows a straight line graphed on the x y-coordinate plane. The x and y-axes run from negative 8 to 8. The line goes through the points (negative 2, 8), (negative 1, 6), (0, 4), (1, 2), (2, 0), (3, negative 2), (4, negative 4), (5, negative 6) and (6, negative 8).

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

    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.

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

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

    The figure shows two images. In the first image there are three points with a straight line going through all three. In the second image there are three points that do not all lie on a straight line.

    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 plot precisely.

    Example \(\PageIndex{16}\)

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

    Solution

    Find three points that are solutions to the equation. Since this equation has the fraction \(\dfrac{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 \(\dfrac{1}{2}\) simplifies to a whole number.

    Choose a value for \(x\) that is a multiple of \(2\). \(x=0\) \(x=2\) \(x=4\)
    Write the equation of the line. \(y=\dfrac{1}{2}x+3\) \(y=\dfrac{1}{2}x+3\) \(y=\dfrac{1}{2}x+3\)
    Substitute the \(x\)-value into the equation. \(y=\dfrac{1}{2}(0)+3\) \(y=\dfrac{1}{2}(2)+3\) \(y=\dfrac{1}{2}(4)+3\)
    Simplify. \(y=0+3\) \(y=1+3\) \(y=2+3\)
    Find \(y\). \(y=3\) \(y=4\) \(y=5\)

    We organize the three solutions in a table.

    \(y=\dfrac{1}{2}x+3\)
    \(x\) \(y\) \((x,y)\)
    \(0\) \(3\) \((0,3)\)
    \(2\) \(4\) \((2,4)\)
    \(4\) \(5\) \((4,5)\)

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

    The figure shows the graph of a straight line on the x y-coordinate plane. The x and y axes run from negative 7 to 7. The points (0, 3), (2, 4), and (4, 5) are plotted. The straight line goes through the three points and has arrows on both ends. The line is labeled y plus 1 divided by 2 times x plus 3.

    Try It \(\PageIndex{17}\)

    Graph the equation \(y=\dfrac{1}{3}x−1\).

    Answer

    This figure shows a straight line graphed on the x y-coordinate plane. The x and y-axes run from negative 12 to 12. The line goes through the points (negative 12, negative 5), (negative 9, negative 4), (negative 6, negative 3), (negative 3, negative 2), (0, negative 1), (3, 0), (6, 1), (9, 2), and (12, 3).

    Try It \(\PageIndex{18}\)

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

    Answer

    This figure shows a straight line graphed on the x y-coordinate plane. The x and y-axes run from negative 12 to 12. The line goes through the points (negative 12, negative 1), (negative 8, 0), (negative 4, 1), (0, 2), (4, 3), (8, 4), and (12, 5).

    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 the \(x\)-coordinate of any solution is equal to \(−3\), so its value does not depend on the \(y\)-coordinate. No matter what is the value of the \(y\)-coordinate, the value of the \(x\)-coordinate is always \(−3\).

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

    \(x=−3\)
    \(x\) \(y\) \((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.

    The figure shows the graph of a straight vertical line on the x y-coordinate plane. The x and y axes run from negative 7 to 7. The points (negative 3, 1), (negative 3, 2), and (negative 3, 3) are plotted. The line goes through the three points and has arrows on both ends. The line is labeled x plus negative 3.

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

    \(y=4\)
    \(x\) \(y\) \((x,y)\)
    \(0\) \(4\) \((0,4)\)
    \(2\) \(4\) \((2,4)\)
    \(4\) \(4\) \((4,4)\)

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

    The figure shows the graph of a straight horizontal line on the x y-coordinate plane. The x and y axes run from negative 7 to 7. The points (0, 4), (2, 4), and (4, 4) are plotted. The line goes through the three points and has arrows on both ends. The line is labeled y plus 4.

    Definition \(\PageIndex{19}\)

    1. A vertical line is the graph of an equation (with two variables \(x\) and \(y\)) of the form \(x=a\).

    The line passes through the \(x\)-axis at \((a,0)\).

    2. A horizontal line is the graph of an equation (with two variables \(x\) and \(y\)) of the form \(y=b\).

    The line passes through the \(y\)-axis at \((0,b)\).

    Example \(\PageIndex{20}\)

    Graph:

    a. \(x=2\)

    b. \(y=−1\)

    Solution

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

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

    The figure shows the graph of a straight vertical line on the x y-coordinate plane. The x and y axes run from negative 7 to 7. The points (2, 1), (2, 2), and (2, 3) are plotted. The line goes through the three points and has arrows on both ends. The line is labeled x plus 2.

    b. Similarly, the equation \(y=−1\) has only one variable, \(y\). The value of the \(y\)-coordinate of any solution is \(-1\). 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\)
    \(x\) \(y\) \((x,y)\)
    \(0\) \(−1\) \((0,−1)\)
    \(3\) \(−1\) \((3,−1)\)
    \(−3\) \(−1\) \((−3,−1)\)

    The figure shows the graph of a straight horizontal line on the x y-coordinate plane. The x and y axes run from negative 7 to 7. The points (negative 3, negative 1), (0, negative 1), and (3, negative 1) are plotted. The line goes through the three points and has arrows on both ends. The line is labeled y plus negative 1.

    Try It \(\PageIndex{21}\)

    Graph:

    a. \(x=5\)

    b. \(y=−4\)

    Answer

    a.

    The figure shows the graph of a straight vertical line on the x y-coordinate plane. The x and y axes run from negative 12 to 12. The line goes through the points (5, negative 3), (5, negative 2), (5, negative 1), (5, 0), (5, 1), (5, 2), and (5, 3).

    b.

    The figure shows the graph of a straight horizontal line on the x y-coordinate plane. The x and y axes run from negative 12 to 12. The line goes through the points (negative 3, negative 4), (negative 2, negative 4), (negative 1, negative 4), (0, negative 4), (1, negative 4), (2, negative 4), and (3, negative 4).

    Try It \(\PageIndex{22}\)

    Graph:

    a. \(x=−2\)

    b. \(y=3\)

    Answer

    a.

    The figure shows the graph of a straight vertical line on the x y-coordinate plane. The x and y axes run from negative 12 to 12. The line goes through the points (negative 2, negative 3), (negative 2, negative 2), (negative 2, negative 1), (negative 2, 0), (negative 2, 1), (negative 2, 2), and (negative 2, 3).

    b.

    The figure shows the graph of a straight horizontal line on the x y-coordinate plane. The x and y axes run from negative 12 to 12. The line goes through the points (negative 3, 3), (negative 2, 3), (negative 1, 3), (0, 3), (1, 3), (2, 3), and (3, 3).

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

    The equation \(y=4x\) has both \(x\) and \(y\). The value of the \(y\)-coordinate of a solution depends on the value of the \(x\)-coordinate, so the \(y\)-coordinate changes according to the value of the \(x\)-coordinate. The equation \(y=4\) has only one variable. The value of \(y\)-coordinate of any solution is \(4\), it does not depend on the value of the \(x\)-coordinate.

    This figure has two tables. The first table has 5 rows and 3 columns. The first row is a title row with the equation y plus 4 x. The second row is a header row with the headers x, y, and (x, y). The third row has the numbers 0, 0, and (0, 0). The fourth row has the numbers 1, 4, and (1, 4). The fifth row has the numbers 2, 8, and (2, 8). The second table has 5 rows and 3 columns. The first row is a title row with the equation y plus 4. The second row is a header row with the headers x, y, and (x, y). The third row has the numbers 0, 4, and (0, 4). The fourth row has the numbers 1, 4, and (1, 4). The fifth row has the numbers 2, 4, and (2, 4).

    The figure shows the graphs of a straight horizontal line and a straight slanted line on the same x y-coordinate plane. The x and y axes run from negative 7 to 7. The horizontal line goes through the points (0, 4), (1, 4), and (2,4) and is labeled y plus 4. The slanted line goes through the points (0, 0), (1, 4), and (2, 8) and is labeled y plus 4 x.

    Notice, in the graph, the equation \(y=4x\) gives a slanted line, while \(y=4\) gives a horizontal line.

    Example \(\PageIndex{23}\)

    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.

    This figure has two tables. The first table has 5 rows and 3 columns. The first row is a title row with the equation y plus negative 3 x. The second row is a header row with the headers x, y, and (x, y). The third row has the numbers 0, 0, and (0, 0). The fourth row has the numbers 1, negative 3, and (1, negative 3). The fifth row has the numbers 2, negative 6, and (2, neg ative 6). The second table has 5 rows and 3 columns. The first row is a title row with the equation y plus negative 3. The second row is a header row with the headers x, y, and (x, y). The third row has the numbers 0, negative 3, and (0, negative 3). The fourth row has the numbers 1, negative 3, and (1, negative 3). The fifth row has the numbers 2, negative 3, and (2, negative 3).

    The figure shows the graphs of a straight horizontal line and a straight slanted line on the same x y-coordinate plane. The x and y axes run from negative 7 to 7. The horizontal line goes through the points (0, negative 3), (1, negative 3), and (2, negative 3) and is labeled y plus negative 3. The slanted line goes through the points (0, 0), (1, negative 3), and (2, negative 6) and is labeled y plus negative 3 x.

    Try It \(\PageIndex{24}\)

    Graph \(y=−4x\) and \(y=−4\) in the same rectangular coordinate system.

    Answer

    The figure shows the graphs of a straight horizontal line and a straight slanted line on the same x y-coordinate plane. The x and y axes run from negative 12 to 12. The horizontal line goes through the points (0, negative 4), (1, negative 4), and (2, negative 4). The slanted line goes through the points (0, 0), (1, negative 4), and (2, negative 8).

    Try It \(\PageIndex{25}\)

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

    Answer

    The figure shows the graphs of a straight horizontal line and a straight slanted line on the same x y-coordinate plane. The x and y axes run from negative 12 to 12. The horizontal line goes through the points (0, 3), (1, 3), and (2, 3). The slanted line goes through the points (0, 0), (1, 3), and (2, 6).

    Find \(x\)- and \(y\)-intercepts

    Every linear equation can be represented by a line. We have seen that when graphing a line by plotting points, we 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 intersects the \(x\)-axis and the \(y\)-axis. These points are called the intercepts of a line.

    Definition \(\PageIndex{26}\)

    The points where a graph crosses the \(x\)-axis and the \(y\)-axis are called the intercepts of the graph.

    Let’s look at the graphs of the lines.

    The figure shows four graphs of different equations. In example a the graph of 2 x plus y plus 6 is graphed on the x y-coordinate plane. The x and y axes run from negative 8 to 8. The points (0, 6) and (3, 0) are plotted and labeled. A straight line goes through both points and has arrows on both ends. In example b the graph of 3 x minus 4 y plus 12 is graphed on the x y-coordinate plane. The x and y axes run from negative 8 to 8. The points (0, negative 3) and (4, 0) are plotted and labeled. A straight line goes through both points and has arrows on both ends. In example c the graph of x minus y plus 5 is graphed on the x y-coordinate plane. The x and y axes run from negative 8 to 8. The points (0, negative 5) and (5, 0) are plotted and labeled. A straight line goes through both points and has arrows on both ends. In example d the graph of y plus negative 2 x is graphed on the x y-coordinate plane. The x and y axes run from negative 8 to 8. The point (0, 0) is plotted and labeled. A straight line goes through this point and the points (negative 1, 2) and (1, negative 2) and has arrows on both ends.

    First, notice where each of these lines crosses the \(x\)-axis. Now, let’s look at the points where these lines cross the \(y\)-axis.

    Figure The 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 Figure \(a\) \((a,0)\) \(b\) \((0,b)\)

    Is there 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.

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

    Definition \(\PageIndex{27}\)
    1. The \(x\)-intercept of a line is the point \((a,0)\) where the line crosses the \(x\)-axis.
    2. The \(y\)-intercept of a line is the point \((0,b)\) where the line crosses the \(y\)-axis.

    The table has 3 rows and 2 columns. The first row is a header row with the headers x and y. The second row contains a and 0. The third row contains 0 and b.

    Example \(\PageIndex{28}\)

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

    The figure has three graphs. Figure a shows a straight line graphed on the x y-coordinate plane. The x and y axes run from negative 8 to 8. The line goes through the points (negative 8, 6), (negative 4, 4), (0, 2), (4, 0), (8, negative 2). Figure b shows a straight line graphed on the x y-coordinate plane. The x and y axes run from negative 8 to 8. The line goes through the points (0, negative 6), (2, 0), and (4, 6). Figure c shows a straight line graphed on the x y-coordinate plane. The x and y axes run from negative 8 to 8. The line goes through the points (negative 5, 0), (negative 3, negative 3), (0, negative 5), (1, negative 6), and (2, negative 7).

    Solution

    a. 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)\).

    b. 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)\).

    c. 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)\).

    Try It \(\PageIndex{29}\)

    Find the \(x\)- and \(y\)-intercepts on the graph.

    This figure a shows a straight line graphed on the x y-coordinate plane. The x and y axes run from negative 10 to 10. The line goes through the points (negative 6, negative 8), (negative 4, negative 6), (negative 2, negative 4), (0, negative 2), (2, 0), (4, 2), (6, 4), (8, 6).

    Answer

    The \(x\)-intercept is \((2,0)\).
    The \(y\)-intercept is \((0,−2)\).

    Try It \(\PageIndex{30}\)

    Find the \(x\)- and \(y\)-intercepts on the graph.

    This figure a shows a straight line graphed on the x y-coordinate plane. The x and y axes run from negative 10 to 10. The line goes through the points (negative 6, 6), (negative 3, 4), (0, 2), (3, 0), (6, negative 2), and (9, negative 4).

    Answer

    The \(x\)-intercept is \((3,0)\).
    The \(y\)-intercept is \((0,2)\).

    Recognizing that the \(x\)-intercept occurs when \(y\) is zero and that the \(y\)-intercept occurs when \(x\) is zero gives us a method to find the intercepts of a line from its equation. To find the \(x\)-intercept, let \(y=0\) and solve for \(x\). To find the \(y\)-intercept, let \(x=0\) and solve for \(y\).

    Intercepts from the equation of a 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\).
    Example \(\PageIndex{31}\)

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

    Solution

    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.

    The figure has a table with 4 rows and 2 columns. The first row is a title row with the equation 2 x plus y plus 8. The second row is a header row with the headers x and y. The third row is labeled x-intercept and has the first column blank and a 0 in the second column. The fourth row is labeled y-intercept and has a 0 in the first column and the second column blank.

    Let's find the \(x\)-intercept first.

    \(2x+y=8\)
    To find the \(x\)-intercept, let \(y=0\).
    Let \(y=0\). \(2x+0=8\)
    Simplify. \(2x=8\)
      \(x=4\)
    Write the \(x\)-intercept as a point \((x,y)\). \((4,0)\)

    Now, the \(y\)-intercept.

    \(2x+y=8\)
    To find the \(y\)-intercept, let \(x=0\).
    Let \(x=0\). \(2\cdot 0+y=8\)
    Simplify. \(y=8\)
    Write the \(y\)-intercept as a point \((x,y)\). \((0,8)\)

    The intercepts are the points \((4,0)\) and \((0,8)\) as shown in the table.

    \(2x+y=8\)
    \(x\) \(y\) \((x,y)\)
    4 0 \((4,0)\)
    0 8 \((0,8)\)

    The \(x\)-intercept is \((4,0)\).

    The \(y\)-intercept is \((0,8)\).

    Try It \(\PageIndex{32}\)

    Find the intercepts of the graph of \(3x+y=12\).

    Answer

    The \(x\)-intercept is \((4,0)\).
    The \(y\)-intercept is \((0,12)\).

    Try It \(\PageIndex{33}\)

    Find the intercepts of the graph of \(x+4y=8\).

    Answer

    The \(x\)-intercept is \((8,0)\).
    The \(y\)-intercept is \((0,2)\).

    Graph a Line Using the Intercepts

    To graph a linear equation by plotting points, we need to find three points whose coordinates are solutions to the equation. We can use the \(x\)- and \(y\)- intercepts as two of our 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.

    Example \(\PageIndex{34}\)

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

    Solution

    Step 1 is to find the x and y-intercepts of the line. To find the x-intercept let y plus 0 and solve for x. The equation negative x plus 2 y plus 6 becomes negative x plus 2 times 0 plus 6. This simplifies to negative x plus 6. This is equivalent to x plus negative 6. The x-intercept is (negative 6, 0). To find the y-intercept let x plus 0 and solve for y. The equation negative x plus 2 y plus 6 becomes negative 0 plus 2 y plus 6. This simplifies to negative 2 y plus 6. This is equivalent to y plus 3. The y-intercept is (0, 3).Step 2 is to find another solution to the equation. We’ll use x plus 2. The equation negative x plus 2 y plus 6 becomes negative 2 plus 2 y plus 6. This simplifies to 2 y plus 8. This is equivalent to y plus 4. The third point is (2, 4).Step 3 is to plot the three points. The figure shows a table with 4 rows and 3 columns. The first row is a header row with the headers x, y, and (x, y). The second row contains negative 6, 0, and (negative 6, 0). The third row contains 0, 3, and (0, 3). The fourth row contains 2, 4, and (2, 4). The figure also has a graph of the three points on the x y-coordinate plane. The x and y-axes run from negative 6 to 6. The three points (negative 6, 0), (0, 3), and (2, 4) are plotted and labeled.Step 4 is to draw the line. The figure shows a graph of a straight line on the x y-coordinate plane. The x and y-axes run from negative 6 to 6. The straight line goes through the points (negative 6, 0), (0, 3), and (2, 4).

    Try It \(\PageIndex{35}\)

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

    Answer

    The figure shows a graph of a straight line on the x y-coordinate plane. The x and y-axes run from negative 12 to 12. The straight line goes through the points (negative 4, negative 4), (negative 2, negative 3), (0, negative 2), (2, negative 1), (4, 0), (6, 1), and (8, 2).

    Try It \(\PageIndex{36}\)

    Graph \(–x+3y=6\) using the intercepts.

    Answer

    The figure shows a graph of a straight line on the x y-coordinate plane. The x and y-axes run from negative 12 to 12. The straight line goes through the points (negative 9, negative 1), (negative 6, 0), (negative 3, 1), (0, 2), (3, 3), (6, 4), and (9, 5).

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

    Example \(\PageIndex{37}\)

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

    Solution
    \(y=5x\)
    \(x\)-intercept \(y\)-intercept
    Let \(y=0\). Let \(x=0\).
    \(0=5x\) \(y=5\cdot 0\)
    \(0=x\) \(y=0\)
    \((0,0)\) \((0,0)\)

    This line has only one intercept. It is the point \((0,0)\).
    To check 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.

    \(y=5x\)
    Let \(x=1\). Let \(x=-1\).
    \(y=5\cdot 1\) \(y=5\cdot (-1)\)
    \(y=5\) \(y=-5\)

    The resulting three points are summarized in the table.

    \(y=5x\)
    \(x\) \(y\) \((x,y)\)
    0 0 \((0,0)\)
    1 5 \((1,5)\)
    \(−1\) \(−5\) \((−1,−5)\)

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

    The figure shows a graph of the equation y plus 5 x on the x y-coordinate plane. The x and y-axes run from negative 10 to 10. The straight line goes through the points (negative 1, negative 5), (0, 0), and (1, 5).

    Try It \(\PageIndex{38}\)

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

    Answer

    The figure shows a graph of a straight line on the x y-coordinate plane. The x and y-axes run from negative 12 to 12. The straight line goes through the points (negative 1, negative 4), (0, 0), and (1, 4).

    Try It \(\PageIndex{39}\)

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

    Answer

    The figure shows a graph of a straight line on the x y-coordinate plane. The x and y-axes run from negative 12 to 12. The straight line goes through the points (negative 1, 1), (0, 0), and (1, negative 1).

    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
      Quadrant I Quadrant II Quadrant III Quadrant IV
      \((x,y)\) \((x,y)\) \((x,y)\) \((x,y)\)
      \((+,+)\) \((-,+)\) \((-,-)\) \((+,-)\)

      This figure shows the x y-coordinate plane with the four quadrants labeled. In the top right of the plane is quadrant I labeled (plus, plus). In the top left of the plane is quadrant II labeled (minus, plus). In the bottom left of the plane is quadrant III labeled (minus, minus). In the bottom right of the plane is quadrant IV labeled (plus, minus).

    • 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.

    The table has 3 rows and 2 columns. The first row is a header row with the headers x and y. The second row contains a and 0. The x-intercept occurs when y is zero. The third row contains 0 and b. The y-intercept occurs when x is zero.

    • 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

    Glossary

    horizontal line
    A horizontal line is the graph of an equation of the form \(y=b\). The line passes through the \(y\)-axis at \((0,b)\).
    intercepts of a line
    The points where a line crosses the \(x\)-axis and the \(y\)-axis are called the intercepts of the line.
    linear equation
    An equation of the form \(Ax+By=C\), where \(A\) and \(B\) are not both zero, is called a linear equation with two variables.
    ordered pair
    An ordered pair, \((x,y)\) gives the coordinates of a point in a rectangular coordinate system. The first number is the \(x\)-coordinate. The second number is the \(y\)-coordinate.
    origin
    The point \((0,0)\) is called the origin. It is the point where the \(x\)-axis and \(y\)-axis intersect.
    solution of a linear equation with two variables
    An ordered pair \((x,y)\) is a solution of the linear equation \(Ax+By=C\), if the equation is a true statement when the \(x\)- and \(y\)-values of the ordered pair are substituted into the equation.
    standard form of a linear equation
    A linear equation is in standard form when it is written \(Ax+By=C\).
    vertical line
    A vertical line is the graph of an equation of the form \(x=a\). The line passes through the \(x\)-axis at \((a,0)\).

    Practice Makes Perfect

    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.

    1. a. \((−4,2)\) b. \((−1,−2)\) c. \((3,−5)\) d. \((−3,0)\)
    e. \(\left(\dfrac{5}{3},2\right)\)

    Answer

    This figure shows points plotted on the x y-coordinate plane. The x and y axes run from negative 6 to 6. The point labeled a is 4 units to the left of the origin and 2 units above the origin and is located in quadrant II. The point labeled b is 1 unit to the left of the origin and 2 units below the origin and is located in quadrant III. The point labeled c is 3 units to the right of the origin and 5 units below the origin and is located in quadrant IV. The point labeled d is 3 units to the left of the origin and 5 units above the origin and is located in quadrant II. The point labeled e is 1 and a half units to the right of the origin and 2 units above the origin and is located in quadrant I.

    2. a. \((−2,−3)\) b. \((3,−3)\) c. \((−4,1)\) d. \((4,−1)\)
    e. \(\left(\dfrac{3}{2},1\right)\)

    3. a. \((3,−1)\) b. \((−3,1)\) c. \((−2,0)\) d. \((−4,−3)\)
    e. \(\left(1,\dfrac{14}{5}\right)\)

    Answer

    This figure shows points plotted on the x y-coordinate plane. The x and y axes run from negative 6 to 6. The point labeled a is 3 units to the right of the origin and 1 unit below the origin and is located in quadrant IV. The point labeled b is 3 units to the left of the origin and 1 unit above the origin and is located in quadrant II. The point labeled c is 2 units to the left of the origin and 2 units above the origin and is located in quadrant II. The point labeled d is 4 units to the left of the origin and 3 units below the origin and is located in quadrant III. The point labeled e is 1 unit to the right of the origin and 3 and 4 fifths units above the origin and is located in quadrant I.

    4. a. \((−1,1)\) b. \((−2,−1)\) c. \((2,0)\) d. \((1,−4)\)
    e. \(\left(3,\dfrac{7}{2}\right)\)

    In the following exercises, for each ordered pair, decide

    a. is the ordered pair a solution to the equation? b. is the point on the line?

    5. \(y=x+2\);

    A: \((0,2)\); B: \((1,2)\); C: \((−1,1)\); D: \((−3,−1)\).

    This figure shows a straight line graphed on the x y-coordinate plane. The x and y-axes run from negative 8 to 8. The line goes through the points (negative 3, negative 1), (negative 2, 0), (negative 1, 1), (0, 2), (1, 3), (2, 4), and (3, 5).

    Answer

    a. A: yes, B: no, C: yes, D: yes b. A: yes, B: no, C: yes, D: yes

    6. \(y=x−4\);

    A: \((0,−4)\); B: \((3,−1)\); C: \((2,2)\); D: \((1,−5)\).

    This figure shows a straight line graphed on the x y-coordinate plane. The x and y-axes run from negative 8 to 8. The line goes through the points (negative 3, negative 7), (negative 2, negative 6), (negative 1, negative 5), (0, negative 4), (1, negative 3), (2, negative 2), and (3, negative 1).

    7. \(y=\dfrac{1}{2}x−3\);
    A: \((0,−3)\); B: \((2,−2)\); C: \((−2,−4)\); D: \((4,1)\).

    This figure shows a straight line graphed on the x y-coordinate plane. The x and y-axes run from negative 8 to 8. The line goes through the points (negative 4, negative 5), (negative 2, negative 4), (0, negative 3), (2, negative 2), (4, negative 1), and (6, 0).

    Answer

    a. A: yes, B: yes, C: yes, D: no b. A: yes, B: yes, C: yes, D: no

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

    This figure shows a straight line graphed on the x y-coordinate plane. The x and y-axes run from negative 8 to 8. The line goes through the points (negative 6, 0), (negative 3, 1), (0, 2), (3, 3), (6, 4), and (9, 5).

    Graph a Linear Equation by Plotting Points

    In the following exercises, graph by plotting points.

    9. \(y=x+2\)

    Answer

    This figure shows a straight line graphed on the x y-coordinate plane. The x and y-axes run from negative 12 to 12. The line goes through the points (negative 3, negative 1), (negative 2, 0), (negative 1, 1), (0, 2), (1, 3), (2, 4), and (3, 5).

    10. \(y=x−3\)

    11. \(y=3x−1\)

    Answer

    This figure shows a straight line graphed on the x y-coordinate plane. The x and y-axes run from negative 12 to 12. The line goes through the points (negative 3, negative 10), (negative 2, negative 7), (negative 1, negative 4), (0, negative 1), (1, 2), (2, 5), (3, 8), and (4, 11).

    12. \(y=−2x+2\)

    13. \(y=−x−3\)

    Answer

    This figure shows a straight line graphed on the x y-coordinate plane. The x and y-axes run from negative 12 to 12. The line goes through the points (negative 3, 0), (negative 2, negative 1), (negative 1, negative 2), (0, negative 3), (1, negative 4), (2, negative 5), (3, negative 6), and (4, negative 7).

    14. \(y=−x−2\)

    15. \(y=2x\)

    Answer

    This figure shows a straight line graphed on the x y-coordinate plane. The x and y-axes run from negative 12 to 12. The line goes through the points (negative 3, negative 6), (negative 2, negative 4), (negative 1, negative 2), (0, 0), (1, 2), (2, 4), and (3, 6).

    16. \(y=−2x\)

    17. \(y=\dfrac{1}{2}x+2\)

    Answer

    This figure shows a straight line graphed on the x y-coordinate plane. The x and y-axes run from negative 12 to 12. The line goes through the points (negative 6, negative 2), (negative 4, 0), (negative 2, 1), (0, 2), (2, 3), (4, 4), and (6, 5).

    18. \(y=\dfrac{1}{3}x−1\)

    19. \(y=\dfrac{4}{3}x−5\)

    Answer

    This figure shows a straight line graphed on the x y-coordinate plane. The x and y-axes run from negative 12 to 12. The line goes through the points (negative 3, negative 9), (0, negative 5), (3, negative 1), (6, 3), and (9, 7).

    20. \(y=\dfrac{3}{2}x−3\)

    21. \(y=−\dfrac{2}{5}x+1\)

    Answer

    This figure shows a straight line graphed on the x y-coordinate plane. The x and y-axes run from negative 12 to 12. The line goes through the points (negative 10, 5), (negative 5, 3), (0, 1), (5, negative 1), and (10, negative 3).

    22. \(y=−\dfrac{4}{5}x−1\)

    23. \(y=−\dfrac{3}{2}x+2\)

    Answer

    This figure shows a straight line graphed on the x y-coordinate plane. The x and y-axes run from negative 12 to 12. The line goes through the points (negative 4, 8), (negative 2, 5), (0, 2), (2, negative 1), (4, negative 4), and (6, negative 7).

    24. \(y=−\dfrac{5}{3}x+4\)

    Graph Vertical and Horizontal lines

    In the following exercises, graph each equation.

    25. a. \(x=4\) b. \(y=3\)

    Answer

    a.

    This figure shows a vertical straight line graphed on the x y-coordinate plane. The x and y-axes run from negative 12 to 12. The line goes through the points (4, negative 1), (4, 0), and (4, 1).

    b.

    This figure shows a horizontal straight line graphed on the x y-coordinate plane. The x and y-axes run from negative 12 to 12. The line goes through the points (negative 1, 3), (0, 3), and (1, 3).

    26. a. \(x=3\) b. \(y=1\)

    27. a. \(x=−2\) b. \(y=−5\)

    Answer

    a.

    This figure shows a vertical straight line graphed on the x y-coordinate plane. The x and y-axes run from negative 12 to 12. The line goes through the points (negative 2, negative 1), (negative 2, 0), and (negative 2, 1).

    b.

    This figure shows a horizontal straight line graphed on the x y-coordinate plane. The x and y-axes run from negative 12 to 12. The line goes through the points (negative 1, negative 5), (0, negative 5), and (1, negative 5).

    28. a. \(x=−5\) b. \(y=−2\)

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

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

    Answer

    The figure shows the graphs of a straight horizontal line and a straight slanted line on the same x y-coordinate plane. The x and y axes run from negative 12 to 12. The horizontal line goes through the points (0, 2), (1, 2), and (2, 2). The slanted line goes through the points (0, 0), (1, 2), and (2, 4).

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

    31. \(y=−\dfrac{1}{2}x\) and \(y=−\dfrac{1}{2}\)

    Answer

    The figure shows the graphs of a straight horizontal line and a straight slanted line on the same x y-coordinate plane. The x and y axes run from negative 12 to 12. The horizontal line goes through the points (0, negative 1 divided 2), (1, negative 1 divided 2), and (2, negative 1 divided 2). The slanted line goes through the points (0, 0), (1, negative 1 divided 2), and (2, negative 1).

    32. \(y=−\dfrac{1}{3}x\) and \(y=−\dfrac{1}{3}\)

    Find x- and y-Intercepts

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

    33.
    The figure shows a straight line graphed on the x y-coordinate plane. The x and y axes run from negative 8 to 8. The line goes through the points (negative 6, 9), (negative 3, 6), (0, 3), (3, 0), and (6, negative 3).

    Answer

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

    34.
    The figure shows a straight line graphed on the x y-coordinate plane. The x and y axes run from negative 8 to 8. The line goes through the points (negative 6, 4), (negative 4, 2), (negative 2, 0), (0, negative 2), (2, negative 4), and (4, negative 6).

    35.
    The figure shows a straight line graphed on the x y-coordinate plane. The x and y axes run from negative 8 to 8. The line goes through the points (negative 1, negative 6), (0, negative 5), (2, negative 3), (5, 0), and (7, 2).

    Answer

    \((5,0),(0,−5)\)

    36.
    The figure shows a straight line graphed on the x y-coordinate plane. The x and y axes run from negative 8 to 8. The line goes through the points (negative 2, negative 4), (negative 1, negative 2), (0, 0), (1, 2), and (2, 4).

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

    37. \(x−y=5\)

    Answer

    \(x\)-int: \((5,0)\), \(y\)-int: \((0,−5)\)

    38. \(x−y=−4\)

    39. \(3x+y=6\)

    Answer

    \(x\)-int: \((2,0)\), \(y\)-int: \((0,6)\)

    40. \(x−2y=8\)

    41. \(4x−y=8\)

    Answer

    \(x\)-int: \((2,0)\), \(y\)-int: \((0,−8)\)

    42. \(5x−y=5\)

    43. \(2x+5y=10\)

    Answer

    \(x\)-int: \((5,0)\), \(y\)-int: \((0,2)\)

    44. \(3x−2y=12\)

    Graph a Line Using the Intercepts

    In the following exercises, graph using the intercepts.

    45. \(−x+4y=8\)

    Answer

    The figure shows a straight line graphed on the x y-coordinate plane. The x and y axes run from negative 12 to 12. The line goes through the points (negative 8, 0), (0, 2), (4, 3), and (8, 4).

    46. \(x+2y=4\)

    47. \(x+y=−3\)

    Answer

    The figure shows a straight line graphed on the x y-coordinate plane. The x and y axes run from negative 12 to 12. The line goes through the points (negative 3, 0), (0, negative 3), and (3, negative 6).

    48. \(x−y=−4\)

    49. \(4x+y=4\)

    Answer

    The figure shows a straight line graphed on the x y-coordinate plane. The x and y axes run from negative 12 to 12. The line goes through the points (0, 4), (1, 0), and (2, negative 4).

    50. \(3x+y=3\)

    51. \(3x−y=−6\)

    Answer

    The figure shows a straight line graphed on the x y-coordinate plane. The x and y axes run from negative 12 to 12. The line goes through the points (negative 2, 0), (negative 1, 3), and (0, 6).

    52. \(2x−y=−8\)

    53. \(2x+4y=12\)

    Answer

    The figure shows a straight line graphed on the x y-coordinate plane. The x and y axes run from negative 8 to 8. The line goes through the points (0, 3), (2, 2), and (6, 0).

    54. \(3x−2y=6\)

    55. \(2x−5y=−20\)

    Answer

    The figure shows a straight line graphed on the x y-coordinate plane. The x and y axes run from negative 12 to 12. The line goes through the points (negative 10, 0), (0, 4), and (10, 8).

    56. \(3x−4y=−12\)

    57. \(y=−2x\)

    Answer

    The figure shows a straight line graphed on the x y-coordinate plane. The x and y axes run from negative 12 to 12. The line goes through the points (negative 1, 2), (0, 0), and (1, negative 2).

    58. \(y=5x\)

    59. \(y=x\)

    Answer

    The figure shows a straight line graphed on the x y-coordinate plane. The x and y axes run from negative 12 to 12. The line goes through the points (negative 1, negative 1), (0, 0), and (1, 1).

    60. \(y=−x\)

    Mixed Practice

    In the following exercises, graph each equation.

    61. \(y=\dfrac{3}{2}x\)

    Answer

    The figure shows a straight line graphed on the x y-coordinate plane. The x and y axes run from negative 8 to 8. The line goes through the points (negative 2, negative 3), (0, 0), and (2, 3).

    62. \(y=−\dfrac{2}{3}x\)

    63. \(y=−\dfrac{1}{2}x+3\)

    Answer

    The figure shows a straight line graphed on the x y-coordinate plane. The x and y axes run from negative 8 to 8. The line goes through the points (negative 2, 4), (0, 3), (2, 2), (4, 1), and (6, 0).

    64. \(y=\dfrac{1}{4}x−2\)

    65. \(4x+y=2\)

    Answer

    The figure shows a straight line graphed on the x y-coordinate plane. The x and y axes run from negative 8 to 8. The line goes through the points (negative 1, 6), (0, 2), (1, negative 2), and (2, negative 4).

    66. \(5x+2y=10\)

    67. \(y=−1\)

    Answer

    The figure shows a horizontal straight line graphed on the x y-coordinate plane. The x and y axes run from negative 8 to 8. The line goes through the points (negative 2, negative 1), (0, negative 1), and (1, negative 1).

    68. \(x=3\)

    Writing Exercises

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

    Answer

    Answers will vary.

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

    71. Do you prefer to use the method of plotting points or the method using the intercepts to graph the equation \(4x+y=−4\)? Why?

    Answer

    Answers will vary.

    72. Do you prefer to use the method of plotting points or the method using the intercepts to graph the equation \(y=\dfrac{2}{3}x−2\)? Why?

    Self Check

    a. After completing the exercises, use this checklist to evaluate your mastery of the objectives of this section.

    This table has 6 rows and 4 columns. The first row is a header row and it labels each column. The first column header is “I can…”, the second is “Confidently”, the third is “With some help”, and the fourth is “No, I don’t get it”. Under the first column are the phrases “plot points on a rectangular coordinate system”, “graph a linear equation by plotting points”, “graph vertical and horizontal lines”, “find x and y intercepts”, and “graph a line using intercepts”. The other columns are left blank so that the learner may indicate their mastery level for each topic.

    b. If most of your checks were:

    Confidently. Congratulations! You have achieved the objectives in this section. Reflect on the study skills you used so that you can continue to use them. What did you do to become confident of your ability to do these things? Be specific.

    With some help. This must be addressed quickly because topics you do not master become potholes in your road to success. In math every topic builds upon previous work. It is important to make sure you have a strong foundation before you move on. Who can you ask for help? Your fellow classmates and instructor are good resources. Is there a place on campus where math tutors are available? Can your study skills be improved?

    No, I don’t get it. This is a warning sign and you must address it. You should get help right away or you will quickly be overwhelmed. See your instructor as soon as you can to discuss your situation. Together you can come up with a plan to get you the help you need.


    This page titled 1.1: Graph Linear Equations with Two Variables is shared under a CC BY license and was authored, remixed, and/or curated by OpenStax.

    • Was this article helpful?