# How Do You Write An Equation For Graph Lines?

It depends on the type of graph line you want to create. For example y=2 can be a horizontal line graph. You would plot the line on every point that is 2 units above the x-axis.

• If you want a linear equation you could write y=0.009x + 34
Consider the formula of y=mx+b. This is the general equation for a linear line. You would need to find what the 'm' and 'b' are in the equation in order to graph the line. The 'm' is the slope of the graph (or gradient) and 'b' is the intercept. The intercept means where the line will cross the y-axis. The 'm' as the slope is how positive or negative the line will be.

• The slope can be found by doing 'rise over run'
Find what the 'rise' is of the line and what the 'run' is. The 'run' is the horizontal point and the 'rise' is the vertical point in which the two intersect, in order to show you the slope. If you already know the slope you can put that into the equation along with the intercept.

There are various types of equations for graph lines based on the type of graph you are going to create. You may have multiple variables to account for. The information provided here is for a linear graph line only.

As long as you have the two axis points you will be able to write an equation. The 'm' and 'b' will determine the slope and intercept of the line on the graph, since you know that 'y' and 'x' are the vertical and horizontal axis of the equation. If the slope is equal to 0, you may have a completely vertical or horizontal line depending on the rest of the equation.
thanked the writer.