My understanding of the generating set (informally) was the following
Pick any number of elements, say $g_1, g_2, \dotso, g_n$, in a finite group $G$. The set of all elements produced by a finite product of any combination of these elements is called the generating set of the elements $g_1, g_2, \dotso, g_n$.
However, the course notes had the following definition of a generating set.
If $S \subseteq$ G is a subset, then define $S^{-1} = \left ( s^{-1} | s \in S \right )$ and let $\langle S \rangle$ denote the set of all elements of $G$ which can be written as finite products of elements of $S \bigcup S^{-1}.$
Am I missing something in my understanding of the generating set? Because in my understanding of it, there's absolutely nothing to do with any inverse elements whereas the course notes makes some mention of them for some reason.
The book definition works with infinite groups, too. In the finite case, if you have $g$, then $g^{-1}=g^{|G|-1}$, so you don't need to specifically add inverses to the generation process.