{{Short description|Concept in mathematics}}In mathematics, a '''generating set''' Γ of a module ''M'' over a ring ''R'' is a subset of ''M'' such that the smallest submodule of ''M'' containing Γ is ''M'' itself (the smallest submodule containing a subset is the intersection of all submodules containing the set). The set Γ is then said to generate ''M''. For example, the ring ''R'' is generated by the identity element 1 as a left ''R''-module over itself. If there is a finite generating set, then a module is said to be finitely generated.
This applies to ideals, which are the submodules of the ring itself. In particular, a principal ideal is an ideal that has a generating set consisting of a single element.
Explicitly, if Γ is a generating set of a module ''M'', then every element of ''M'' is a (finite) ''R''-linear combination of some elements of Γ; i.e., for each ''x'' in ''M'', there are ''r''<sub>1</sub>, ..., ''r''<sub>''m''</sub> in ''R'' and ''g''<sub>1</sub>, ..., ''g''<sub>''m''</sub> in Γ such that
: <math>x = r_1 g_1 + \cdots + r_m g_m.</math>
Put in another way, there is a surjection
: <math>\bigoplus_{g \in \Gamma} R \to M, \, r_g \mapsto r_g g,</math>
where we wrote ''r''<sub>''g''</sub> for an element in the ''g''-th component of the direct sum. (Coincidentally, since a generating set always exists, e.g. ''M'' itself, this shows that a module is a quotient of a free module, a useful fact.)
A generating set of a module is said to be '''minimal''' if no proper subset of the set generates the module. If ''R'' is a field, then a minimal generating set is the same thing as a basis. Unless the module is finitely generated, there may exist no minimal generating set.<ref>{{cite web|url=https://mathoverflow.net/q/33540 |title=ac.commutative algebra – Existence of a minimal generating set of a module – MathOverflow|work=mathoverflow.net}}</ref>
The cardinality of a minimal generating set need not be an invariant of the module; '''Z''' is generated as a principal ideal by 1, but it is also generated by, say, a minimal generating set {{nowrap|{2, 3}}}. What ''is'' uniquely determined by a module is the infimum of the numbers of the generators of the module.
Let ''R'' be a local ring with maximal ideal ''m'' and residue field ''k'' and ''M'' finitely generated module. Then Nakayama's lemma says that ''M'' has a minimal generating set whose cardinality is <math>\dim_k M / mM = \dim_k M \otimes_R k</math>. If ''M'' is flat, then this minimal generating set is linearly independent (so ''M'' is free). See also: Minimal resolution.
A more refined information is obtained if one considers the relations between the generators; see Free presentation of a module.
== See also == *Countably generated module *Flat module<!-- explain how to use "flat" to show a minimal generating set is linearly indep. --> *Invariant basis number
== References == {{reflist}} *Dummit, David; Foote, Richard. ''Abstract Algebra''.
Category:Abstract algebra