# Writing the equation of a line in the form y=mx + b

From WikiEducator

Study the 4 lines represented in the graph at right. Note that the equation for each of these lines (with the corresponding color) is shown to the right of the graph.

How are the four equations alike? And, where are they different? Look at the graphs of the four lines.

- All four lines have the same slant (or slope). However, the lines each cross the y-axis at a different point.

Can you see what the numbers in the equations represent on the graphs?

- The number multiplied by x in the equation is the slope of the line (m=2 for all 4 lines)
- the other number in the equation is the
**y-intercept**which is where the line crosses the y-axis.

The slope-intercept form of a line is written as:

- [math]y=mx+b[/math], where [math]m[/math] is the slope of the line and [math]b[/math] is the y-intercept.

Here are two examples. To see the resulting equations, click the show/hide triangle on the right.

### Example 1

Write the equation of the line with a slope of -4 and a y-intercept of 7.

### Example 2

Write the equation of the line with a slope of [math]\tfrac{1}{4}[/math] and a y-intercept of 8.