Why do we define functions over $open$ subsets of $\mathbb{R}^n$?

Oftentimes we see functions defined on open sets; I never gave this much thought, but now I'd like to get a better understanding.

Why do we define functions over open subsets of $\mathbb{R}^n$?

"Why" is not meant to be a deep philosophical question; what I mean is, for example,

• When is it important to define a function on an open set (and when do we not care whether the set is open or not)?
• What's the motivation for doing so, i.e. what is it that we're going to use about an open set?
• Does using an open set (as opposed to, say, its closure) make anything more convenient or more manageable?

I realize this is quite a general question, and that I didn't give any context; however, I'm hoping that the principles behind defining functions on open sets are "universal" enough that the generality and lack of specific examples won't be too problematic.

-
This seems to be a deep philosophical question. Let me think about it. – Listing Jan 6 '11 at 21:14

I'm gonna take a big bunch of random stabs at this question.

• A lot of things we do in calculus won't make a whole lot of sense at boundary points [differentiation and two-sided limits, for example.] and the notion of open set, at least in $R^{n}$, lets us work on a space where there are no boundary points. We often need conditions in an open set and on the boundary of such a set to apply things like the MVT and Rolle's theorem (we often see let f be differentiable in $(a,b)$ and continuous in $[a,b]$, for example).

• For open subsets of euclidean space, a lot of nice properties transfer: something is connected if and only if it is path connected, a subset is open in the smaller space if and only if its open in $R^{n}$, etc. It's often nice to use open subsets since they're going to be made up of basis elements of your topology, which are nicer to manipulate than, say, sets which are neither open nor closed like $[0,1)$ or sets which are closed, like [0,1], especially in a space as nice as euclidean space which already has some sweet properties (as a metric space!).

• For many functions, it may not even make sense to take a closure. For example, $f(x) = \frac{1}{x}$ is nice on $(0,\infty)$, but what happens when we take the closure of that? Also, if we're given a function on an open interval, can we extend it uniquely to its closure? Can we extend it uniquely to its closure if we add that it must be continuous? Can we extend it uniquely to its closure if we add that it must be differentiable? This latter part may not answer your question, but it's kind of neat to think about.

-
One more thing that may have been mentioned: many properties that we like to examine are local properties, which means, "this property is true in a small open set around a point." Having an open subset of $R^n$ gives us the nice consequence that every such point has such an open neighborhood. – james Jan 6 '11 at 20:11

When you want to speak about continuity or differentiability at a point x, then by definition you need the function f to be defined in a neighborhood of x, therefore x must be interior.

Of course you can define one sided (or the equivalent in higher dimension) continuity \ derivatives at a point, so sometimes it is enough if the points x have a "half open" set. For example, Rolle's and Lagrange's theorems need the function to be continuous on $I=[a,b]$ and differentiable on $(a,b)$, so $a$ and $b$ are in half open sets (which are open in the induced topology on I).

-

There's a lemma called "Open Set Criterion for Continuity" which says a map between metric spaces(euclidean space is a metric space) is continuous if and only if the inverse image of every open set is open.

So an open set is required for a function to be continuous.

-
The lemma you cited is correct but the conclusion you drew in the last sentence is not. The lemma exists because continuity is a local property. But the domain does not have to be "globally" open. – lhf Jan 6 '11 at 11:10