Start with a point $(a, f(a))$ on the graph of a function $f.$ If the curve is smooth at that point -- that is, if $f'(a)$  exists -- then we have

$f'(a)= \frac{lim}{h→0} \frac{f(a+h) - f(a)}{h}$

This means that the smaller $h$ becomes, the closer $(f(a+h) - f(a))/h$ approximates $f'(a).$  Thus, for small values of $h$ (close to zero),

$f'(a) \approx \frac {f(a+h) - f(a)}{h}$

Multiplying both sides by $h$ and solving for $f(a+h)$ gives

$hf'(a) \approx f(a+h) - f(a),$
so
$f(a+h) \approx f(a) + hf'(a).$

Now, since h is small, $a+h$ is a number close to $a.$ It is more useful for our purposes to call this number $x,$ so $x = a+h.$ This also gives us $h = x-a.$ Substituting gives us the approximation

$f(x) \approx f(a) + (x-a)f'(a).$

The function given by the right-hand side,

$L(x) = f(a) + (x-a)f'(a),$

is the desired linear approximation (its graph is the tangent line to the curve at $(a, f(a)).$