A regular sequence on a module M is an ordered sequence of elements (f_1, ..., f_r) where each f_i is a non-zero-divisor on M/(f_1, ..., f_{i-1})M. The depth of M (with respect to an ideal I) is the length of a maximal regular sequence in I on M. A Noetherian local ring is Cohen-Macaulay if its depth equals its Krull dimension -- the maximum possible value. Cohen-Macaulay rings are the class where dimension theory, homological algebra, and intersection theory work optimally, forming the "good" class between arbitrary Noetherian rings and regular local rings.
A regular sequence on an R-module M is a sequence of elements f_1, ..., f_r in R such that: (1) f_1 is a non-zero-divisor on M, (2) f_2 is a non-zero-divisor on M/f_1 M, and in general (3) f_i is a non-zero-divisor on M/(f_1, ..., f_{i-1})M, and (4) M/(f_1, ..., f_r)M is nonzero. The order matters: (x, y(1-x)) is regular in k[x, y] but (y(1-x), x) is not, because in the latter case the image of x in k[x,y]/(y(1-x)) is a zero divisor. In a local ring, however, any permutation of a regular sequence is again regular -- this is a non-trivial fact proved using the Koszul complex.
The depth of M with respect to an ideal I, denoted depth_I(M), is the length of a maximal regular sequence in I on M. By the Rees theorem, all maximal regular sequences in I on M have the same length, so depth is well-defined. In a Noetherian local ring (R, m), the depth of R (taken with respect to m) satisfies the fundamental inequality depth(R) ≤ dim(R). When equality holds, R is called Cohen-Macaulay. The depth can also be computed homologically: depth_I(M) = min{i : Ext^i_R(R/I, M) ≠ 0}, connecting regular sequences to the derived category.
Cohen-Macaulay rings form the largest natural class of Noetherian rings where the theories of dimension, primary decomposition, and intersection theory work "as expected." In a Cohen-Macaulay local ring, every system of parameters is a regular sequence, there are no embedded associated primes of parameter ideals, and the unmixedness theorem holds: every ideal generated by a regular sequence of length r has all associated primes of height exactly r. This geometric property -- that hypersurface sections cut out varieties of the expected codimension with no spurious embedded components -- is what makes Cohen-Macaulay rings essential in algebraic geometry.
The relationship between regular sequences and homological algebra runs deep. The Auslander-Buchsbaum formula states that for a finitely generated module M of finite projective dimension over a Noetherian local ring R: pd(M) + depth(M) = depth(R). This connects depth (defined via regular sequences) to projective dimension (a homological invariant). For regular local rings, every finitely generated module has finite projective dimension, and the formula gives a complete numerical relationship between the two fundamental measures of "complexity." The Koszul complex K(f_1, ..., f_r; R) provides the explicit homological machinery: its homology detects whether (f_1, ..., f_r) is a regular sequence, and it is the starting point for computing Tor and Ext groups in many situations.