Problem with basic definition of a tangent line.
Animations showing that the limit of a secant as the variable point tends towards a fixed point becomes the tangent line.
First, when the variable point (in red) approaches the fixed point (in black) from below:
Second, when the variable point approaches the fixed point from above:
In both cases, the secant line becomes the same tangent line. This suggests that the derivative is well-defined at the black point (which is highlighted in green when tangency occurs).
Formally, then, this gives us a definition of the derivative as follows. For a real-valued function $f(x)$, the derivative at $x = a$ is the limit of the slope of the secant line through two points $$P_a = (a, f(a)), \quad P_b = (b, f(b))$$ as $b$ approaches $a$, whenever such a limit exists. Since the slope is simply $$\frac{f(b)-f(a)}{b-a},$$ we then have $$f'(a) = \lim_{b \to a} \frac{f(b) - f(a)}{b-a}.$$ The equation of the tangent line at the point $P_a$ is therefore $$y - f(a) = f'(a)(x-a),$$ if the line does not have infinite slope; otherwise $1/f'(a) = 0$ and we can write the equation of the tangent line as $x = a$.
When we talk about a line tangent to a curve we mean a line tangent to the circle corresponding to the radius of curvature. This is because there are only three ways a line can interact with a circle:
- The line does not intersect the circle.
- The line cuts through the circle, i.e. intersects at two points. We call this a secant line.
- The line intersects the circle at one point. This is called the tangent line.
For a smooth curve, at any point we can calculate its curvature with a circle. The line tangent to that circle is the tangent line to the curve.
This goes along with the answers of Christian Blatter and fleablood. The tangent line to a curve at a point is, informally, the line that best approximates the behavior of the curve at that point. A line that crosses the curve at an angle does not approximate the curve well, but a line that heads in the same direction as the curve at that point does offer a good approximation. As Christian points out, this tangent line can cross the curve, as in the case of $y =x^3$ at $x = 0$, but at the point of tangency, its behavior is as close to the behavior of the curve as possible.
This is informal since it begs the question of what it means to approximate the curve. The way this is answered is through the definition of the derivative. We approximate the curve with a line passing not just the point of interest, but also a second nearby point on the curve. Then move the second point towards the first. On a well-behaved curve, the closer the second point comes to the first, the angle of the line will approach a particular angle, which represents the tangent. The derivative is just a means of expressing this idea exactly.