I am reading Rudin's Principles of Analysis (self study so bear with me) and this interval is shown (2.21) as an example of an open subset of $\mathbb{R}^1$ but not open if considered as a subset of $\mathbb{R}^2$. Rudin does not elaborate further. How should I view this in $\mathbb{R}^2$ since the second coordinate is not defined? Is this actually a subset of $\mathbb{R}^2$, maybe like a singleton in the second coordinate? and if so, is it open or closed? The concept is needed later in 2.29, 2.30 "$X$ open relative to $Y$" requiring the intersection with an open set in the space which Rudin describes as a relation between these concepts (so that is the motivation here).
It would make sense to me if the interval was undefined in $\mathbb{R}^2$ and therefore no intersection exists in $\mathbb{R}^2$, but that seems to contradict the statement "if we regard it as subset of $\mathbb{R}^2$" in sec. 2.21
Note: I found a previous very similar question $(a,b)$ as subset $\mathbb{R}^2$ with no answer.
The canonical view is to see $\mathbb R$ as the $x$-axis. This makes sense formally since the map $\phi:\mathbb R\to\mathbb R^2$ given by $\phi(x)=(x,0)$ is a homeomorphism if we restrict the codomain to $\mathbb R\times\{0\}$ and use the subspace topology (intersections of open sets with our set) in the codomain.
In particular, the set $\{(x,0):\ a<x<b\}$ is not open as a subset of $\mathbb R^2$, since every ball around a point contains points not in the set. It is not closed, either, as $(a,0)$ and $(b,0)$ are limit points that do not belong to the set.