A query in the definition of multivariable function's limit At my multivariable calculus class we gave this definition for the limit of a function:

Definition:
Let $ \mathbb{R}^n \supset A $ be a open set , let $f:A \to\mathbb{R}^m $ be a function, let ${\bf x_0}$ be a point of $A$ and ${\bf P}$ a point of $\mathbb{R}^m$.
To say that $f$ has limit $\bf{P}$ at $ {\bf x_0} \in A$,
    is difined to mean
$\forall \, \varepsilon>0$, $\exists \,  \delta(\varepsilon)=\delta >0 : ( \forall \, {\bf x} \in A: \left\lVert {\bf x} - {\bf x_0} \right\rVert_{\mathbb{R}^n}< \delta \Rightarrow \left\lVert f({\bf x}) - {\bf P} \right\rVert_{\mathbb{R}^m}< \varepsilon  )$

So I have a question. Why the set $A$ has to be open? It seems that the problem is the way that the $ {\bf x}$ will approach the ${\bf x_0}$.
What happens when the domain of $f$ is a closed set or neither open nor closed?
Is there another more 'general' definition?
 A: The openness assumption is unnecessary here; the map $f$ even need not be defined at the point $x_{0}$ at which $f$ has a limit! Hence the definition you wrote is not general enough: we should write $0 < |x-x_{0}| < \delta$ instead of $|x-x_{0}| < \delta$; the latter implicitly allows $x=x_{0}$, which need not be the case.
In fact, to justify what one says, it suffices to assume $x_{0}$ is a limit point or an adherent point of $A$; for doing so just makes sure that the set of all $x \in A$ such that $0 < |x-x_{0}| < \delta$ is nonempty. But this may also be considered redundant.
A: To make sense of the limit, $x_0$ should be at least a limitpoint of $A$. Otherwise, if $x_0$ cannot be approximated by points of $A$, there would exist an neighbourhood of $x_0$ which contains no points of $A$. In that case the definition of a limit in $x_0$ makes no sense. 
The definition is then as follows: Assume $x_0$ is a limitpoint of $A$. We then say that $f(x) \to f(x_0)$ as $x\to x_0$ if for all $\epsilon > 0$ there exists a $\delta > 0$ such that 
$$
 x \in A, \ \lVert x-x_0 \rVert < \delta \quad \Rightarrow \quad \lVert f(x)-f(x_0) \rVert < \epsilon.
$$
In particular, this condition is not vacuous since there always exsist points in $A$, which are $\delta$-close to $x_0$.
