# Continuous function

 x + 3 = 7 x = ? 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:

$f(x) = x^3 - 3x^2 + 2x + 1\,$

The function on the right is:

$f(x) = x^3 - 3x^2 + 2x + 1\,$ for x $\le$ 2
$f(x) = x^3 - 3x^2 + 2x - 1\,$ for x $>\,$ 2

## More precise definition

 $\frac{d}{dx} \sin x=?\,$ This article/section deals with mathematical concepts appropriate for a student in late high school or early university.

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.

A function f: X -> Y mapping elements in a topological space X to a topological space Y is continuous if for every open set U in Y, the inverse image of U under f is an open subset of X.

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.

### Metric Spaces

Let $X\,$ and $Y\,$ be to metric spaces, and $f: X \rightarrow Y$ a function between these two sets. Then $f\,$ is continuous in $x_0 \in X$ if for all $\epsilon > 0\,$ there is a $\delta > 0\,$ such that for all $x\,$ with

$|x - x_0| < \delta\,$

we have

$|f(x) - f(x_0)| < \epsilon \,$.

This is the notorious $\epsilon-\delta-\,$definition of continuity. Especially, it works for the metric spaces $\mathbb{R}\,$ and $\mathbb{R}^n\,$, and it is used in any college level course on calculus.

## Interesting examples

The characteristic function of $\mathbb{Q}\,$ in $\mathbb{R}\,$, $\chi_{\mathbb{Q}} : \mathbb{R} \rightarrow \mathbb{R}$, defined as

$\chi_{\mathbb{Q}}(x)$$= \left\{\begin{matrix} \,1 \quad &: &\quad x \in \mathbb{Q} \\ \,0 \quad &: &\quad x \in \mathbb{R} \setminus \mathbb{Q} \end{matrix}\right.$

is nowhere continuous.

Similarly, the function $f(x) = x \cdot \chi_{\mathbb{Q}}(x)$ is continuous only in 0, and discontinuous everywhere else.