How to Graph a Vertical & Horizontal Line

By Chris Deziel
In addition to his work in mathematics, Rene Descartes was the philosopher who said, "I think, therefore I am."
fotomy/iStock/Getty Images

To make a graph of any two-dimensional mathematical relationship, you need a reference system. The one mathematicians use is the Cartesian system, named after French philosopher and mathematician Rene Descartes. The Cartesian system has a horizontal (left to right) axis called the x-axis and a vertical (up and down) axis called the y-axis. These axes intersect at the values x = 0 and y = 0 -- this point is called the origin. Mathematical relationships in two dimensions always involve both x and y values, and each one makes a unique graph. Two of the simplest graphs to form are horizontal and vertical lines.

Step 1

Draw horizontal and vertical axes on a piece of paper, using a pencil. Divide both axes into equal units, using a ruler. If you use graph paper, this part will already be complete. Number the units in whole numbers, starting with 1, moving to the right of the origin on the x-axis and upward from the origin on the y-axis.

Step 2

Give x a fixed value, such as 2, and plot the line x = 2. Start by plotting a point at x = 2, y = 0. Move two units to the right of the origin on the x-axis (x = 2) and make a point on the x-axis (y = 0).

Step 3

Next, change the y value to 1 and make another point on the graph. Since the x value is fixed at 2, you will make a point at x = 2, y = 1. Again, move two units to the right of the origin on the x-axis (x = 2), but now move up one unit as well (y = 1). Continue assigning values to y, but keep the value of x fixed at 2. Change the y value to 2 and make a third point a x = 2, y = 2. Then let y be 3 and make a fourth point at x = 2, y = 3. When you connect all the points on the graph, you'll form a vertical line that is 2 units to the right of the y-axis.

Step 4

Begin a new graph, this time assigning y a fixed value of 2. You will change the x values for each point while the y values will all be 2. Plot the points x = 1, y =2; x = 2, y = 2; x = 3; y = 2, and so on. Connect all the points and you''ll form a horizontal line that is 2 units above the x-axis.

Step 5

Note the general mathematical formula for a vertical line is x = a, where "a" can be any fixed number. The formula for a horizontal line, on the other hand, is y = a.