Understanding electron correlation energy through density functional theory