# How does changing the values of m and b affect the shape of the line?

### Question

In the context of this exercise, how does changing the values of m and b affect the shape of the line?

The value of m is known as the slope of a line. This value determines the incline or how much the line is slanted. Changing this value effectively rotates the line, where the axis of rotation is around the y-intercept value.

Increasing the slope will cause the line to become steeper, or closer to vertical, while decreasing the slope will cause the line to become flatter, or closer to horizontal.

The value of b is the y-intercept of a line. This value is where the line intercepts the y-axis, which is the value of y when x is 0. To quickly show this, when x is 0, we obtain y is equal to b,

``````y = m*x + b
= 0*x + b
= 0 + b
= b
``````

Changing the y-intercept value will essentially shift the line upward or downward on the graph along the y-axis. Increasing this value will shift the line upward while decreasing it will shift the line downward.

10 Likes

Thank you, I understand the concept of the slope and intercept but Iām stuck on the code to solve these exercises here.