If every subset in a topological space is closed, prove it is a discrete space

This is question from Topology without tears by S. Morris. It reads;

Let $(X, \tau)$ be a topological space with the property that every subset is closed. Prove that it is a discrete space.

I actually think it's not true though, my counter example:

$$let\quad X = \{x, y\}\quad and \quad \tau = \{\emptyset, X\}$$

Cleary $\tau$ is a topology and all it's subsets are closed, but it's not a discrete space. What am I missing?

• $\{x\}$ is not closed under your topology. Its complementary, $\{y\}$, is indeed not open. – Suzet Jun 21 '18 at 9:29
• To answer your question, because every subset is closed, every subset is also open. In particular, the singletons are open. This is the very definition of the discrete topology. – Suzet Jun 21 '18 at 9:30
• Ahh I see, sorry that seems so obvious now. – Mattice Verhoeven Jun 21 '18 at 9:31
• I feel it's answered already. What do I do with the question now, just keep it up? – Mattice Verhoeven Jun 21 '18 at 9:35
• @MatticeVerhoeven: You should accept the answer. – tomasz Jun 21 '18 at 10:17

If every subset of $X$ is closed, then every subset of $X$ is open! Hence $\tau$ is the discrete topology on $X$. In your example not every subset of $X$ is closed (e.g. $\{x\}$).