Cardinality of the Union of Two Sets that have Same Cardinality as Real Numbers

Homework Statement

Let U and V both have the same cardinality as R (the real numbers). Show that U$$\cup$$V also has the same cardinality as R.

The Attempt at a Solution

Because U and V both have the same cardinality as R, I that that this means
$$\exists$$ f: R$$\rightarrow$$U that is one-to-one and onto.
$$\exists$$ g: R $$\rightarrow$$ V that is one-to-one and onto.

I think I need to show that $$\exists$$ h: R $$\rightarrow$$ U $$\cup$$ V.

Related Calculus and Beyond Homework Help News on Phys.org
Dick
Homework Helper
Do you know that, for example, that (-infinity,0] and (0,infinity) both have the same cardinality as R?

Do you know that, for example, that (-infinity,0] and (0,infinity) both have the same cardinality as R?
Yes, but I can't just provide an example to prove the statement, right?

I understand the general concepts behind this proof but am having a difficult time putting it down in mathematical terms.

Dick
Homework Helper
Yes, but I can't just provide an example to prove the statement, right?

I understand the general concepts behind this proof but am having a difficult time putting it down in mathematical terms.
I didn't mean it to be an example. In the nonmessy case where U and V are disjoint, then R maps bijectively to (-infinity,0]U(0,infinity) via the obvious map 'identity' then map (-infinity,0] bijectively to U and (0,infinity) bijectively to V. Compose them and you have a bijective map from R to U union V.