TITLE: Is "taking a limit" a function? Is it a procedure? A ternary operation?
QUESTION [47 upvotes]: I was sitting in analysis yesterday and, naturally, we took the limit of some expression. It occurred to me that "taking the limit" of some expression abides the rules of a linear transformation
$$\lim_{x \rightarrow k}\ c(f(x)+g(x)) = c \lim_{x \rightarrow k} f(x) + c\ \lim_{x \rightarrow k} g(x),$$
and (my group theory is virtually non existent) appears also to be a homomorphism:
$$\lim_{x \rightarrow k} (fg)(x) = \lim_{x \rightarrow k} f(x)g(x), $$
etc.
Anyway, my real question is, what mathematical construct is the limit?

REPLY [52 votes]: In general, let $X, Y$ be topological spaces, and $x_0$ a non-isolated point of $X$.  Then strictly speaking, "$\lim_{x\to x_0} f(x) = L$" is a relation between functions $f : X \to Y$ and points $L \in Y$ (the equality notation being misleading in general).
Now, if $Y$ is a Hausdorff topological space, it happens that this relation is what is known as a partial function: for any $f : X \to Y$, there is at most one $L \in Y$ such that $\lim_{x\to x_0} f(x) = L$.  Now, for any relation $R \subseteq (X \to Y) \times Y$ which is a partial function, we can define a corresponding function $\{ f \in (X \to Y) \mid \exists y \in Y, (f, y) \in R \} \to Y$ by sending $f$ satisfying this condition to the unique $y$ with $(f, y) \in R$.  Then that somewhat justifies the "equality" in the notation $\lim_{x\to x_0} f(x) = L$, though you still need to keep in mind that it is a partial function where $\lim_{x\to x_0} f(x)$ is not defined for all $f$.  (This part relates to the answer by José Carlos Santos.)
Building on top of this, in the special case of $Y = \mathbb{R}$, we can put a ring structure on $X \to Y$ by pointwise addition, pointwise multiplication, etc.  Then $\{ f : X \to \mathbb{R} \mid \exists L \in \mathbb{R}, \lim_{x\to x_0} f(x) = L \}$ turns out to be a subring of $X \to \mathbb{R}$, and the induced function from this subring to $\mathbb{R}$ is a ring homomorphism.  (More generally, this will work if $Y$ is a topological ring.  Similarly, if $Y$ is a topological vector space, then the set of $f$ with a limit at $x_0$ is a linear subspace of $X \to Y$ and the limit gives a linear transformation; if $Y$ is a topological group, you get a subgroup of $X \to Y$ and a group homomorphism; and so on.)