Electron densities in momentum and position spaces. I. Mapping relation and density functional aspect