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

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:

$y=mx+b$, where $m$ is the slope of the line and $b$ 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 $\tfrac{1}{4}$ and a y-intercept of 8.