# Equation of a line: The derivation of y = mx + b

We have discussed in context the origin (click here and here) of the linear equation , where and are real numbers. We have also talked about the slope of a line and many of its properties. In this post, we will discuss the generalization of the equation of a line in the coordinate plane based on its slope and y-intercept.

We have learned that to get a slope of a line, we only need two points. We have also learned that given two points on a line, its slope is described as the *rise* (difference in the y-coordinates) over the *run* (difference in x-coordinates). Therefore, if we have two points with coordinates and , the slope is defined the formula

.

All the points on a vertical line have similar x-coordinates; therefore, the run is equal to making undefined. From here, we can conclude a vertical line has no slope.

Now, it is clear that every non-vertical line has a slope (can you see why?). It is also clear that every non-vertical line will always pass through the y-axis — in fact, both axes. If we let be the *y*-intercept of line (see blue line below), then the coordinates of f that point are . If we choose any point on line with coordinates , then we can get the slope of the line passing through the two points as shown in the figure.

Therefore, the slope of any line passing through and is . This is the general equation of a line given a point (on the line) and its y-intercept. This equation is called the **slope-intercept** form.

**Related Articles**

- Matchsticks, Linear Relations, and Multiple Representations
- Slope Concept 1 – Understanding the Basic Concepts of Slope
- Slope Concept 2 – Slope of the Graph of a Linear Function
- Slope Concept 3 – Slopes of Vertical and Horizontal Lines
- Arithmetic Sequences and Linear Functions