# Continuous function

   This article/section deals with mathematical concepts appropriate for a student in early high school.

Continuity of functions is a concept central to calculus, advanced calculus and topology.

Put simply, a mathematical function is continuous if its graph can be drawn without lifting the pen from the paper. In the figures below, the graph on the left is a continuous function; the graph on the right is not.

The function on the left is:



The function on the right is:

 for x  2
 for x  2

## More precise definition

  This article/section deals with mathematical concepts appropriate for late high school or early college.

In calculus, continuity is defined based on limits. In advanced calculus, continuity is defined using neighborhoods or sequences. In topology, a function is continuous if the inverse image of every open set in the function's range is also an open set in the function's domain. In all three fields of mathematics, the unifying characteristic of continuity is that points near each other in a set or domain are mapped by the continuous function to points that are near each other in the corresponding set or range.

In calculus, a function f(x) is said to be continuous at point c if f(c) equals the limit of f(x) as x approaches c from both the positive and negative directions.

Another way of understanding this is by recognizing that a discontinuous function over a specific interval is one that has a gap in the interval, or one having different limits at a particular point depending on whether it is approached from the positive or negative directions.

A simple example of a continuous function would be Y = 2X + 5.

An example of a discontinuous function is Y = 1/X, which has no value for X = 0; also the limits of the function as X approaches zero from each side are different.

A differentiable function is always continuous, but a continuous function is not always differentiable. For example, the function  is continuous everywhere but not differentiable at . A more extreme example is the Weierstrass function, which is continuous everywhere but is differentiable only on a measure zero set.

A continuous function maps a convergent sequence, net, or filter to a convergent sequence, net, or filter, respectively.

A continuous function maps a compact space to a compact space.

### Topological definition

Let  and  be topological spaces. A function  is continuous if for every set  that is open in , the preimage  is an open set in .

### Metric Spaces

Let  and  be two metric spaces, and  a function between these two sets. Then  is continuous in  if for all  there is a  such that for all  with



we have

.

This is the notorious definition of continuity. Especially, it works for the metric spaces  and , and it is used in any college level course on calculus.

## Interesting examples

The characteristic function of  in , , defined as



is nowhere continuous.

Similarly, the function  is continuous only in 0, and discontinuous everywhere else.