Mathematics » Introducing Graphs » Graphing Linear Equations

Graphing Vertical and Horizontal Lines

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

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

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

Then plot the points and connect them with a straight line. Notice in the figure below that the graph is a vertical line.

The graph shows the x y-coordinate plane. The x and y-axis each run from -7 to 7. A vertical line passes through three labeled points, “ordered pair -3, 3”, “ordered pair -3, 2”, and ordered pair -3, 1”. The line is labeled x = -3.

Definition: Vertical Line

A vertical line is the graph of an equation that can be written in the form \(x=a.\)

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

Example

Graph the equation \(x=2.\) What type of line does it form?

Solution

The equation has only variable, \(x,\) and \(x\) is always equal to \(2.\) We make a table where \(x\) is always \(2\) and we put in any values for \(y.\)

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

Plot the points and connect them as shown.

The graph shows the x y-coordinate plane. The x and y-axis each run from -7 to 7. A vertical line passes through three labeled points, “ordered pair 2, 3”, “ordered pair 2, 2”, and ordered pair 2, 1”. The line is labeled x = 2.

The graph is a vertical line passing through the \(x\)-axis at \(2.\)

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

To make a table of solutions, write \(4\) for all the \(y\) values and then choose any values for \(x.\)

We’ll use \(0,2,\) and \(4\) for the \(x\)-values.

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

Plot the points and connect them, as shown in the figure below. This graph is a horizontal line passing through the \(y\text{-axis}\) at \(4.\)

The graph shows the x y-coordinate plane. The x and y-axis each run from -7 to 7. A horizontal  line passes through three labeled points, “ordered pair 0, 4”, “ordered pair 2, 4”, and ordered pair 4, 4”. The line is labeled y = 4.

Definition: Horizontal Line

A horizontal line is the graph of an equation that can be written in the form \(y=b.\)

The line passes through the \(y\text{-axis}\) at \(\left(0,b\right).\)

Example

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

Solution

The equation \(y=-1\) has only variable, \(y.\) The value of \(y\) is constant. All the ordered pairs in the table have the same \(y\)-coordinate, \(-1\). We choose \(0,3,\) and \(-3\) as values for \(x.\)

\(y=-1\)
\(x\)\(y\)\(\left(x,y\right)\)
\(-3\)\(-1\)\(\left(-3,-1\right)\)
\(0\)\(-1\)\(\left(0,-1\right)\)
\(3\)\(-1\)\(\left(3,-1\right)\)

The graph is a horizontal line passing through the \(y\)-axis at \(–1\) as shown.

The graph shows the x y-coordinate plane. The x and y-axis each run from -7 to 7. A horizontal  line passes through three labeled points, “ordered pair -3, -1”, “ordered pair 0, -1”, and ordered pair 3, -1”. The line is labeled y = -1.

The equations for vertical and horizontal lines look very similar to equations like \(y=4x.\) What is the difference between the equations \(y=4x\) and \(y=4?\)

The equation \(y=4x\) has both \(x\) and \(y.\) The value of \(y\) depends on the value of \(x.\) The \(y\text{-coordinate}\) changes according to the value of \(x.\)

The equation \(y=4\) has only one variable. The value of \(y\) is constant. The \(y\text{-coordinate}\) is always \(4.\) It does not depend on the value of \(x.\)

There are two tables. This first table is titled y = 4 x, which is shown in blue. It has 4 rows and 3 columns. The first row is a header row and it labels each column “x”, “y”, and  “ordered pair x, y”. Under the column “x” are the values  0, 1, and 2. Under the column “y” are the values  0, 4, and 8. Under the column “ordered pair x, y” are the values “ordered pair 0, 0”, “ordered pair 1, 4”, and “ordered pair 2, 8”. This second table is titled y = 4 , which is shown in red. It has 4 rows and 3 columns. The first row is a header row and it labels each column “x”, “y”, and  “ordered pair x, y”. Under the column “x” are the values  0, 1, and 2. Under the column “y” are the values  4, 4, and 4. Under the column “ordered pair x, y” are the values “ordered pair 0, 4”, “ordered pair 1, 4”, and “ordered pair 2, 4”.

The graph shows both equations.

The graph shows the x y-coordinate plane. The x and y-axis each run from -7 to 7. A horizontal line passes through “ordered pair 0, 4” and “ordered pair 1, 4” and is labeled y = 4. A second line passes through “ordered pair 0, 0” and “ordered pair 1, 4” and is labeled y = 4 x. The two lines intersect at “ordered pair 1, 4”.

Notice that the equation \(y=4x\) gives a slanted line whereas \(y=4\) gives a horizontal line.

Example

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

Solution

Find three solutions for each equation. Notice that the first equation has the variable \(x,\) while the second does not. Solutions for both equations are listed.

 

There are two tables. This first table is titled y = -3 x, which is shown in red. It has 4 rows and 3 columns. The first row is a header row and it labels each column “x”, “y”, and  “ordered pair x, y”. Under the column “x” are the values  0, 1, and 2. Under the column “y” are the values  0, -3, and -6. Under the column “ordered pair x, y” are the values “ordered pair 0, 0”, “ordered pair 1, -3”, and “ordered pair 2, -6”. This second table is titled y = -3 , which is shown in red. It has 4 rows and 3 columns. The first row is a header row and it labels each column “x”, “y”, and  “ordered pair x, y”. Under the column “x” are the values  0, 1, and 2. Under the column “y” are the values  -3, -3, and -3. Under the column “ordered pair x, y” are the values “ordered pair 0, -3”, “ordered pair 1, -3”, and “ordered pair 2, -3”.

The graph shows both equations.

 

The graph shows the x y-coordinate plane. The x and y-axis each run from -7 to 7. A horizontal line passes through “ordered pair 0, -3” and “ordered pair 1, -3” and is labeled y = -3. A second line passes through “ordered pair 0, 0” and “ordered pair 1, -3” and is labeled y = -3 x. The two lines intersect at “ordered pair 1, -3”.

[Attributions and Licenses]


This is a lesson from the tutorial, Introducing Graphs and you are encouraged to log in or register, so that you can track your progress.

Log In

Share Thoughts