Where the orthonormality relation of the position basis vectors ⟨ ⟨ x | x ′ ⟩ ⟩ = δ δ ( x − − x ′ ) , reduces the double integral to a single integral. The last line uses the modulus of a complex valued function to replace ψ ψ ∗ ∗ ψ ψ with | ψ ψ | 2 , which is a common substitution in quantum-mechanical integrals.