Why doesn't the definition of the interior of a set depend on the dimension of the set I have just started with a course on convex optimization and have been introduced to the concept of the interior of a set. I have a fairly basic question. I am still trying to understand this topic, so please forgive me if this is a stupid or incorrect question.
Why is not the definition of the interior of a set not tied to the dimension of the space it is lying in?
For e.g. Consider a square in $\mathbb{R}^2$ i.e. $\mathcal{S} = \{(x,y)|x\in[-1,1],y\in[-1,1]\}$. By definition, points inside the square are interior points, because all points within an open '${disc}$' of radius $\epsilon>0$, around the point under consideration, lie inside the set. 
But in 3 dimensions, this 2D figure has $\varnothing$ interior, since all points inside an open '$ball$' around any of the points inside $\mathcal{S}$, do not belong to $\mathcal{S}$
So, shouldn't the definition of the interior of a set be tied to the dimension of the space from which we are looking at the set? Else, how does one know whether to use a disc or a ball to find the interior of a set.
Thanks in advance!
 A: The definition of the interior is:

A point $x$ is in the interior of $S$ iff it can be surrounded by an open ball lying entirely inside $S$.

The reference to dimension is hiding inside the term 
open ball. In two dimensions, this is a disk, in three dimensions a literal ball, and so on.
A: The idea of the interior is a concept from the world of topology. It is designed to work with things where you don't (yet) even have an idea of what dimension means. On the other hand, as mentioned in the comments, the definition is (intentionally) depended on what topological space you are looking at -- a square in $\mathbb{R}^2$ is distinct from a square in $\mathbb{R}^3$ because $\mathbb{R}^2$ is different from $\mathbb{R}^3$. To make sense of interior, you must consider the set of interest together with the whole space it is lying in.
A: You're correct; the context in which interiors are taken matters.
It is a mathematical meteprinciple that the way to formalize "widening of context" is by leveraging the concept of an embedding. Nobody has (so far) proposed a definition of embedding that works in all cases, but the correct definition for metric spaces is surely that of an isometry, sometimes called an isometric embedding. (Note: isometries are always injective; however, contrary to what you might expect from the prefix iso-, they needn't be invertible, nor surjective.)
The importance of context for the taking of interiors can therefore be phrased as follows. Let $X$ and $Y$ denote metric spaces, and suppose $f : X \rightarrow Y$ is an isometry (i.e. an isometric embedding, in other words a widening of context). Then given a subset $S \subseteq X$, all we can say is that $f(\mathrm{int}(S)) \supseteq \mathrm{int}(f(S)).$ In particular, the reverse inclusion needn't hold.
Here's a simple example, a slight variant on the example you give. Bind the variables $u$ and $v$ to the real number line. Take $X = \mathbb{R}^2, \,Y = \mathbb{R}^3$, and let $f : X \rightarrow Y$ denote the function specified as follows. $$f(u,v) = (u,v,0)$$
(Check that this is an isometry; i.e. a widening of context.)
Now let $S \subseteq X$ be defined as follows. $$S=\{(u,v) \in X\,|\,u∈(−1,1),v∈(−1,1)\}$$
Then:


*

*$\mathrm{int}(S) = S,$ so $f(\mathrm{int}(S)) = \{(u,v,0) \in Y\,|\,u∈(−1,1),v∈(−1,1)\},$ which is not empty.

*On the other hand, we have $f(S) = \{(u,v,0) \in Y\,|\,u∈(−1,1),v∈(−1,1)\},$ so $\mathrm{int}(f(S)) = \emptyset_Y$.
So yes, context matters. It is considerations such as these that led to the by-now dominant way of looking at mathematical structures. If we're thinking of $\mathbb{R}^2$ and $\mathbb{R}^3$ as metric spaces, then we imagine them "floating free" in the universe. We do not imagine that $\mathbb{R}^2 \subseteq \mathbb{R}^3$. Rather, there are many embeddings $f : \mathbb{R}^2 \rightarrow \mathbb{R}^3$, and each of these gives us a way of viewing $\mathbb{R}^2$ as a subspace of $\mathbb{R}^3$. But these $f$'s are not harmless; as we've just seen, widening the context actually changes things; some constructions are preserved under embeddings, but many are not.
