I think singleton sets $\{x\}$ where $x$ is a member of $\mathbb{R}$ are both open and closed.

Singleton sets are open because $\{x\}$ is a subset of itself. There are no points in the neighborhood of $x$.

I want to know singleton sets are closed or not.

As has been noted, the notion of "open" and "closed" is not absolute, but depends on a topology. So in order to answer your question one must first ask what topology you are considering.

A topological space is a pair, $(X,\tau)$, where $X$ is a nonempty set, and $\tau$ is a collection of subsets of $X$ such that:


$\emptyset$ and $X$ are both elements of $\tau$;
If $A$ and $B$ are elements of $\tau$, then $A\cap B$ is an element of $\tau$;
If $\{A_i\}_{i\in I}$ is an arbitrary family of elements of $\tau$, then $\bigcup_{i\in I}A_i$ is an element of $\tau$.


The elements of $\tau$ are said to be "open" (in $X$, in the topology $\tau$), and a set $C\subseteq X$ is said to be "closed" if and only if $X-C\in\tau$ (that is, if the complement is open).

In $\mathbb{R}$, we can let $\tau$ be the collection of all subsets that are unions of open intervals; equivalently, a set $\mathcal{O}\subseteq\mathbb{R}$ is open if and only if for every $x\in\mathcal{O}$ there exists $\epsilon\gt 0$ such that $(x-\epsilon,x+\epsilon)\subseteq\mathcal{O}$. You may want to convince yourself that the collection of all such sets satisfies the three conditions above, and hence makes $\mathbb{R}$ a topological space. This topology is what is called the "usual" (or "metric") topology on $\mathbb{R}$.

If you are working inside of $\mathbb{R}$ with this topology, then singletons $\{x\}$ are certainly closed, because their complements are open: given any $a\in \mathbb{R}-\{x\}$, let $\epsilon=|a-x|$. Then $x\notin (a-\epsilon,a+\epsilon)$, so $(a-\epsilon,a+\epsilon)\subseteq \mathbb{R}-\{x\}$; hence $\mathbb{R}-\{x\}$ is open, so $\{x\}$ is closed.

The reason you give for $\{x\}$ to be open does not really make sense. Every set is a subset of itself, so if that argument were valid, every set would always be "open"; but we know this is not the case in every topological space (certainly not in $\mathbb{R}$ with the "usual topology"). So that argument certainly does not work.

So: is $\{x\}$ open in $\mathbb{R}$ in the usual topology? Well, $x\in\{x\}$. Does there exist an $\epsilon\gt 0$ such that $(x-\epsilon,x+\epsilon)\subseteq \{x\}$? If so, then congratulations, you have shown the set is open. If there is no such $\epsilon$, and you prove that, then congratulations, you have shown that $\{x\}$ is not open.
