Example of non-separable subspace of a separable Hausdorff space The following question was asked in my topology assignment and I was unable to solve it, so I am looking for help here.

Example of non separable subspace of a separable hausdorff space.

I couldn't construct such example and I looked for an answer by searching mathstackexchange and found this answer :Density character of a subspace of a topological space.
But this is beyond my understanding as I  have just started 1st course in topology (2 weeks back) and I am unable to understand that terminology.
So, kindly give a answer which is for a person that has just started learning topology. I am following Lecture notes and Assignment sheets of the course and not any textbook.
Thank you!
 A: Consider the set $\mathbb R$ with the following topology $\tau$: a set $A\subseteq\mathbb R$ is open if and only if, for each irrational number $a\in A$, there is a positive number $\varepsilon\gt0$ such that $\mathbb Q\cap(a-\varepsilon,a+\varepsilon)\subseteq A$.
You can easily verify that $\tau$ is a topology. It is Hausdorff because every set which is open in the usual topology of $\mathbb R$ is also open in the topology $\tau$. It is separable because $\mathbb Q$ is a countable dense set: there is no nonempty open set containing only irrational numbers. Finally, the subspace $\mathbb P$ consisting of the irrational numbers is not separable because it's an uncountable set with the discrete topology: for each irrational number $a$, the set $\mathbb Q\cup\{a\}$ is open in $(\mathbb R,\tau)$, so $\{a\}$ is open in $\mathbb P$ with the subspace topology.
P.S. I thank Henno Brandsma for informing me that this example is called the Michael line.
A: bof has given you the useful example of the Michael line; here are two more examples that are also useful examples of a variety of things.
The Sorgenfrey plane $\Bbb S^2$ is the product of two copies of the Sorgenfrey line $\Bbb S$, which is $\Bbb R$ with the topology generated by the base $\big\{[a,b):a,b\in\Bbb R\text{ and }a<b\big\}$. (The Sorgenfrey line is also known as the reals with the lower-limit topology.) The topology on $\Bbb S^2$ is finer than the usual topology on $\Bbb R^2$, so it is Hausdorff. $\Bbb Q\times\Bbb Q$ is a countable dense subset of $\Bbb S^2$, which is therefore separable. But $\{\langle x,-x\rangle:x\in\Bbb R\}$ is an uncountable discrete subspace of $\Bbb S^2$, so it is not separable.
The Niemytzki plane is another useful example. Let $X=\{\langle x,y\rangle\in\Bbb R^2:y\ge 0\}$, the closed upper half-plane. Let $p=\langle x,y\rangle\in X$.

*

*If $y>0$, $\{B(p,r):r\le y\}$ is a local base at $p$, where $B(p,r)$ is the usual open ball of radius $r$ centred at $p$. (In other words, we take as basic open nbhds of $p$ the usual open balls that lie entirely above the $x$-axis.)

*If $y=0$, the basic open nbhds of $p$ are the sets of the form $\{p\}\cup B(\langle x,r\rangle,r)$ for $r>0$, consisting of $p$ and an open disk tangent to the $x$-axis at $p$. (This is why the space is also known as the tangent disk space.)

It’s straightforward to check that $X$ is Hausdorff, and clearly $X\cap(\Bbb Q\times\Bbb Q)$ is a countable dense subset of $X$, so $X$ is separable. However, the $x$-axis is a discrete subspace of $X$ that is uncountable and therefore not separable.
Two other important examples are noted in this answer: $\beta\Bbb N$, the Čech-Stone compactification of the natural numbers, and the Mrówka space $\Psi$.
