What is a formula for such a function?
We can determine the linear function which takes value f(a) at a and f(b) at b by the following formula:
because the first term is 0 when x is b and is f(a) when x is a, while the second term is 0 when x is a and is f(b) when x is b.
A more convenient and suggestive form for this function is given by:
The number m which occurs here is called the slope of this line. Notice that it is given by the ratio of the change of f between x = b and x = a to the change in x between these two arguments.
If f is plotted on the y axis, then we call c here the y-intercept of this line; it is the value of y when x is 0, which describes the intersection point between the line and the y-axis.
There is an applet here which allows you to vary the slope m and y-intercept c and see what that does to a line. You should fiddle with this applet and from it get an idea what the slope m tells you about the line. Using it you can construct your own examples.