# How to compute the expectation value $\langle x^2 \rangle$ in quantum mechanics?

$$\langle x^2 \rangle = \int_{-\infty}^\infty x^2 |\psi(x)|^2 \text d x$$

What is the meaning of $|\psi(x)|^2$? Does that just mean one has to multiply the wave function with itself?

-

In general, $\psi$ will be a complex valued function. And so $|\psi(x)|^2$ will be not equal just $\psi(x)^2$ but it is $\psi(x)$, multiplied by its complex conjugate: $|\psi(x)|^2=\psi(x)^*\psi(x)$.

-

About your other question, the meaning of $|\psi(x)|^2$ is that of a density of probability, with $[|\psi(x)|^2 \mathrm{d}x]$ giving the probability that the particle is found between $x$ and $x + \mathrm{d}x$.

-

$\psi$ can be thought of as a complex column vector with infinitely many entries indexed by the variable $x$. Entry at $x$ th position is denoted as $\psi(x)$. $|\psi(x)|^2$ is then mode square of the entry at $x$th position. The expression $\displaystyle\int_{-\infty}^{\infty}x^2|\psi(x)|^2dx$ can be heuristically understood as :

$[*,*,\overline{\psi(x)},*,*]\left[ \begin{array}{cc} * & 0 & 0 & 0 & 0\\ 0 & * & 0 & 0 & 0\\ 0 & 0 & x^2 & 0 & 0\\ 0 & 0 & 0 & * & 0\\ 0 & 0 & 0 & 0 & *\end{array}\right]\left[\begin{array}{cc}*\\*\\\psi(x)\\*\\*\end{array}\right]$

Where $[*,*,\overline{\psi(x)},*,*]$ is infinite dimensional row vector which is transpose conjugate of column vector $\psi$; And in the middle we have infinite dimensional diagonal matrix whose $(x,x)$th entry is $x^2$. This is in general true in QM. Any observable $A$ can be written as a hermitian matrix which acts on space of column vectors (the state space), and its expectation value for a given column vector $\psi$ is defined as $<A>_{\psi}=\psi^{\dagger}A\psi = \displaystyle\sum_{i,j}\overline{\psi_i}A_{ij}\psi_{j}$. In this infinite dimensional case as above sum is replaced by integral over the continuous indices.

-