Solution (source code)

= Solution

In the <Hall effect>, the <Lorentz force> deflects drifting <charge carriers> until a transverse <electric field> balances it: $\mathbf E_H=-\mathbf v_d\times\mathbf B$. Choose current along $x$, field along $z$ and define $R_H=E_y/(j_xB_z)$. Since $j_x=nqv_x$,
$$
\boxed{R_H=\frac1{nq},\qquad n=\frac1{e|R_H|}\quad\text{for electron carriers}}.
$$
The sign is negative for <electrons> with this convention. If the sample's <mass density> is $\rho_m$ and its <molar mass> is $M$, the atomic <number density> is $n_{\rm at}=\rho_mN_A/M$, so
$$
\boxed{z_{\rm free}=\frac n{n_{\rm at}}=\frac{M}{e|R_H|\rho_mN_A}}.
$$
Measure the transverse voltage, specimen thickness, current and <magnetic field>; reversing field and current helps remove longitudinal-voltage pickup and offsets. This <free-electron count from a Hall coefficient> assumes one approximately free carrier band. Multiple bands, unequal mobilities or a complicated <Fermi surface> can make a <Hall coefficient> differ from $-1/(ne)$.