boundary
The boundary of a set is the thin skin between inside and outside: the points where the set and its complement both crowd in arbitrarily close, so you cannot say cleanly that you are in or out. It is the frontier where membership is most delicate.
Formally, the boundary of A, written boundary-of-A or partial-A, is the set of points x such that every open ball around x meets both A and its complement. Equivalently it is the closure of A minus the interior of A. By symmetry, a set and its complement share exactly the same boundary.
A set is closed precisely when it contains its whole boundary, and open precisely when it contains none of it. The boundary depends sharply on the ambient space and the set: the boundary of the rationals Q in R is all of R, because every interval contains both rationals and irrationals, so no point of the line can be cleanly separated from either.
The boundary of the interval (0, 1) in R is the two-point set {0, 1}. The same is true for [0, 1], for (0, 1], and for [0, 1): all four share the boundary {0, 1}.
The boundary ignores whether the endpoints are included.