Operator in quantum mechanics
In quantum mechanics, for systems where the total number of particles may not be preserved, the number operator is the observable that counts the number of particles.
The following is in bra–ket notation: The number operator acts on Fock space. Let

be a Fock state, composed of single-particle states
drawn from a basis of the underlying Hilbert space of the Fock space. Given the corresponding creation and annihilation operators
and
we define the number operator by

and we have

where
is the number of particles in state
. The above equality can be proven by noting that
then ![{\displaystyle {\begin{array}{rcl}{\hat {N_{i}}}|\Psi \rangle _{\nu }&=&a^{\dagger }(\phi _{i})a(\phi _{i})\left|\phi _{1},\phi _{2},\cdots ,\phi _{i-1},\phi _{i},\phi _{i+1},\cdots ,\phi _{n}\right\rangle _{\nu }\\[1ex]&=&{\sqrt {N_{i}}}a^{\dagger }(\phi _{i})\left|\phi _{1},\phi _{2},\cdots ,\phi _{i-1},\phi _{i+1},\cdots ,\phi _{n}\right\rangle _{\nu }\\[1ex]&=&{\sqrt {N_{i}}}{\sqrt {N_{i}}}\left|\phi _{1},\phi _{2},\cdots ,\phi _{i-1},\phi _{i},\phi _{i+1},\cdots ,\phi _{n}\right\rangle _{\nu }\\[1ex]&=&N_{i}|\Psi \rangle _{\nu }\\[1ex]\end{array}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/a4b165f253ce6c2ce7f529d1aaaf7d9cccf84023)
See also
References