In many ways, commutative algebra is the study of finitely generated modules. While vector spaces make for a great first example of modules, many of the basic facts we are used to from linear algebra are often a little more subtle in commutative algebra. These differences are features, not bugs. The first big noticeable difference between vector spaces and general modules is that while every vector space has a basis, most modules do not.
Definition 8.1. Generated Module.
Let \(M\) be an \(R\)-module and \(\Gamma \subseteq M\text{.}\) The submodule of \(M\) generated by (also known as the submodule spanned by) \(\Gamma\text{,}\) denoted \(\sum_{m \in \Gamma} R m\text{,}\) is the smallest (with respect to containment) submodule of \(M\) containing \(\Gamma\text{.}\)
We say \(\Gamma\) generates \(M\text{,}\) or is a set of generators for \(M\text{,}\) if \(\sum_{m \in \Gamma} R m =~M\text{,}\) meaning that every element in \(M\) can be written as a finite linear combination of elements in \(\Gamma\text{.}\)
One of the key things that makes commutative algebra so rich and beautiful is that most modules are in fact not free. In general, every \(R\)-module has a generating set --- for example, \(M\) itself. Given some generating set \(\Gamma\) for \(M\text{,}\) we can always write a presentation
Example 8.12.
More generally, if an \(R\)-module has \(n\) generators, we can naturally think about it as a quotient of \(R^n\) by the submodule of relations among those \(n\) generators. More precisely, if \(M\) is generated by \(m_1, \ldots, m_n \in M\text{,}\) then the homomorphism of \(R\)-modules
\begin{equation*}
\begin{CD}
R^{n}@>\pi>> m\\\\
(r_{1}, \ldots, r_{n})@>d>> r_{1} m_{1} + \cdots + r_{n} m_{n}
\end{CD}
\end{equation*}
that sends each of the canonical generators \(e_i\) of \(R^n\) to \(m_i\) is surjective; more precisely, this is a presentation for \(M\text{.}\) By the [cross-reference to target(s) "thm-fit-mod" missing or not unique]
, \(M \cong R^n / \ker \pi\text{.}\)
Macaulay 2.
Defining free modules in Macaulay2 is straightforward:
i1 : R = QQ[x,y,z];
i2 : M = R^3
3
o2 = R
o2 : R-module, free
Note that from now on and until we reset Macaulay2, whenever you write R
it will be read as a ring, not a module; if instead you want to refer to the module \(R\text{,}\) you can write it as R^1
. Alternatively, you can also use the command module
and write module R
. If you do calculations that require a module and not a ring, it is important to be careful about whether you write R
or R^1
; this is an easy way to get an error message.
If we want to define a module that happens to be an ideal, but we want to think about it as a module, we can use the command module
to turn the ideal into a module:
i3 : I = ideal"xy,yz"
o3 = ideal (x*y, y*z)
o3 : Ideal of R
i4 : N = module I
o4 = image | xy yz |
1
o4 : R-module, submodule of R
If we forget that this is actually an ideal, and simply think about as a submodule of the module
\(R\text{,}\) we can also view this module as the image of a map, as we described in
Example 8.12: if a submodule of
\(R^m\) has
\(n\) generators, we can view it as the the image of the map
\(R^n \to R^m\) that sends each of the canonical generators of
\(R^n\) to the generators we chose for our module. In our example, our module is the image of the following map from
\(R^2\) to
\(R\text{:}\)
i5 : phi = map(R^1,R^2,{{x*y,y*z}})
o5 = | xy yz |
1 2
o5 : Matrix R <--- R
i6 : L = image phi
o6 = image | xy yz |
1
o6 : R-module, submodule of R
Note that above, when we first defined the module \(N\text{,}\) Macaulay2 immediately stored that information in this exact way, as the image of the same map we just defined. This is useful to keep in mind when you see the results for a computation: if a module is given to us as the image of a matrix, then we are being told that our module is a submodule of some free module. If the matrix has \(n\) rows, then that means our module is a submodule of \(R^n\text{.}\) Each column corresponds to a generator of our module (as a submodule of \(R^n\)).
Of course that the modules \(M\text{,}\) \(N\text{,}\) and \(L\) we have defined are all the same module: the ideal \((xy,yz)\text{.}\) It is our job to know that; depending on how you ask the question, Macaulay2 might not be able to identify this. Finally, we can also describe this module by saying that it has two generators, say \(f\) and \(g\text{,}\) and there is a unique relation between them:
\begin{equation*}
-zf + yg = 0.
\end{equation*}
This means that our module is the quotient of \(R^2\) by the submodule generated by the relation \((-z,y)\text{.}\) We can write this as the quotient of \(R^2\) by the image of a map landing in \(R^2\text{,}\) meaning it is the cokernel of a map.
i7 : psi = map(R^2,R^1,{{-z},{y}})
o7 = | -z |
| y |
2 1
o7 : Matrix R <--- R
i8 : K = coker psi
o8 = cokernel | -z |
| y |
2
o8 : R-module, quotient of R
When a module is given to us in this format, as the cokernel of some matrix, we are essentially being given a presentation: the number of rows is the number of generators, while each column corresponds to a relation among those generators. If one the vector \((r_1, \ldots, r_n)\) appears in a column of the matrix, that means that the generators \(m_1, \ldots, m_n\) satisfy the relation
\begin{equation*}
r_1 m_1 + \cdots + r_n m_n = 0.
\end{equation*}
Keep in mind that when you do a calculation and the result is a module given to you in this format, Macaulay2 will not necessarily respond with a
minimal presentation: one of the generators given might actually be a linear combination of the remaining ones, so there might be more generators than necessary, and there might be superfluous relations which follow as linear combinations of the others. You might be able to get rid of some superfluous generators and relations using the command
prune
. We will discuss this in more detail when we talk about local rings in
Chapter 10.