What is y = mx + b?

Last Updated : 23 Jul, 2025

The equation y = mx + b is a linear equation, which means a straight line on a graph. Where y is the value on the vertical axis (up and down). x is the value on the horizontal axis (left and right). m is the slope of the line. It shows how steep the line is. If the slope is higher, the line goes up faster. If it's negative, the line goes down. b is the y-intercept. It's the point where the line crosses the y-axis. In simple terms, it tells you where the line starts on the vertical axis.

y = mx + b
Slope Intercept Form of Line

So, for any value of x, this equation helps you figure out what the value of y will be. The equation shows how x and y are related through the slope (m) and the starting point (b).

How to Find the Slope?

The slope (m) represents the steepness or incline of the line. It indicates how much y changes for a unit change in x.

  • Mathematically, the slope can be expressed as m = \frac{{\Delta y}}{{\Delta x}}​,
    • where Δy is the change in the y-values, and Δx is the change in the x-values.

To find the slope (m) of a line, you can use the slope formula, which is:

m = \frac{y_2 - y_1}{x_2 - x_1}

This formula calculates the rate of change between the two points, representing the slope of the line.

Example: If you have points (1, 3) and (4, 11), find slope.

Solution:

Given: (1, 3) and (4, 11)

Thus, m = \frac{11 - 3}{4 - 1}

So, the slope (m) of the line passing through these points is m = \frac{8}{3}

How to Find the Y-Intercept?

To find the y-intercept of a line when given a linear equation in slope-intercept form:

  • Set x = 0 in the equation y = mx + b.
  • Solve for y. The resulting value is the y-intercept, b.

For example, in the equation y = 2x + 5, setting x = 0 gives y = 5. Therefore, the y-intercept is 5.

Graphing a Line Using y = mx + b

The below graph represents a line using the slope intercept equation y = mx + b where, m is the slope of the line and b is the intercept of the line.

Graph-of-y-equals-mx-plus-c

Solved Examples on y = mx + b

Example 1: Find the slope and y-intercept of the line given by the equation: y = 2x + 3.

Solution:

The equation is already in the form y = mx + b, where m is the slope and b is the y-intercept.

Comparing with the standard form:

  • m=2(Slope)
  • b=3(y-intercept)

The slope of the line is 2, meaning for every 1 unit increase in x, y increases by 2. The y-intercept is 3, which means the line crosses the y-axis at the point (0, 3).

Example 2: Find the equation of the line passing through the point (4, -2) with slope 5.

Solution:

y - y_1 = m(x - x_1)
⇒ y − (−2) = 5(x − 4)
⇒ y + 2=5(x − 4)
⇒ y + 2 = 5x − 20
⇒ y = 5x − 22

The equation of the line is y = 5x - 22.

Example 3: Convert the equation 3x + 4y = 12 to slope-intercept form and find the slope and y-intercept.

Solution:

Start with the given equation:

3x+4y=12
⇒ 4y=−3x+12
⇒ y = -(3/4)x + 3

The equation is now in the form y = mx + b, where m = -\frac{3}{4} and b = 3.

Example 4: Find the equation of a line with slope -2 and y-intercept 5.

Solution:

Using the slope-intercept form y = mx + b:
y = −2x+5

The equation of the line is y = -2x + 5.

Example 5: Determine the slope of the line passing through the points (1, 2) and (3, 6).

Solution:

Use the slope formula:

m = \frac{y_2-y_1}{x_2-x_1}
m = \frac{6-2}{3-1} = \frac{4}{2} = 2

The slope of the line is 2.

Practice Questions on y = mx + b

You can download free worksheet on y = mx + b for practicing various different questions with their answers from below:

Download Worksheet on y = mx + b

Conclusion

People who are learning linear equations need to understand what y = mx + b means in order to solve and graph them. This equation is versatile and applicable to any circumstances that involve quantitative analysis of variables having proportional relationships to predict the values.

Read More,

Comment

Explore