

This is called multiple linear regression. This same concept can be extended to cases where there are more than two variables. Basically what the linear regression algorithm does is it fits multiple lines on the data points and returns the line that results in the least error. There can be multiple straight lines depending upon the values of intercept and slope. The values that we can control are the intercept(b) and slope(m). The y and x variables remain the same, since they are the data features and cannot be changed. So basically, the linear regression algorithm gives us the most optimal value for the intercept and the slope (in two dimensions). Where b is the intercept and m is the slope of the line.
