When can I say that $\cup H_i$ is a group? Let $G$ be a group and $\{H_i\}_{i\in I}$ a family of subgroups. I would like to find a condition that will imply that $\cup_{i\in I} H_i$ is a subgroup. I know that it's not true in general, I need help to find this condition.
Any help is welcome.
Thanks a lot.
 A: This result is well know for two subgroup
$$H_1\cup H_2\,\,\text{is a subgroup}\iff H_1\subset H_2\,\,\text{or}\,\,  H_2\subset H_1$$
indeed suppose that $H_1\not\subset H_2$ and $ H_2\not\subset H_1$ then there's $h_1\in H_1\setminus H_2$ and $h_2\in H_2\setminus H_1$ and let $z=h_1+h_2$ so $z\in H_1\cup H_2$ which is a goup so if $z\in H_1$ then $h_2=z-h_1\in H_1$ is a contradiction and the same conclusion if $z\in H_2$.
Edit Note we can easily generalize this result proving this condition:  there's $i_0\in I$ such that $H_i\subset H_{i_0}$ for every $i\in I$ is sufficient to have $\cup_I H_i$ is a subgroup.
A: The condition to impose is that $H_i < H_j$ or $H_j < H_i$ for all $i,j \in I$. If this is true, then one can check that the union of all $H_i$ is a subgroup. If $x,y \in \cup H_i$, then $x \in H_i$ for some $i$ and $y \in H_j$ for some $j$. Since $H_i < H_j$ or $H_j < H_i$, it must be the case that $x,y \in H_k$ for one of $k = i$ or $k = j$. Since $H_k$ is a subgroup, it means that $xy^{-1}  \in H_k \subset \cup H_i$ proving that $\cup H_i$ is a subgroup.
A: Generally speaking is is very rare that a union of finitely many subgroups is again a subgroup. As a consequence the various sufficient conditions that one can formulate for a union of subgroups to be a subgroup generally amount to boring truisms for the case of finitely many subgroups. Examples are "there is one $H_i$ that contains all the others" (the union will be equal to $H_i$), or "every element of $G$ lies in at least one subgroup $H_i$" (the union will be all of $G$). The example of taking for $(H_i)_{i\in I}$ the collection of all cyclic subgroups of $G$ (which will work, with the union being $G$, whether or not this collection is finite) shows that it will be hard to formulate any nice necessary condition for $\bigcup_iH_i$ to be a subgroup (note that leaving out just one of those cyclic subgroups will often destroy the property that $\bigcup_iH_i$ is a subgroup).
If your collection of subgroups is infinite, then there are some interesting sufficient conditions that can be formulated. Notably "for every pair of indices $i_1,i_2\in I$ there exists $j\in I$ such that $H_{i_1}\subseteq H_j$ and $H_{i_2}\subseteq H_j$" (in other words, ordering the collection of subgroups by inclusion, every pair has an upper bound) suffices for $\bigcup_iH_i$ to be a subgroup. Indeed, if $x,y\in\bigcup_iH_i$ then there exist $i_1,i_2\in I$ with $x\in H_{i_1}$ and $y\in H_{i_2}$, and with $j$ as in the requirement one has $xy\in H_j\subseteq\bigcup_iH_i$ (that the union contains the identity and is closed under inverses needs no condition in the $H_i$ at all, except $I\neq\emptyset$ which certainly should be assumed). Note that the condition is a valid sufficient condition also for finite families of subgroups, but it is a boring one, as in that case it can easily be shown to imply that among the subgroups there is one that contains them all.
Note also that a special instance of this condition is when the set of subgroups is totally ordered by inclusion (for every pair, one of them contains the other), in which case $j$ can be chosen among $\{i_1,i_2\}$; this gives the sufficient condition ("$H_j<H_j$ or $H_j<H_i$") mentioned in other answers.
