# The union of two subsets of $\mathbb R^3$.

I have the following subsets of $\mathbb R^3$: $$A=\left\{(x,y,z): \ z_1\leq z\leq z_2\, , \ x<\bar{x}\, , \ y_1\leq y\leq y_2\right\}$$ $$B=\left\{(x,y,z): \ z_1\leq z\leq z_2\, , \ x>\bar{x}\, , \ y_3\leq y\leq y_2\right\}$$ where and $\bar x$, $y_1$, $y_2$, $y_3$, $z_1$, $z_2$ are fixed numbers and $y_1\leq y_3$.

What is the union of the two sets? I thought: $$A\cup B=\{z_1\leq z\leq z_2\, , \ x\neq\bar{x}\, , \ y_1\leq y\leq y_2\}\, .$$

• Not quite right. Consider some $z$ between $z_1$ and $z_2$, some $y$ between $y_1$ and $y_3$, and some $x\neq\bar x$. Then $(x,y,z)$ will never be in $B$ (because $y<y_3$), and it will be in $A$ and therefore in the union only when $x<\bar x$. But your formula for $A\cup B$ would include $(x,y,z)$ also when $x>\bar x$. – Andreas Blass Jul 16 '18 at 15:09
• @AndreasBlass. Thank you! However, how can I write the union? – Mark Jul 16 '18 at 17:17
• See the corrected answer from gimusi. – Andreas Blass Jul 16 '18 at 17:30

It might help to write the sets as

$$A = [z_1, z_2] \times (-\infty, \overline{x}) \times [y_1, y_2]$$ $$B = [z_1, z_2] \times (\overline{x}, +\infty) \times [y_3, y_2]$$

so $$A \cup B = [z_1, z_2] \times \Bigg( \Big((-\infty, \overline{x}) \times [y_1, y_2]\Big) \cup \Big((\overline{x}, +\infty) \times [y_3, y_2]\Big)\Bigg)$$

It cannot really be simplified any further.

I thought it might be helpful to have a graphical illustration of what's being joined here:

Both blocks go off infinitely far to the left and right, since there is no lower $x$ bound for the first subset, and no upper $x$ bound for the second subset.

Note the small gap between the blocks at $x = \overline{x}$; the union does not contain any points for $x = \overline{x}$.

As pointed out by Andreas Blass in the comment, your approach isn't correct, indeed it should be

$$A\cup B=\{(x,y,z):z_1\leq z\leq z_2\, , \ x<\bar{x}\quad \text{for}\quad y_1\leq y\leq y_3,\ x\neq\bar{x}\quad \text{for}\quad y_3\leq y\leq y_2,\}$$

• This isn't correct; see my comment on the question. – Andreas Blass Jul 16 '18 at 15:10
• @AndreasBlass Oh yes of course! I fix, thanks. – gimusi Jul 16 '18 at 15:25