In previous readings, I have frequently seen the concept of the subgroup generated by set $X$ (otherwise denoted as $gp(X)$ ) explained as follows:
"$gp(X)$ is the subgroup that is generated from all possible finite compositions of the elements of $X$ and their inverses"
However, I came across a definition today that I have not previously seen. It reads as follows:
"let $gp(X)$ be defined as the intersection of all subgroups of $G$ containing $X$"
Upon first glance, this seems fairly obvious...if a subgroup $H$ contains the elements that comprise the set $X$, then by definition of "subgroup", $H$ clearly also contains the inverse elements of the elements belonging to set $X$. Additionally, because $H$ is a subgroup, it clearly also contains the identity element.
I see that a nice trick to "pick out these elements" is by imposing an intersection with another subgroup $J$ that also contains the set $X$. In this way, subgroup $J$ and subgroup $H$ clearly both contain all elements of set $X$, the inverses of the elements of set $X$, and the identity.
It seems like only two subgroups are necessary to pick out these elements...which inspires two questions:
Why define this as "intersection of all subgroups"?
What happens if there is only one subgroup that contains $X$?
It seems to me that the first defintion avoids these issues.