Set operations performed on functions There's something I don't find intuitive about using set operations like 'union' and 'intersection' on functions. 
A function $f: X \rightarrow  Y$ just pairs every element in the domain with a unique element in the range. Easy enough.
But what is the union of two functions $f \cup g$, and how would I know when it's a function? I need to understand this to work on a bigger proof that I'm doing. 
 A: 
There's something I don't find intuitive about using set operations like 'union' and 'intersection' on functions.

The short answer to this is that there isn't really an intuitive way to understand union applied to functions. To use set theoretic operations on functions absolutely requires a detour through the definition of a function as a set of ordered pairs and won't fit into our usual intuition that we may have about functions.
This is where learning set theory puts a spin on everything. Set theory serves as a common language for everything in mathematics to be discussed. This is nice. But this requires us to discuss things in terms that aren't necessarily immediate to intuition, and it allows (for better or worse) us to perform set theoretic operations on objects that we would intuitively not think of as sets.
Now, on to the meat of your question.

But what is the union of two functions f∪g, and how would I know when it's a function?

Until set theory becomes an intuitive language for you, you absolutely have to proceed by pedantic attention to definition. (Always always always keeping the book with the definitions nearby and even rewriting them onto your scratch page.) And so presented with $f \cup g$ we must parse out things step by step. This mental procedure may go something as follows:


*

*There is a union operation. Thus irregardless of the intuitive pictures I have of the objects at hand I must think of them as sets. 

*I am dealing with functions. What are functions in their set theoretic definition? At this point I would write down the set theoretic definition of function on my scratch paper that I'm using so that I have it readily available. 

*Now knowing what functions look like as sets, I forget entirely that I know these things are functions and focus only on their existence as sets. Then I look up and write down the definition of union and follow it by rote. 


Now there is something important here to note. In performing unions on infinite sets we can not finitely demonstrate the resultant set. We can only know that the general rule which gives me things in the union, that is, if I choose some $x$ in a union like $A \cup B$ then I have, by the definition of union, $x \in A$ or $x \in B$. This forces any proof using this fact to proceed in a proof by cases fashion.
In our present case that means that $(x, y) \in f \cup g$ says that either $(x, y) \in f$ or $(x, y) \in g$. Thus if we are in the case that we are choosing two different ordered pairs we have four possibilities, each of which must be accounted for. That is, $(x, y), (x, z) \in f \cup g$ says that either $(x, y), (x, z) \in f$, $(x, y), (x, z) \in g$, $(x, y) \in f$ and $(x, z) \in g$, and vice versa. (Often in these sorts of proofs the cases are similar enough that you only need to prove different cases by simply changing a letter like $g$ for $f$. This would be the case here if we have no distinguishing characteristics between the functions.)
Continuing with the mental procedure above, now that I "know" what the union looks like as a set, I then ask myself the separate question of "Does this set pass the definition for being a function" (knowing here means knowing what happens when I choose something in the union; I know what happens even though I can't write everything down). In order to do such a thing, we go back to our definition for function and proceed step by step through it to see if I can deduce the properties I need. (Of course if this proof is to succeed, it will rely on particular properties that $f$ and $g$ have due to their being functions. One can be sure in learning proofs from textbooks that all assumptions in the antecedent will always be used in the proof of the consequent.)
All of this can be tedious when one is starting out, but soon your mind will make these mental translations on the fly. But just as in learning addition, one must take the time to count up on his/her fingers before it becomes an intuitive process.
A: Recall that a function is just a set of ordered pairs with a particular property.
So the union and intersection of functions are also sets of ordered pairs. Whether or not these are functions require us to verify the functional property. 
So we ask ourselves:


*

*Suppose that $(x,y)$ and $(x,z)$ are both in $f\cap g$. Can we necessarily conclude that $y=z$? If not, when can we conclude that?

*Suppose that $(x,y)$ are $(x,z)$ are both in $f\cup g$. Can we necessarily conclude that $y=z$? If not, when can we conclude that?
To answer that, you will have to use the fact that both $f$ and $g$ are functions themselves, and the definition of intersection and union of sets.
A: A mapping $f:X\rightarrow Y$ of a set $X$ to a set $Y$ can itself be seen as a set - namely 
$$f=\{(x,y)| f(x)=y\}\subset X\times Y$$
So for two mappings $f$ and $g$ from $X$ to $Y$ one has:
$$f\cup g=\{(x,y)| f(x)=y \text{ or } g(x)=y \}\subset X\times Y$$
$$f\cap g=\{(x,y)| f(x)=y \text{ and } g(x)=y \}\subset X\times Y$$
Clearly (unless $f=g$) $f\cup g$ and $f\cap g$ are not mappings from $X$ to $Y$ anymore ($f\cup g$ may include $(x,y)$ and $(x',y')$ with $x=x'$ and $y\neq y'$ and for $f\cap g$ one may have some $x\in X$ where there is no $y\in Y$ with $(x,y)\in f\cap g$).
However $f\cap g$ is still a mapping on
$$\ker(f-g):= \{x\in X|f(x)=g(x)\}$$
