## Calculus: Early Transcendentals (2nd Edition)

The answer is $$k=\frac{f(a)-f(b)}{a-b}.$$
The equation of the line is of the form of $$y=kx+n$$ where $k$ and $n$ are constants and $k$ is called the slope of the line. Since this line passes through the points $(a,f(a))$ and $(b,f(b))$ it must be: $$f(a)=ka+n;\quad f(b)=kb+n.$$ Subtracting those equations we get $$f(a)-f(b)=k(a-b)$$ so the slope s equal to $$k=\frac{f(a)-f(b)}{a-b}.$$