Definition of Continuity

Definition: A function $f$ is continuous at a number $x=a$ if $\displaystyle \lim_{x \rightarrow a} f(x) = f(a)$.

Remember that $\displaystyle{\lim_{x \to a} f(x)}$ describes both what is happening when $x$ is slightly less than $a$ and what is happening when $x$ is slightly greater than $a$.  Thus there are three conditions inherent in this definition of continuity.  A function is continuous at $a$ if the limit as $x\to a$ exists, and $f(a)$ exists, and this limit is equal to $f(a)$.  This means that the following three values are equal:  $$\lim_{x \to a^-} f(x)\qquad=\qquad f(a)\qquad=\qquad\lim_{x \to a^+} f(x)$$  I.e. the value as $x$ approaches $a$ from the left is the same as the value as $x$ approaches $a$ from the left (the limit exists) which is the same as the value of $f$ at $a$.

If any of these quantities is different, or if any of them fails to exist, then we say that $f(x)$ is discontinuous at $x=a$, or that $f(x)$ has a discontinuity at $x=a$.

What does this mean graphically?  If you trace $f$ with a pencil from left to right, as you approach $x=a$, you are at some height $L$ (because $\displaystyle\lim_{x\to a^-}f(x)=L$.  As you go through the $x$-value $a$, your height is also $L$ (because $f(a)=L$).  Now as you keep going with your pencil, you are beginning this last stretch at height $L$ (because $\displaystyle\lim_{x\to a^+}f(x)=L$).

DO:  Sketch $f(x)=\sqrt x$ and let $a=4$.  Find  $f(a), \displaystyle\lim_{x\to a^-}f(x)=L$, and $\displaystyle\lim_{x\to a^+}f(x)$.  Now, follow along your graph as stated in the previous paragraph, looking at each condition as you go.  Is $f(x)=\sqrt x$ continuous at $x=a$?

Now, more interestingly, consider $\displaystyle\frac{x^2-1}{x-1}$ in this video:


Definition:  A function $f$ is
continuous from the right
at $x=a$ if $\displaystyle \lim_{x \rightarrow a^+} f(x) = f(a)$, and is
continuous from the left at $x=a$ if $\displaystyle \lim_{x \rightarrow a^-} f(x) = f(a)$, and is
continuous on an interval $I$ if it is continuous at each interior point of $I$, is continuous from the right at the left endpoint (if $I$ has one), and is continuous from the left at the right endpoint (if $I$ has one).