Variational Methods based on the Density Matrix