Although it is a mature way to discuss thermo-ionization in stellar atmosphere by means of thermodynamics and statistical physics, e.g., the mass action law, the same consideration to photo-ionization is difficult since many conclusions for ideal gases cannot be applied to the photon.By introducing the solar photon as a reactant into the ionosphere photochemical reaction the reaction degree and chemical equilibrium constant in the low ionosphere, and hence the electron density are obtained by means of the chemical thermodynamics method. Meanwhile, the chemical equilibrium constant can be deduced by means of statistical physics method. The results show that the electron density in the lower ionosphere derived by thermodynamics methods is nearly identical with that from the Chapman theory, proves the feasibility to study the ionosphere formation by the thermodynamics methods. However, the two equilibrium constants derived by thermodynamic and statistical physics methods independently are different. Further analysis indicates that not all photon energy is converted to ionization energy in the photochemical process, part of the energy is converted into heat or keeping the particles in the excited states. This difference hints a possibility to derive the ionospheric plasma temperature.