TITLE: Confused about the definition of a function. "Each a in A belongs to a unique ordered pair, (a,b) in f". What about asymptotes?
QUESTION [6 upvotes]: Studying Set theory, specifically functions. My textbook says as follows: 

A function $f:A\rightarrow B$ is a relation from $A$ to $B$ (i.e, a subset of $A\times B$) such that each $a$ in $A$ belongs to a unique ordered pair, $(a,b)$ in $f$.

This seems to add an additional 'rule' to the definition of a function from what I am familiar with in calculus. The requirement that every $a$ must map to some b is confusing to me. What about functions with vertical asymptotes? Don't those functions map from $\mathbb R\rightarrow\mathbb R$, but there is some a value where the function is not defined? Or the same could be said about functions with "holes".
Any help would be appreciated. Thanks!

REPLY [12 votes]: In situations like vertical asymptotes and holes, the domain is adjusted to avoid those points.
For instance, the function $f(x) = \frac{1}{x}$ does not have domain $\mathbb{R}$.  It has domain $\{x \in \mathbb{R}: x \neq 0\}$.