What is the mathematical distinction between closed and open sets? If you wanted me to spell out the difference between closed and open sets, the best I could do is to draw you a circle one with dotted circumference the other with continuous circumference. Or I would give you an example with a set of numbers $(1, 2)$ vs $[1,2]$ and tell you which bracket signifies open or closed.
But in many theorems the author is dead set about using either closed or open sets. What is the strict mathematical difference that distinguish between the two sets and signifies the importance for such distinction?
Can someone demonstrate with an example where using closed set for a theorem associated with open set would cause some sort of a problem?
 A: A real-valued continuous function on a closed bounded subset of $\mathbf R^n$ always has a maximum and a minimum. This is not true for open subsets.
Example: the function $\dfrac1{x(1-x)}$ has no maximum on $(0,1)$.
A: 
Can someone demonstrate with an example where using closed set for a theorem associated with open set would cause some sort of a problem?

An arbitrary intersection of closed sets is closed, but you can't say the same about open sets: for an intersection of open sets to be open, it has to be finite (counterexample, $\bigcap_{n \in \mathbf{N}} \left(-\frac{1}{n},\frac{1}{n}\right) = \{0\}$ is not open).
Similarly, an arbitrary union of open sets is open, but an arbitrary union of closed sets is not necessarily closed (counterexample, for any non-closed $X$, $\bigcup_{x \in X} \{x\} = X$ is not closed).
A: The question you've asked is difficult to answer because it is broad. An open set is a lot more concrete and intuitive in a metric space, where it is defined as some set $U$ so that for every point $x$ in $U$, there is a neighborhood (or an open ball) around $x$ that is completely contained in $U$. Think about picking any number in $(0,1)$. I assure you, that no matter what number you pick, I can find some teeny tiny neighborhood around that number that is still inside $(0,1)$. However, in $[0,1]$, if you pick $x=0$, then I simply cannot find a neighborhood around $0$ that is completely contained in $[0,1]$ (since I'd always have to include some teeny tiny negative number in that neighborhood).
An open set in a general topological space is a little bit harder to grasp for a beginner, though. Let $X$ be a set, and $\tau$ is a set of sets. Then $\tau$ is a topology if:


*

*$X$ and $\emptyset$ are in $\tau$,

*Any union of sets in $\tau$ are also in $\tau$,

*Any finite intersection of sets in $\tau$ are also in $\tau$.


Then we define everything in $\tau$ to be open sets.
In either event, a closed set is a set whose complement is open. (A much simpler definition :)
It's also important to note that sets can be open, closed, neither, or both! $(0,1)$, $[0,1]$, $[0,1)$, are open, closed, and neither (respectively). For an example that is both open and closed, consider the set of complex numbers. Its complement is the empty set, which is open (see $(1)$), and so the complex numbers are closed. But we also know $\mathbb{C}$ is open in $\tau$ by $(1)$. So it is both open and closed.
The idea to take home here is that the concept of an open set can be anything. It's a relative term. It's like how time is relative, and depends on your frame of reference.
A: Let's talk about real numbers here, rather than general metric or topological spaces. This way we don't need notions of Cauchy sequences or open balls, and can talk in more familiar terms.
We define that a set $X \subset \mathbb{R}$ is open if for every $x \in X$ there exists some interval $(x-\epsilon,x+\epsilon)$ with $\epsilon > 0$ such that this interval is also fully contained in $X$.
An example is the inverval $(0,1) =\{x \in \mathbb{R} : 0 < x < 1\}$. Note that this is an infinite set, because there are infinitely many points in it. If you choose a number $a \in (0,1)$ and let $\epsilon = \min\{a-0, 1-a\}$ then we can guarantee that $(a-\epsilon,a+\epsilon) \subset X$. The set $X$ is open.
A set $X$ is defined to be closed if and only if its complement $\mathbb{R}- X$ is open. For example, $[0,1]$ is closed because $\mathbb{R}-[0,1]= (-\infty,0)\cup(1,\infty)$ is open.
It gets interesting when you realise that sets can be both open and closed, or neither. This is a case where strict adherence to the definition is important. The empty set $\emptyset$ is both open and closed and so is $\mathbb{R}$. Why? The set $[1,2)$ is neither open nor closed. Why?
A: The question you asked has answers at various levels of sophistication. You really want to be thinking about intervals rather than finite sets of points, and think also about regions in the plane. Here is one way of looking at things.
A closed set is one which contains all its limit points - so when you are working with closed sets you can be confident abut taking limits because you know that the limit points exist.
An open set can be thought of as one in which every point is an interior point, at least that is a useful guide when you are thinking about sets on the line or in the plane. So the idea is that if you pick a point in an open set, you have enough points close to it in the set to work with, and that there are no points close to it which are outside the set (every point in an open set has a neighbourhood of points wholly within the open set). This cashes out particularly when thinking about continuous functions - the classic epsilon-delta definition is essentially talking about the relationships between nearby points.
These ideas can be considerably generalised and made precise as part of the machinery of topology. Note it is possible to have a set which is both open and closed -- the whole of the real line for example -- or to have a set that is neither open nor closed, such as the set of all rational numbers.
The basic properties of closed and open sets are not the only useful things about them. For example a closed and bounded subset of the real line has a useful property called "compactness", which enables us to reduce some infinite problems to finite ones, and hence get better results.
A: (I am assuming everything inside a metric space)
consider any cauchy-sequence inside a closed set...then this will always converge where this is not true for any open set..
same time for any point in the open set there always exist a neighbour hood which is properly contained in the open set..which is in general not true for any closed set...
theses two things are very important for proving a lots of theorem.
A: The easiest way to think of it is that in an open set you can go arbitrarily "close" to some point but never quite get the point in question without leaving the set itself.
In a closed set there is no such point and all points you can go arbitrarily close to is within the set hence you can reach the point without leaving the set.
A: Try to define a closed interval by using open sets. This refers to the way we are normally defining open and closed intervals. So consider that we normally define $\mathcal{B}(\mathbb{R})=\sigma(K)$, with $K=\{[a,b), a,b \in \mathbb{R}, -\infty<a,b<\infty\}$.
Now note that $\mathcal{B}(\mathbb{R})$ is a $\sigma$-algebra (by normal way of verifying this) which contains all open and closed intervals, cause it is closed under countably many intersections and unions. This follows cause we can write
$(a,b)=\bigcup_{n=1}^{\infty} [a+\frac{1}{n},b) $ for all open intervals with $a,b \in \mathbb{R}, a<b$ and 
$[a,b]=\bigcap_{n=1}^{\infty} [a,b+\frac{1}{n})$ for all closed intervals with $a,b \in \mathbb{R}, a \leq b$.
Now try to define the same set where you are only using open intervals and try to construct closed intervals from there. The problem then is that you have boundary points which are not inside this set.
