# Slope in linear regression

so f(x) = wx+b
b = the y axis
w = slope i guess
when drawing linear line the first step is to look b value which represent the y axis and w represent the angle of the line but i confused how to calculate this angle ?

You donâ€™t really need to express it as an angle: the slope (or derivative) at a given point on the curve is expressed as the ratio of the â€śriseâ€ť over the â€śrunâ€ť. You look at the line that is tangent to the curve and you draw a right triangle with a segment of that line as the hypotenuse starting at the point of tangency and the adjacent side parallel to the x-axis and the opposite side parallel to the y-axis. Then the slope is the ratio of the opposite side to the adjacent side of the angle formed at the point of tangency. Of course if you think about it in terms of trigonometry, that ends up being the tangent of that angle.

Thatâ€™s what the derivative f'(x) gives you at each point on the curve of f(x).

1 Like

thatâ€™s make sense now. thank u very much