Definition of neighborhood I am starting to work through Rudin's Principles of Mathematical Analysis.  For $(X, d)$ a metric space and $x \in X$, Rudin defines the neighborhood $N_r(x)$ of $x$ to be the set consisting of all points $y$ such that $d(x,y) < r$.  My question is this: if $A \subset X$ and $a \in A$, then does $N_r(a)$ refer to the same set in both $A$ and $X$ the ambient space?  For example, if $X = \mathbb{R}$ and $A = \mathbb{Q}$, then is it the case that $N_{1/2}(a)$ is always the set $N = \{p \in \mathbb{R} : a - 1/2 < p < a + 1/2\}$, or can $N_{1/2}(a)$ be interpreted as the set $N' = \{q \in \mathbb{Q} : a - 1/2 < q < a + 1/2\}$?  Essentially I am asking if the notion of neighborhood is relative.  This would affect things like the interiority of points in a set.  For instance, $N$ is always contained in $\mathbb{R}$ so that $a$ is always an interior point of $\mathbb{R}$, but $N \not \subset \mathbb{Q}$ so that $a$ is never an interior point of $\mathbb{Q}$.  On the other hand, $N'$ is always contained in both $\mathbb{R}$ and $\mathbb{Q}$ so that $a$ is always an interior point of both of them.  (I guess $N$ is basically a neighborhood formed with respect to the whole space while $N'$ is a neighborhood formed with respect to a specific subspace of the metric.)  Thanks in advance.
 A: Most certainly a relative notion. You define the neighborhood $N_r(x)$ of $x$ in the metric space $X$. So, in particular, a neighborhood in the Euclidean space $\mathbb R$ is very different than a neighborhood in the subspace $\mathbb Q$. The former contains uncountably many elements, while the latter only countably many, and all are rational numbers. 
It should be noted that modern texts refer to $N_r(x)$ as an open ball (and usually denoted by $B_r(x)$), while a neighborhood of $x$ is a term reserved more commonly to one of two things: either an open set containing $x$, or an arbitrary set containing a set of the form $B_r(x)$.
A: I don't know specifically in Rudin's book how these notations are used, but in general one would want to keep the notion as flexible as possible, and there would be many occasions where one would want to view $A$ as a metric space in its own right, along with all of the associated notions such as that of an $r$-neighbourhood. So the notion of a relative neighbourhood definitely exists, and it is exactly as you set out in your question.
I would say that if the notation $N_r(a)$ was introduced in some part of a proof when $X$ had been mentioned, but $A$ hadn't, it would keep the $X$-meaning throughout the proof. Otherwise, if both $A$ and $X$ are being regarded as a metric spaces in their own right, and the author introduces the notation $N_r(a)$, I think it's their responsibility to clarify which possibility they have in mind, particularly if it's with regard to $A$.
