# Density operator in canonical quantization

I often see that the density operator in $$1^{st}$$ quantization is defined to be: $$\hat n(\vec r)=\sum_{i=1}^N \delta(r-\hat r_i)$$

In canonical quantization it is given by $$\hat n(\vec r)=\hat \psi^\dagger(\vec r)\hat\psi(\vec r)$$ but shouldn't there be a factor of $$N$$ multiplying since in the definition of the expectation value of $$\hat n$$, we act with $$\delta(r-\hat r_i)$$ on the ket $$N$$ times?

It may be tricky to explain why it is so (because it essentially means explaining the second quantization), but note that this is the case for all the single-particle operators! For example, the kinetic energy of a collection of identical particles in the first quantization is $$\hat{K} = \sum_i\frac{\hat{p}_i^2}{2m},$$ and becomes in the second quantization $$\mathcal{\hat{K}} = \int dx \psi^\dagger(x)\frac{\hat{p}^2}{2m}\psi(x).$$
It depends on the definition of state operators $$\hat\psi$$ as the number $$N$$ may be implicit. Since in second quantization the expectation values are taken with respect to the vacuum state $$|0 \rangle$$ or more formally the Green's function. The state operator $$\hat{\psi}$$, therefore, plausible to expand in terms of $$N$$ correlation functions, i.e., $$\phi(x_1)\phi(x_2)...\phi(x_n)$$, with this at least we acted by $$N$$ field operators.