To visualize the idea of concavity using the first derivative, consider the tangent line at a point. Recall that the slope of the tangent line is precisely the derivative. As you move along an interval, if the slope of the line is increasing, then

is increasing and so the function is concave up. Similarly, if the slope of the line is decreasing, then

is decreasing and so the function is concave down.

In this Demonstration, the tangent line at

is drawn in red. The tangent line at

is denoted by a dashed blue line. If

never changes sign twice in an interval .15 units wide or smaller, as is the case in all the examples considered by this Demonstration, then whenever the blue line has a larger slope than the red line, the derivative is increasing from

to

and the function is concave up on that interval. Likewise, whenever the blue line has a smaller slope than the red line, the derivative is decreasing from

to

and the function is concave down on that interval.

In practice, we use the second derivative test to check concavity. The second derivative test says that a function

is concave up when

and concave down when

This follows directly from the definition as the

is concave up when

is increasing and

is increasing when its derivative

is positive. Similarly

is concave down when

is decreasing, which occurs when

.