Is continuity at a point only defined for points in the domain? I'm using Michael Spivak's Calculus, 3rd edition textbook. Without ado, I'll state the definition given for continuity at a point:


  DEFINITION$\;\;\;\;$The function $f$ is continuous at $a$ if: $$\lim_{x\to a}f(x) = f(a)$$


And I might as well give the definition for the limit at a point:


  DEFINITION$\;\;\;\;$The function $f$ approaches the limit $l$ near $a$ means: for every $\epsilon&gt;0$ there is some $\delta&gt;0$ such that, for all $x$, if $0&lt;|x-a|&lt;\delta$, then $|f(x)-l|&lt;\epsilon$.


It is clear, then, that in order to verify whether a function is continuous at a point $a$, we need to compute $f(a)$, and this is only possible if $a$ is in the domain of $f$. So, what happens when a point $a$ is not in the domain of $f$?

On this matter, I've had some people telling me that statements about continuity only make for points in the domain of $f$. Spivak himself also mentions in the Continuity chapter of his textbook that "We also often simply say that a function is continuous if it is continuous at $x$ for all $x$ in its domain."

But that means functions like $f(x) = \frac{1}{x}$, $f(x) = \frac{1}{x^2-1}$ and $f(x) = \sin{\frac{1}{x}}$ can all be said to be continuous. It just doesn't seem right, in fact I always thought these were textbook examples of discontinuous functions. It also means that we can't say that $f(x) = \frac{1}{x}$ is discontinuous at $0$, because we don't even know the value of $f(0)$ in order to decide whether it's continuous or not.

Are all of these conclusions correct, or did I misinterpret the definitions? I'd love if someone could shed some light on this, I'm having a hard time wrapping my head around it.
There are two different definitions of continuity.  One is used at the elementary calculus level, and the other in more advanced texts.  I am assuming that you are familiar with the first definition and therefore will skip the epsilon, delta quantifiers to simplify the presentation:

(1) a function $f$ is continuous at $c$ for all $x$, if $|x-c|&lt;\delta$ then $|f(x)-f(c)&lt;\epsilon$.

(2) a function $f$ with domain $D$ is continuous at a point $c\in D$ if for all $x\in D$, if $|x-c|&lt;\delta$ then $|f(x)-f(c)&lt;\epsilon$.

The second definition is more complicated because it speaks explicitly about the domain of the function, and limits $x$ to this domain.  The advantage of the second approach is that you don't need to deal with special cases such as one-sided continuity when you want to define what it means for a function to be continuous on a closed interval.

The existence of two slightly different definitions is a constant source of confusion and your question is well taken.
When a function is called continuous, it is often the case that it is continuous on all real numbers. It is reasonable to call a function continuous the set of points where it satisfies the definition of continuity is understood. 

Personally, for undergraduate calculus, I prefer to call a function $f:D\rightarrow\mathbb{R}$ (where $D$ is a subset of, or is equal to, $\mathbb{R}$) discontinuous if its graph cannot be drawn with a single penstroke. In which case $f(x)=1/x$ would be called discontinuous. However, $f(x)=1/x$ is definitely continuous on its domain ($x\neq0$). It's not continuous on $\mathbb{R}$ $-$ it's not even defined on all of $\mathbb{R}$.

The examples $f(x)=1/x$ and $g(x)=1/x^2$ are not continuous at $x=0$! They do not satisfy the definition of continuity there, so we call it discontinuous at the origin. Anyone who calls it continuous at the origin is wrong, in general.

However, we can define the extended real numbers: $\overline{\mathbb{R}}=\{-\infty\}\cup \mathbb{R}\cup \{\infty\}$ and define:
$$
g(x)=\begin{cases}
\frac{1}{x^2} \text{ if } x\neq 0, \pm\infty \\
\infty \text{ if } x = 0 \\
0 \text{ if } x=\pm\infty,
\end{cases}
$$
and $g:\overline{\mathbb{R}}\rightarrow \overline{\mathbb{R}}$ can be said to be continuous on the extended reals. Of course, you have to carefully consider how to define continuity in this context.