A continuous function is one that can be drawn without lifting your pencil. A discontinuous function cannot be drawn like this because it has one or more discontinuities. There are three types of discontinuities:

A very discontinuous function

We can also talk about whether a function is continuous at a particular point. For example, the function graphed above is continuous at 3.

Drawing a curve without lifting your pencil is a good way of thinking about continuity, but this isn’t a very good definition. Here is a formal definition with some mathematical rigour in it: a function f\displaystyle f is continuous at a\displaystyle a if

f(a)\displaystyle f{\left ( a \right )} is definedandlimxaf(x)=f(a)\displaystyle \qquad \allowbreak\quad\allowbreak\text{and}\allowbreak\quad\allowbreak \qquad \lim_{x \to a} f{\left ( x \right )} = f{\left ( a \right )}.

Let’s try using this definition. Consider the following piecewise function:

f(x)={x23ifx1x1ifx>1\displaystyle f{\left ( x \right )} = \left \lbrace \begin{matrix} x^{2} - 3 & \allowbreak\quad\allowbreak\text{if}\allowbreak\quad\allowbreak x \le - 1 \\ x - 1 & \allowbreak\quad\allowbreak\text{if}\allowbreak\quad\allowbreak x > - 1 \end{matrix} \right ..

Is it continuous at −1? If it is, it must satisfy the two conditions in our definition. Since f(1)=2\displaystyle f{\left ( - 1 \right )} = - 2, the first condition is met. Since both pieces of f\displaystyle f are continuous individually (they are polynomials) and they intersect at x=1\displaystyle x = - 1, the left and right limits are equal and thus

limx1f(x)=f(1)=2\displaystyle \lim_{x \to - 1} f{\left ( x \right )} = f{\left ( - 1 \right )} = - 2,

and the second condition is met. If this doesn’t make sense, try graphing the function. You will see that the function approaches −2 from both the left and the right.