My textbook says that to find the ket $|ψ\rangle$ in the same position basis as the ket $|ø\rangle$ we do the following: $$|ψ\rangle=\int dø|ø\rangle \langle ø|ψ\rangle$$ Firstly can $|ø\rangle$ be any ket? i.e. this expression just puts $|ψ\rangle$ in the same basis as $|ø\rangle$ regardless of the components of $|ø\rangle$?
Secondly my textbook goes on to say to place $|ψ\rangle$ in the position basis we do the following: $$|ψ\rangle=\int d^3r\ |\mathbf{r}\rangle\langle \mathbf{r}|ψ\rangle$$ Why have we suddenly gained a cubed sign?
Are we taking the integral over nothing? i.e. are the integrals we are doing simply $\int dø$ and $\int d^3r$?
(I am new to this sort of physics/maths and am self teaching so please can you keep the explanations relativity simple) thanks