# Continuity on closed vs. open intervals

A question was recently brought up that asked what happens to the continuity of a $f$ on an interval if the interval changes from a closed interval to an open one and vice-a-versa. I've been thinking about this for a little and have just learned about continuity so I am not sure my thinking is clear.

It is my belief that if I have a function $f$, which is continuous on the closed interval $[a,b]$ then it must also be continuous on the open interval $(a,b)$, since we are now excluding the endpoints, however every point in between $a$ and $b$ is still continuous.

However, if you have a function $g$, which is continuous on the open interval $(a, b)$ then it tells you little or nothing about whether or not the function is continuous on $[a,b]$. By knowing it is continuous on $(a, b)$, this guarantees nothing about whether the endpoints are well-behaved/defined.

I take $\frac{1}{x}$ on $(0, 1)$ as my thought example. This is continuous on $(0, 1)$ but not continuous on $[0, 1]$ since it is not defined at $0$.

My conclusion from this is that moving from closed to open intervals is safe, whereas moving from open to closed is not always safe.

• Yes, you have it right. As another example, consider the function floor(x). It's continuous on (0,1) but not on [0,1] (since at x = 1, what happens?) – quasi Mar 2 '17 at 2:39
• @quasi is the floor of x not defined at 1? – student_t Mar 2 '17 at 2:48
• floor(x) is defined for all x, but there is a jump at x=1, so the function is not continuous there (not continuous from the left). – quasi Mar 2 '17 at 3:08
• Ah yes, it jumps to 1 from 0 got it! – student_t Mar 2 '17 at 3:47

Your conclusion is right. As to your example, since $1/x$ is not defined at $0$ it doesn't make sense to speak about continuity there. The definition of continuity requires that a function be defined at the point. But there's nothing stopping you from defining it there (there's no requirement that a function be defined by a single formula or even any formula at all) and whatever you choose it will be discontinuous.
[Addressing your question on the continuity in $(a,b)$]: Continuity of $f$ on $[a,b]$ is a statement about $f$ have a certain property on the whole interval $[a,b]$. Since $(a,b) \subset [a,b]$, it follows that $f$ has this property on $(a,b)$ as well.