# What is the inner product between a position ket and a two-state (or multi-state) ket?

I am recently studying the two-state system in quantum mechanics.

As I learned, in the Hilbert space of a spinless particle, the relation between a scalar function and a ket state is satisfied as,

$$u(\vec r)=\langle\vec r|u \rangle$$

where $|r \rangle$ is the eigenstate of the position operator and $|u \rangle$ is the ket state of the spinless particle.

I wonder the similar relation can also be obtained with the two-state or multi-state ket. For example, if $|u \rangle$ is the two-state spin state as $|u \rangle = a|+ \rangle + b|- \rangle$, what is the result of $\langle\vec r|u \rangle$?

I think it should be ascalar as $a\langle\vec r|+ \rangle + b\langle\vec r|- \rangle$ because of the definition of the inner product, but I cannot find its physical meaning. Also, what is the corresponding scalar function of $\langle\vec r|+ \rangle$?

You can't do $\langle \mathbf{r} | + \rangle$, because you'd be mixing two different Hilbert spaces. The states $|+\rangle$ and $|-\rangle$ are a basis for the Hilbert space of a two-state spin system, which is two-dimensional. Meanwhile, the states $|\mathbf{r}\rangle$ are basis for the Hilbert space of a spinless particle moving on $\mathbb{R}^3$ (or your favorite dimension), which is infinite dimensional (it is the space of wavefunctions). It would be like asking what the scalar product of $(2,3)$ and $(-1,5,2)$ is: it makes no sense, the two vectors belong to different spaces.
What you can do, if you have a spin 1/2 particle moving in $\mathbb{R}^k$, is combine the two spaces into something called the tensor product. Very roughly, if $V$ and $W$ are vector spaces with bases $\{|v_i\rangle\}$ and $\{|w_j\rangle\}$ and dimensions $n$ and $m$, the tensor product $V \otimes W$ is a space with dimension $nm$ and basis elements given by $|v_i\rangle |w_j\rangle$ for all $(i,j)$.
In our situation, the basis elements of a spin 1/2 particle moving around would be of the form $|\mathbb{r}\rangle |+\rangle$ and $|\mathbb{r}\rangle |-\rangle$; if we are in one dimension, a general state could be expressed as
$$|\psi\rangle = \int dx\, \psi_+(x) |x\rangle |+\rangle + \int dx\, \psi_-(x) |x\rangle |-\rangle.$$
You can see that we have to specify a wavefunction for each of the spin states. Taking the inner product with some $\langle x|$ would still leave us with the spin part:
$$\langle x | \psi \rangle = \psi_+(x) |+\rangle + \psi_-(x) |-\rangle.$$