The position operator
What is the average value of the position of an electron in an atom? For any particular state $\ket{\psi}$ what is the average value of the coordinate $x$? We’ll work in one dimension and let you extend the ideas to three dimensions or to systems with more than one particle: We have a state described by $\psi(x)$, and we keep measuring $x$ over and over again. What is the average? It is \begin{equation*} \int xP(x)\,dx, \end{equation*} where $P(x)\,dx$ is the probability of finding the electron in a little element $dx$ at $x$. Suppose the probability density $P(x)$ varies with $x$ as shown in Fig. 20–1.  The electron is most likely to be found near the peak of the curve. The average value of $x$ is also somewhere near the peak. It is, in fact, just the center of gravity of the area under the curve.  We have seen earlier that $P(x)$ is just $\abs{\psi(x)}^2=\psi\cconj(x)\psi(x)$, so we can write the average of $x$ as \begin{equation} \label{Eq:III:20:33} \av{x}=\int\psi\cconj(x)x\psi(x)\,dx. \end{equation}  Our equation for $\av{x}$ has the same form as Eq. (20.28). For the average energy, the energy operator $\Hcalop$ appears between the two $\psi$’s, for the average position there is just $x$. (If you wish you can consider $x$ to be the algebraic operator “multiply by $x$.”) We can carry the parallelism still further, expressing the average position in a form which corresponds to Eq. (20.18). Suppose we just write \begin{equation} \label{Eq:III:20:34} \av{x}=\braket{\psi}{\alpha} \end{equation} with \begin{equation} \label{Eq:III:20:35} \ket{\alpha}=\xop\,\ket{\psi}, \end{equation} and then see if we can find the operator $\xop$ which generates the state $\ket{\alpha}$, which will make Eq. (20.34) agree with Eq. (20.33). That is, we must find a $\ket{\alpha}$, so that \begin{equation} \label{Eq:III:20:36} \braket{\psi}{\alpha}=\av{x}= \int\braket{\psi}{x}x\braket{x}{\psi}\,dx. \end{equation} First, let’s expand $\braket{\psi}{\alpha}$ in the $x$-representation. It is \begin{equation} \label{Eq:III:20:37} \braket{\psi}{\alpha}=\int\braket{\psi}{x}\braket{x}{\alpha}\,dx. \end{equation} Now compare the integrals in the last two equations. You see that in the $x$-representation \begin{equation} \label{Eq:III:20:38} \braket{x}{\alpha}=x\braket{x}{\psi}. \end{equation} Operating on $\ket{\psi}$ with $\xop$ to get $\ket{\alpha}$ is equivalent to multiplying $\psi(x)=\braket{x}{\psi}$ by $x$ to get $\alpha(x)=\braket{x}{\alpha}$. We have a definition of $\xop$ in the coordinate representation.4 [We have not bothered to try to get the $x$-representation of the matrix of the operator $\xop$. If you are ambitious you can try to show that \begin{equation} \label{Eq:III:20:39} \bracket{x}{\xop}{x'}=x\,\delta(x-x'). \end{equation}  You can then work out the amusing result that \begin{equation} \label{Eq:III:20:40} \xop\,\ket{x}=x\,\ket{x}. \end{equation}  The operator $\xop$ has the interesting property that when it works on the base states $\ket{x}$ it is equivalent to multiplying by $x$.] Do you want to know the average value of $x^2$? It is \begin{equation} \label{Eq:III:20:41} \av{x^2}=\int\psi\cconj(x)x^2\psi(x)\,dx. \end{equation}  Or, if you prefer you can write \begin{equation} \av{x^2}=\braket{\psi}{\alpha'}\notag \end{equation}  with \begin{equation} \label{Eq:III:20:42} \ket{\alpha'}=\xop^2\,\ket{\psi}. \end{equation} By $\xop^2$ we mean $\xop\xop$—the two operators are used one after the other. With the second form you can calculate $\av{x^2}$, using any representation (base-states) you wish. If you want the average of $x^n$, or of any polynomial in $x$, you can see how to get it.