Contradictory definitions of Open And Closed set

general-topologymetric-spaces

According to Erwin Kreyszig, The Open and closed set are defined as

A subset $M$ of a metric space $X$ is said to be open if it contains a ball about each of its points. A subset $K$ of $X$ is said to be closed if its complement (in $X$) is open, that is, $K^C=X-K$ is open.

According to Ravi P. Agrawal in his An Introduction to Complex Analysis

A set $S$ is said to be closed if it contains all of its boundary points; i.e., $\partial S \subseteq S. $. It follows that $S$ is open if and only if its complement $\mathbf{C}-S$ is closed. The sets $\mathbf{C}$ and $\emptyset$ are both open and closed.


I found a contradictory example. Suppose $X=(1,5)$ ($X$ is usual metric space) and $K=(1,2]\cup [4,5)$.

From the second definition, it's clear that $K$ is not a closed set.

From the first,

$$K^C=X-K=(2,4)$$
which is open, so $K$ must be closed follows from the first definition.

But the two definitions seem to be contradicting each other. Please, Point out flaws in my thinking.


As an additional doubt. In the second definition, Will the statement

$S$ is open if and only if its complement $\mathbf{C}-S$ is closed.

is follow independent of

The sets $\mathbf{C}$ and $\emptyset$ are both open and closed.

?

Best Answer

$K$ does contain all its boundary points because $\partial K = \{2, 4\}$.

You seem to erroneously believe that $1$ and $5$ are boundary points. But the boundary of $K$ must be a subset of $X$. Since neither $1$ nor $5$ is in $X$, $K$ is a closed subset of $X$.

To be more precise, the boundary of $K$ is defined as $\{x \in X | x$ is a limit point of $K$ and $x$ is a limit point of $X \setminus K\}$. The very definition of the boundary of $K$ precludes us from saying that $1 \in \partial K$.