Can a function have multiple domains? Suppose $f:A\to Z$. In addition to this mapping, can I simultaneously define $f$ separately such that $f:B\to W$ where $A\cap B=\emptyset$ ? This polymorphism of function domains makes sense to me, but would this be accepted mathematically? So when I come to use $f$ later on, the function used depends entirely on the domain to which the argument belongs.
 A: You can define a function however you want, as long as for every input in the domain there is exactly one output.  Depending on your audience and the situation, it might be confusing to re-use the function name $f$ in this way.  Say $g: A \rightarrow Z$ and $h: B \rightarrow W$.  Then you can define $f: A \cup B \rightarrow Z \cup W$ by 
 $$f(x) =
  \begin{cases} 
      \hfill g(x)    \hfill & \text{ if $x \in A$} \\
      \hfill h(x)    \hfill & \text{ if $x \in B$.} \\
  \end{cases}
$$
Alternately, a function $f:X \rightarrow Y$ is defined to be a set of ordered pairs $f \subseteq X \times Y$ with the property that for each $x \in X$ there is a unique $y \in Y$ so $(x,y) \in f$.  So viewed as sets, if there are functions $g: A \rightarrow Z$ and $h: B \rightarrow W$ then $g \cup h$ is a perfectly well-defined function from $A \cup B$ to $Z \cup W$ as long as $A \cap B = \emptyset$, or else $g(x) = h(x)$ for all $x \in A \cap B$.
I would not say, however, that the $f$ has 'multiple domains'. It just has one domain, which happens to be the union $A \cup B$.
A: I think the construct you want is that of disjoint union, which connects a group of sets in a non-overlapping way. 
If you have a function $f_1: A \to Z$ and a function $f_2: B \to W$, then they naturally induce a function $f: A \coprod B \to Z \coprod W$, where the $\coprod$ symbol denotes disjoint union of sets. Thus you have "glued" $f_1$ and $f_2$ to form a new function in the way you wanted.  
This seems to capture your idea of allowing a function to have "multiple domains" (and codomains), though it technically is not the case: by definition a function can have only one domain and one codomain. 
