I am reading Introductory Real Analysis by Kolmogorov & Fomin. In chapter 3 "Topological Spaces", at the beginning a definition of a topology and topological space is given, and some examples. I do not understand one of those examples, which is the following:
Example 4: Let $T$ be the set $\{a, b\}$, consisting of just two points $a$ and $b$, and let the open sets in $T$ be $T$ itself, the empty set and the single-element set $\{b\}$. Then the two properties in Definition 1 (Definition of a Topology) are satisfied, and $T$ is a topological space. The closed sets in this space are $T$ itself, the empty set and the set $\{a\}$. Note that the closure of $\{b\}$ is the whole space $T$.
What I do not understand, in particular, is how come they can "choose" that $\{b\}$ is open and $\{a\}$ is closed? Why would that be the case? If you're defining an arbitrary set can you decide what is open and what is closed?
The set $\{b\}$ is open because the topology that we are working with here is $\tau=\bigl\{\emptyset,\{b\},\{a,b\}\bigr\}$ and because, by definition, a subset $A$ of $\{a,b\}$ is open if (and only if) $A\in\tau$. And once you know that $\{b\}$ is open, its complement, i.e. $\{a\}$ is by definition closed. There is no “choice” involved at all.