The Fermi–Dirac distribution gives the probability that a quantum state of a given energy is occupied by a fermion at any temperature above absolute zero, accounting for the Pauli exclusion principle.
It is essential for describing the behaviour of electrons in solids and underpins our understanding of electrical and thermal conductivity in metals and semiconductors. Because many modern technologies, such as transistors, lasers and integrated circuits, depend on the behaviour of electrons in materials, the Fermi–Dirac distribution is a foundational tool in both solid-state chemistry and electronic engineering.
To derive the Fermi-Dirac distribution, consider a system of fixed-volume containing electrons occupying discrete single-particle energy levels \(E_i\), each with degeneracy \(g_i\). If \(n_i\) electrons occupy the \(g_i\) available states of energy, where \(0\leq n_i\leq g_i\), then the total number of electrons \(N\) and the total energy \(E\) of the system are
$$N=\sum_in_i\;\;\;\;\;\;\;\;1$$
$$E=\sum_in_iE_i\;\;\;\;\;\;\;\;2$$
where \(i=0,1,2,\cdots\)
Replicas of this system form a microcanonical ensemble, meaning that only configurations \(\{n_0,n_1,n_2,\cdots\}\) with the same fixed \(N\) and \(E\) are allowed.

Because electrons are indistinguishable fermions and each single-particle state can be occupied by at most one electron (Pauli exclusion principle), the number of ways \(W_i\) to place \(n_i\) electrons among the \(g_i\) states at energy \(E_i\) is
$$W_i=\frac{g_i!}{n_i!(g_i-n_i)!}\;\;\;\;\;\;\;\;3$$
For example, if two electrons \((n_i=2)\) occupy three degenerate states (\(g_i=3\)), the system can be found in any of the three microstates 110, 101, or 011 at different instants in time.

Question
Is eq3 a combination?
Answer
Yes, it is. It counts the number of ways to choose \(n_i\) occupied states out of \(g_i\) available single-particle states, where the electrons are indistinguishable (order does not matter) and the degenerate states are distinct because each state is defined by a unique set of quantum numbers.
It follows that the total number of microstates corresponding to a particular configuration is
$$W_i=\prod_iW_i\;\;\;\;\;\;\;\;4$$
Taking the natural logarithm of eq4 and substituting eq3 into it gives:
$$lnW=lnW_1+lnW_2+\cdots=\sum_ilnW_i=\sum_iln\frac{g_i!}{n_i!(g_i-n_i)!}$$
Using Stirling’s approximation. where \(lnx!=xlnx-x\), yields:
$$lnW=\sum_i[g_ilng_i-(g_i-n_i)ln(g_i-n_i)-n_ilnn_i]\;\;\;\;\;\;\;\;5$$

The possible configurations that define the microcanonical ensemble are restricted by eq1 and eq2. For example, the configurations \(\{N,0,0,\cdots\}\) and \(\{N-1,1,0,\cdots\}\) generally have different total energies and therefore cannot both belong to the same microcanonical ensemble. However, different configurations can have the same total energy and therefore can belong to the same microcanonical ensemble (see above diagram for an illustration). In such cases, all microstates corresponding to the allowed configurations satisfying the fixed \(N\) and \(E\) constraints are equally probable. The most probable equilibrium configuration is therefore the one with the largest number of ways of achieving it, i.e. the one whose \(W\) (or \(lnW\)) is maximal.
The total differential of \(lnW\) is:
$$dlnW=\sum_i\biggr(\frac{\partial lnW}{\partial n_i}\biggr)_{all\;other\;n\neq n_i}dn_i\;\;\;\;\;\;\;\;6$$
Hence, we want to solve for \(dlnW=0\). With reference to Step 2 of the derivation of the Boltzmann distribution using the Lagrange method of undetermined multipliers, eq6 becomes:
$$\sum_i\biggr[\biggr(\frac{\partial lnW}{\partial n_i}\biggr)-a-bE_i\biggr]dn_i=0\;\;\;\;\;\;\;\;7$$
where we have chosen minus signs for the 2nd and 3rd terms for convenience.
Since \(dn_i\) varies independently, eq7 holds only if each coefficient is zero:
$$\biggr(\frac{\partial lnW}{\partial n_i}\biggr)-a-bE_i=0\;\;\;\;\;\;\;\;8$$
Substituting eq5 into eq8 gives:
$$\sum_j\biggr[\frac{\partial g_jlng_j}{\partial n_i}-\frac{\partial(g_j-n_j)ln(g_j-n_j)}{\partial n_i}-\frac{\partial n_jlnn_j}{\partial n_i}\biggr]-a-bE_i=0\;\;\;\;\;\;\;\;9$$
where we have changed the summation index from \(i\) to \(j\) in eq9 to discriminate the summation variable from the differentiation variable.
Since \(g_j\) does not depend on \(n_i\),
$$\sum_j\biggr[-\frac{\partial(g_j-n_j)ln(g_j-n_j)}{\partial n_i}-\frac{\partial n_jlnn_j}{\partial n_i}\biggr]-a-bE_i=0\;\;\;\;\;\;\;\;10$$
All terms in the summation of eq10 goes to zero except when \(j=i\). So,
$$-\frac{\partial(g_i-n_i)ln(g_i-n_i)}{\partial n_i}-\frac{\partial n_ilnn_i}{\partial n_i}-a-bE_i=0$$
Carrying out the differentiation and rearranging the result yields:
$$n_i=\frac{g_i}{e^{a+bE_i}+1}\;\;\;\;\;\;\;\;11$$
As mentioned above, \(n_i\) is the number of electrons, which is equivalent to the number of occupied states at that level. To transform eq11 into a probability distribution, we write:
$$n_i=f_ig_i\;\;\;\;\;\;\;\;12$$
where \(f_i\) is the probability (a fraction between 0 and 1) that a single state at energy \(E_i\) is occupied. Thus, \(f_ig_i\) gives the expected number of electrons occupying that energy level.
Substituting eq12 into eq11 gives:
$$f_i=\frac{1}{e^{a+bE_i}+1}\;\;\;\;\;\;\;\;13$$
To evaluate the parameters \(a\) and \(b\), consider a system (with energy \(E\)) of the microcanonical ensemble that is partitioned by a rigid but permeable divider into two subsystems A and B, where A and B have energies \(E_A\) and \(E_B=E-E_A\) respectively. The total entropy \(S(E,V,N)\) of the system is
$$S=S_A+S_B$$
Because the total system is also isolated, the second law of thermodynamics demands that \(S\) be maximised at equilibrium. The total differential of \(S\) with respect to \(E_A\) is:
$$\frac{dS}{dE_A}=\biggr(\frac{\partial S_A}{\partial E_A}\biggr)_{V_A,N_A}+\biggr(\frac{\partial S_B}{\partial E_B}\biggr)_{V_B,N_B}\frac{dE_B}{dE_A}=0$$
From \(E_B=E-E_A\), we have \(\frac{dE_B}{dE_A}=-1\). Thus, the condition for maximum entropy under energy exchange between the two subsystems at equilibrium is
$$\biggr(\frac{\partial S_A}{\partial E_A}\biggr)_{V_A,N_A}=\;\biggr(\frac{\partial S_B}{\partial E_B}\biggr)_{V_B,N_B}\;\;\;\;\;\;\;\;14$$
Eq14 suggests that the two subsystems share a common physical property at thermal equilibrium. If we regard the electrons in each of the subsystems as a collection of non-interacting particles that move freely, much like molecules in a gas, they collectively form an electron gas. We can then use the fundamental thermodynamic equation \(dE_A=TdS_A-pdV_A+\mu dN_A\) to describe system A, where \(\mu\) is the chemical potential (also known as the Fermi level) of the electron gas, which has units of energy per particle instead of energy per mole. Since \(dV_A=0\) and \(dN_A=0\), we have \(\biggr(\frac{\partial S_A}{\partial E_A}\biggr)_{V_A,N_A}=\frac{1}{T}\). Similarly, \(\biggr(\frac{\partial S_B}{\partial E_B}\biggr)_{V_B,N_B}=\frac{1}{T}\). This means that the change in entropy with respect to the change in energy is the same throughout the system:
$$\biggr(\frac{\partial S}{\partial E}\biggr)_{V,N}=\frac{1}{T}\;\;\;\;\;\;\;\;15$$
Substituting the statistical entropy \(S=klnW\) into eq15 yields:
$$k\biggr(\frac{\partial lnW}{\partial E}\biggr)_{V,N}=\frac{1}{T}\;\;\;\;\;\;\;\;16$$
Substituting eq8 into eq6 gives:
$$dlnW=a\sum_idn_i+b\sum_iE_idn_i\;\;\;\;\;\;\;\;17$$
Substituting the derivatives of eq1 and eq2 into eq17 results in:
$$dlnW=adN+bdE\;\;\;\;\;\;\;\;18$$
Substituting eq18 back into eq16 yields
$$b=\frac{1}{kT}\;\;\;\;\;\;\;\;19$$
Repeating the above logic, the total differential of \(S\) with respect to \(N_A\), where \(N_A+N_B=N\), is:
$$\frac{dS}{dN_A}=\biggr(\frac{\partial S_A}{\partial N_A}\biggr)_{V_A,E_A}+\biggr(\frac{\partial S_B}{\partial N_B}\biggr)_{V_B,E_B}\frac{dN_B}{dN_A}=0$$
Substituting \(\frac{dN_B}{dN_A}=-1\) into the above equation gives \(\biggr(\frac{\partial S_A}{\partial N_A}\biggr)_{V_A,E_A}=\;\biggr(\frac{\partial S_B}{\partial N_B}\biggr)_{V_B,E_B}\), and using the fundamental thermodynamic equation results in:
$$\biggr(\frac{\partial S_A}{\partial N_A}\biggr)_{V_A,E_A}=\;\biggr(\frac{\partial S_B}{\partial N_B}\biggr)_{V_B,E_B}=-\frac{\mu}{T}=\biggr(\frac{\partial S}{\partial N}\biggr)_{V,E}\;\;\;\;\;\;\;\;20$$
Substituting \(S=klnW\) and eq18 into eq20 yields:
$$a=-\frac{\mu}{kT}\;\;\;\;\;\;\;\;21$$
Substituting eq19 and eq21 back into eq13 gives:
$$f_i=\frac{1}{e^{\frac{E_i-\mu}{kT}}+1}\;\;\;\;\;\;\;\;22$$
which is the Fermi-Dirac distribution function.
Eq22 gives the probability that an energy state \(E_i\) is occupied by a fermion at temperature \(T\). It plays a central role in solid-state chemistry. When the energy of the state equals the Fermi level (\(E_i=\mu\)), the occupancy becomes \(f_i=0.5\) at any \(T> 0\). In other words, the Fermi level \(\mu\) is the energy level at which the probability of finding an electron in a material is 50% at thermodynamic equilibrium for any temperature above 0 K.
The Fermi level, together with band theory, is particularly useful for understanding the electrical conductivity in metals. In semiconductors, it determines how the occupation of states in the conduction and valence bands changes with temperature and doping.

Question
What is the definition of Fermi energy?
Answer
The Fermi energy is the highest occupied single-particle state in a system of non-interacting electrons at 0 K. In metals, the Fermi level approaches the Fermi energy at absolute zero. Although the terms Fermi energy and Fermi level are often used interchangeably in chemistry and physics, especially when discussing properties at or near absolute zero, their strict theoretical definitions distinguish them.