In mathematics, especially in category theory, the codensity monad is a fundamental construction associating a monad to a wide class of functors.