Rudin's Topological Definition of an Open Set -- Does it Disagree with the Metric Space Definition? I wanted to share this definition of an open set, which made me uncomfortable. It comes from Rudin's Real and Complex Analysis and begins with the definition of a topology:
A collection $\tau$ of subsets of a set $X$ is called a topology in $X$ if $\tau$ has the following three properties:


*

*$\emptyset \in \tau$ and $X \in \tau$.

*If $V_i \in \tau$ for $i=1,\ldots,n$, then $V_1 \cap V_2 \cap \cdots \cap V_n \in \tau$ (closure under finite intersections).

*If $\{V_{\alpha}\}$ is an arbitrary collection of members of $\tau$ (countable or uncountable), then $\bigcup\limits_{a} V_{\alpha} \in \tau$ (closure under infinite unions).
If $\tau$ is a topology in $X$, then the ordered pair $(X,\tau)$ is called a topological space, and the elements of $\tau$ are called the open sets in $X$.
My question is -- doesn't this general definition disagree with the definition of open and closed sets from metric spaces? For example, what if we take $X=[0,5]$, which we would all agree is a closed set. By definition of the topological space $(X, \tau)$, we will have $[0,5] \in \tau$. So, then, according to the definition of an open set, since $[0,5]$ is a member of the topology we would call $[0,5]$ an open set. This seems wrong!
Or worse: What if we take one of the $V_i \in \tau$ to be the set $\{3\}$. Then $\tau = \{\emptyset, \{3\}, [0,5]\}$, which meets the three criteria above. Then since $\{3\} \in \tau$, then by this definition we would call $\{3\}$ an open set! We would never call a singleton an open set.
Or for a third example, let's put in one more set in the topology. What if we took a set we know to be open, say the interval $(1,3)$. Then our topology becomes
\begin{equation}
\tau=\{\emptyset, (1,3), \{3\}, (1,3], [0,5]\}
\end{equation}
since $(1,3) \cup \{3\}=(1,3]$. Now our topology has both open, closed, and clopen members!
Hopefully you guys can see why I'm bothered with this definition of an "open set".
Thanks for your thoughts!
 A: There are multiple ways to define a valid topology on a given set. You are talking about all these things such as '$[0,5]$ cannot be an open set' in the context of standard topology on $\mathbb{R}$, which includes as 'open sets' all subsets that can be written as unions of disjoint open intervals, but if you define the topology on $\mathbb{R}$ otherwise things will be different.
A: This is an enlarged comment.
You seem to have a misunderstanding. What is the definition of a topology? Let's look at your first bullet. You have that $X\in\tau_X$. So, if $X=[0,5]$, then $[0,5]\in\tau_{[0,5]}$.
Why would a singleton not be an open set? Let $X$ be a topological space endowed with the discrete topology, and let $x\in X$. Then, since $\{x\}\subset X$, and $X$ has the discrete topology, we have that $\{x\}$ is an open set!
The usual topology is different from the discrete topology, etc., on any topological space. You're only considering the usual topology, which is what one learns in high-school calculus, etc.
I will not address the metric topology, as I believe that the other answers explain it pretty clearly. However, I will remark that the usual topology on $\mathbf{R}$, or on any subset of it, is the ordered topology, and this can be shown to coincide with the metric topology, which is what you're thinking about.
A: Started to write a comment, turned out too long.

$[0,5]\notin\tau$ in the Euclidean topology; $[0,5]^c=(−∞,0)\cup(5,∞)\in\tau$. $\tau$ denotes the collection of open sets; closed sets are not included in $\tau$. This axiomatic characterization of topological spaces should be thought of as the definition of a topology. In metric spaces, we're dealing with a special topology, the metric topology. According to this, a set $U$ is defined to be open if $\forall x\in U$ $\exists\varepsilon_x>0$ such that $B(\varepsilon_x,x)\subseteq U$. You can check that this construction of a metric topology satisfies the topology axioms. But, once again, this is merely a special case.
You say you would never call a singleton an open set. You're right if you are working with the standard Euclidean metric topology on $\mathbb R$. But, then again, this is only a special case of a topology, albeit a very natural and appealing one. In fact, you can define, on any non-empty set, a topology according to which every subset is open (and also closed). This is called the discrete topology. There are many possible ways to endow a set with topologies.
Also, when you define topologies on $\mathbb R$ other than the Euclidean metric topology, you should immediately forget about thinking in terms of the latter when talking about open sets in the new topology. Trying to compare which sets are open in different topologies can be very confusing if you're accustomed to the Euclidean definition of openness.
A: A metric space $X$ here isn't just a space that happens to have both a topology and a metric $d$; it's one in which the topology is generated by the open balls $B_r(x) = \{y\in X:\, d(x, y) < r\}$. Thus, for example, $\mathbb{R}$ with the usual topology and the metric $d(x, y) = |x - y|$ is a metric space; $\mathbb{R}$ with the finite-complement topology is just a topological space that happens to have a nice function defined on it.
A: Rudin is defining the concept of a topology on a set. For any given set, there may be several different topologies on it. 
On a metric space $(X,d)$, one can define a topology on it by using the open balls as a basis. This will give one possible topology on $X$, the metric topology given by $d$ which you are probably familiar with.
However there are other topologies on $X$. For example, the discrete topology on $X$ consist of all subsets of $X$. This is the largest possible topology on any set $X$. Another example in the indiscrete topology consisting of just $X$ and $\emptyset$, which is the smallest topology. 
A: Here is the abstract construction of the topology induced by a metric  $d$ on some space $X$. There is a base of open sets called open balls of radius $r$ centered at some point $x$ which is defined as the set $\{y \in X : d(x, y) < r\}.$ We allow $r$ to vary over the entire positive reals and $x$ to vary over all of $X$ to get a collection of open sets $B(r, x)$ for each such $r$ and $x$. 
Then to construct the full topology, we throw in all unions of such sets (finite intersections automatically get added this way.)
In the example of the real numbers this implies that the open sets are exactly the unions (possibly infinite) of the open intervals $(a, b)$. 
Where I think you've got confused is in the notion of "a" topology on the real numbers versus the topology induced by the metric. The collection $\tau$ that you defined, after throwing in the entire real line is certainly "a" topology on the reals but it is not the topology that comes from the metric space structure.
