TITLE: Proving that the union of the limit points of sets is equal to the limit points of the union of the sets
QUESTION [9 upvotes]: My instructor gave us an exercise to do, to show that this equality holds:
$$\bigcup_{k=1}^m A_k'=\left(\bigcup_{k=1}^m A_k\right)^{\!\prime}.$$
My thoughts on approaching this question is by contradiction, suppose that there is an element that satisfies the left side of the equality and not the right side. Then there is a deleted ball with radius $r$ such that $B(x,r)$ intersect the left side of the equality is non empty while there is a deleted ball with radius $r$ such that $B(x,r)$ intersect the right side of the equality is empty. Is this the right approach in proving this? This is as far as I can go.
Thanks for the help in advance.

REPLY [6 votes]: It’s very easy to show that $A_\ell'\subseteq\left(\bigcup_{k=1}^mA_k\right)'$ for each $\ell\in\{1,\ldots,m\}$ and hence that
$$\bigcup_{k=1}^mA_k'\subseteq\left(\bigcup_{k=1}^mA_k\right)'\;;$$
the harder part is showing that
$$\left(\bigcup_{k=1}^mA_k\right)'\subseteq\bigcup_{k=1}^mA_k'\;.\tag{1}$$
Proof by contradiction is a reasonable guess, but it’s not needed. 
Suppose that $x\in\left(\bigcup_{k=1}^mA_k\right)'$; then for each $n\in\Bbb Z^+$ there is an $$x_n\in B\left(x,\frac1n\right)\cap\bigcup_{k=1}^mA_k\;,$$ and it’s clear that the sequence $\langle x_n:n\in\Bbb Z^+\rangle$ converges to $x$. For each $n\in\Bbb Z^+$ there is a $k_n\in\{1,\ldots,m\}$ such that $x_n\in A_{k_n}$.

Show that there is an $\ell\in\{1,\ldots,m\}$ such that $\{n\in\Bbb Z^+:k_n=\ell\}$ is infinite. Let $L=\{n\in\Bbb Z^+:k_n=\ell\}$.  
Show that $\langle n:n\in L\rangle$ is a sequence in $A_\ell$ converging to $x$.  
Conclude that $(1)$ must hold.