boundary of a subset of a subspace of a given topological space

Suppose $T$ a topological space and $S\subseteq T$ a subspace equipped with the subspace topology inherited from $T$. Take a subset $H\subseteq S$. I'd like to prove that $\partial_S H=S\cap \partial_T H$ (where $\partial_X A$ denotes the boundary of $A$ in $X$) but I suspect that this is true only if $S$ is open in $T$. First I've shown $\partial_S H\subseteq S\cap \partial_T H$ as follows: $x\in \partial_S H$ if and only if for every (open) neighbourhood $U\subseteq S$ of $x$ both $U\cap H\neq\emptyset$ and $U\cap H^c\neq\emptyset$ hold. Now, if $V$ is open in $T$ then $U=V\cap S$ is open in $S$ and $U\cap H, U\cap H^c\neq\emptyset$, so in particular $V\cap H, V\cap H^c\neq\emptyset$.

For the other inclusion, take $x\in S\cap\partial_T H$. Then, if $U=V\cap S$ is open in $S$ (where $V$ is open in $T$), we'd like to say that $U\cap H\neq\emptyset$ (similarly for $H^c$), but we should use that U is open also in $T$, which is true if $S$ is open in $T$.

Now, if this proof is correct, I am through for $S$ open in $T$. What can we say otherwise? Are the corresponding statements for the interior and the closure of $H$ still true? (I guess so, with an almost identical proof!)

Thanks, bye!

-

Consider the case where $S$ has nonempty boundary in $T$ that intersects $S$, and let $H=S$. Then trivially $\partial_S H = \partial_S S = \emptyset$, but $\partial_T S\cap S \neq\emptyset$.

For example, take $S=[0,1]$ in $T=\mathbb{R}$ and $H=[0,1]$. Then $\partial_T H = \partial_T([0,1]) = \{0,1\}$.

However, $\partial_S H = \emptyset$, because no $S$-neighborhood of $H$ intersects the complement of $H$ in $S$.

If you want an example with $H\neq S$, then just take $H=(0,1]$ and $S$, $T$ as before. Then $\partial_T(H)\cap S = \{0,1\}$, but $\partial_S(H) = \{0\}$.

On the other hand, it is always true that $\partial_S H\subseteq \partial_T H\cap S$:

Let $x\in \partial_S H$, and let $U$ be an open set of $T$ that contains $x$. Then $U\cap S$ is open in $S$ and contains $x$, hence $$\varnothing \neq H\cap (U\cap S) = (H\cap S)\cap U = H\cap U.$$ So $H\cap U\neq\varnothing$. And $$\varnothing \neq (S-H)\cap (U\cap S) \subseteq (T-H)\cap U,$$ hence $U\cap (T-H)\neq \varnothing$. Hence $x\in \partial_T H$, as claimed.

You should be really careful with the complement: note that you have two different notions of "$H^c$" at play in the situation above: there's the complement of $H$ in $S$, and the complement of $H$ in $T$. It's probably better to use $S-H$ and $T-H$ in your arguments, to avoid possible confusion (though, of course, $S-H\subseteq T-H$).

-
By definition the set $S$ viewed in its subspace has no boundary points. Viewed in the setting of its parent space $T$, it can have boundaries : see this diagram.