Let $R$ be a ring and $M$ be an $R$-module. The **flat dimension** of $M$ is the infimum over all lengths of flat resolutions of $M$. Usually, the flat dimension of $M$ is denoted by $\mathrm{fd}_R(M)$. For example, $\mathrm{fd}_{\mathbb{Z}}(\mathbb{Q}) = 0$. Since $\mathbb{Q}$ has projective dimension $1$, the flat dimension and projective dimension of a module can be different. Sometimes they can be the same: $\mathbb{Z}/n$ for $n$ a positive integer has the same flat and projective dimension as $\mathbb{Z}$-modules.

The **weak dimension** of a ring $R$ is defined to be $\mathrm{w.dim}(R) = \sup_{M} \{ \mathrm{fd}_R(M) \}$ where $M$ runs over all left $R$-modules. Due to the symmetric nature of the tensor product, we can also take the supremum over all right $R$-modules, in contrast to the asymmetric nature of global dimension.

More »