In calculus, a derivative test uses the derivatives of a function to locate the critical points of a function and determine whether each point is a local maximum, a local minimum, or a saddle point. Derivative tests can also give information about the concavity of a function. The usefulness of derivatives to find extrema is proved mathematically by Fermat's theorem of stationary points. First-derivative test The first-derivative test examines a function's monotonic properties (where the function is increasing or decreasing), focusing on a particular point in its domain. If the function "switches" from increasing to decreasing at the point, then the function will achieve a highest value at that point. Similarly, if the function "switches" from decreasing to increasing at the point, then it will achieve a least value at that point. If the function fails to "switch" and remains increasing or remains decreasing, then no highest or least value is achieved. One can examine a function's monotonicity without calculus. However, calculus is usually helpful because there are sufficient conditions that guarantee the monotonicity properties above, and these conditions apply to the vast majority of functions one would encounter. Precise statement of monotonicity properties Stated precisely, suppose that f is a real-valued function defined on some open interval containing the point x and suppose further that f is continuous at x. If there exists a positive number r > 0 such that f is weakly increasing on and weakly decreasing on , then f has a local maximum at x. If there exists a positive number r > 0 such that f is strictly increasing on and strictly increasing on , then f is strictly increasing on and does not have a local maximum or minimum at x. Note that in the first case, f is not required to be strictly increasing or strictly decreasing to the left or right of x, while in the last case, f is required to be strictly increasing or strictly decreasing. The reason is that in the definition of local maximum and minimum, the inequality is not required to be strict: e.g. every value of a constant function is considered both a local maximum and a local minimum. Precise statement of first-derivative test The first-derivative test depends on the "increasing–decreasing test", which is itself ultimately a consequence of the mean value theorem. It is a direct consequence of the way the derivative is defined