  Density functional theory has made great success in solid state physics,
quantum chemistry and in computational material sciences. In this work we show
that density functional theory could shed light on phase transitions and
entanglement at finite temperatures. Specifically, we show that the equilibrium
state of an interacting quantum many-body system which is in thermal
equilibrium with a heat bath at a fixed temperature is a universal functional
of the first derivatives of the free energy with respect to temperature and
other control parameters respectively. This insight from density functional
theory enables us to express the average value of any physical observable and
any entanglement measure as a universal functional of the first derivatives of
the free energy with respect to temperature and other control parameters. Since
phase transitions are marked by the nonanalytic behavior of free energy with
respect to control parameters, the physical quantities and entanglement
measures may present nonanalytic behavior at critical point inherited from
their dependence on the first derivative of free energy. We use an
experimentally realizable model to demonstrate the idea. These results give new
insights for phase transitions and provide new profound connections between
entanglement and phase transition in interacting quantum many-body physics.
