# Wavefunctions as Inner Product

In the following expression, n and m belong to the number basis and x is the position:

$$\langle n|m \rangle = \int_x n^*(x) m(x) dx = \int_x \langle n|x \rangle \langle x|m \rangle dx$$

I understand $$\langle n|m \rangle$$ as the inner product of $$|n\rangle$$ and $$|m\rangle$$. However $$\langle n|x \rangle$$ and $$\langle m|g \rangle$$ make no sense to me. The reason is that the dimensions of number basis is countable infinite or finite (imagine harmonic oscillator or spin system), however, the dimensions of position is uncountable infinite. How can you take an inner product between vectors from different basis?

• Because taking only inner products of vectors from the same basis would be rather boring? – Norbert Schuch Mar 14 at 0:41
• – Cosmas Zachos Mar 14 at 1:33
• You are aware $\langle x|n\rangle=\psi_n(x)$ the Hermite functions, a countable set? – Cosmas Zachos Mar 14 at 1:37
• – Sandejo Mar 14 at 3:19
• Maybe also helpful: physics.stackexchange.com/questions/207928/… – TBissinger Mar 14 at 23:24

I will not give a full answer, a lot of useful answers explaining technical details can be found in Hilbert space of harmonic oscillator: Countable vs uncountable? and maybe On the dimensionality of the Hilbert space for a central potential

But I will try to explain what I think your question is about and try to give it a precise formulation. This turned out to be a bit too long for comments, so I went ahead and posted it as an answer...

1. It is entirely unproblematic to take inner products between vectors from different bases. By themselves, they are just vectors. I think the problem you have is another one, so let me make a guess and see whether I understand the question correctly: You are confused by the fact that you can either expand your state in the uncountable basis $$|x\rangle$$ or in the countable basis $$|n\rangle$$. But the basis of a space should be either countable or uncountable, so what's the missing detail?

2. If that is roughly what you wanted to ask, let me point out how your question could be formulated more precisely: If you have two spaces $$V$$ and $$H$$, and the basis of $$H$$ is countable while the basis of $$V$$ isn't, clearly $$H$$ and $$V$$ are very different spaces (in math speech, they are not isomorphic, and you don't need a Hilbert space structure here, topological vector spaces are enough). But then we must conclude that we can't have a countable and an uncountable basis for one and the same space. So we must conclude that $$|x\rangle$$ and $$|n\rangle$$ are bases for different vector spaces, and how on earth do you take inner products between vectors in different spaces?

3. tparker's answer in Hilbert space of harmonic oscillator: Countable vs uncountable? should give you everything you need to continue from here if you want the technical details, otherwise look through the other answers there.

• That is precisely my doubt. Thanks for the references. – curious Mar 14 at 9:14
• But then again, what about a 2-level system, where only allowed values for n is 1 and 2. The explanation falls apart. Is $|x>= <1|x>|1> + <2|x>|2>$ true in that case too? – curious Mar 14 at 12:19
• What kind of two-level system are we talking about? The basis $|x\rangle$ needn't be defined for arbitrary two-level systems. – TBissinger Mar 14 at 16:13
• Sorry, I really can't quite see where the argument comes from. If $|1\rangle$ and $|2\rangle$ are spin up and spin down, there is no such thing as $\langle x|1\rangle$. Whether or not $|x\rangle$ is a meaningful generalized vector depends on what Hilbert space you consider your (normalizable) states to lie in. If that space is ${\mathcal H} = L^2$, then yes, $|x\rangle$ is a generalized vector (because it's in the dual of the Schwartz space). But if $\mathcal H$ is ${\mathbb C}^2$ as in the spin case, then you can't define $|x\rangle$ via the Schwartz space. Helpful or too technical? – TBissinger Mar 14 at 17:20
• Yup. Since $\langle x|x'\rangle = \delta(x-x')$ and $\sum_n |n\rangle\langle n| = 1$, the two give $\langle x|x'\rangle = \sum_n \langle x|n\rangle\langle n|x'\rangle = \delta(x-x')$. This is clearly true for any basis $|n\rangle$ satisfying the property $\sum_n |n\rangle\langle n| = 1$, since that was our only requirement. – TBissinger Mar 14 at 23:22