Quantum state in continuous basis If I have an arbitrary state $|\psi\rangle$ and want to represent it in a continuous basis, for example the position basis in $x$-direction, I will get
$$|\psi\rangle = \int dx\, \langle x|\psi\rangle|x\rangle,$$
with $\langle x|\psi\rangle$ being the wavefunction (that is, the amplitude for the state $|\psi\rangle$ to be in an eigenstate of $\hat{x}$).
In the discrete case, this would be a sum with all the different probabilities of the state $|\psi\rangle$ being in one of the eigenstates of $\hat{x}$, which can be represented as a vector with each entry has the probability of the state $|\psi\rangle$ being in that eigenstate $|x_i\rangle$.
What is the equivalent representation with a continuous basis? How I can “visualize” a state when it is represented in continuous bases. If I represent it in a discrete base, I can “visualize” it as a vector. But how can I do it when I am in the continuous space?
 A: What you've written already seems correct?
In the discrete case with dimension $N$, I have a basis $\{ \left| x \right\rangle\}$ that is orthonormal and complete, meaning that
$$ \left\langle x \middle| y \right\rangle \, = \, \delta^{\,}_{x,y} ~~~\text{and}~~~\sum\limits_{x=1}^N \, \left| x \middle\rangle \hspace{-0.4mm} \middle\langle x \right| \, = \, \mathbb{1} \, ,~$$
with $\mathbb{1}$ the identity and $\delta^{\,}_{a,b}$ the Kronecker delta function (it's 1 if $a=b$ and 0 if $a \neq b$). I can write any state using this basis as
$$ \left| \psi \right\rangle \, = \, \mathbb{1} \, \left| \psi \right\rangle \, = \, \sum\limits_{x=1}^N \, \left| x \middle\rangle \hspace{-0.4mm} \middle\langle x \middle| \psi \right\rangle \, = \, \sum\limits_{x=1}^N \, \psi^{\,}_x \, \left| x \right\rangle \, , ~$$
where $\psi^{\,}_x \, \equiv \, \left\langle x \middle| \psi \right\rangle$ is the overlap of the state $\left| \psi \right\rangle$ with the basis state $\left| x \right\rangle$.
In the continuous case with infinite dimension, I simply replace the sums above with integrals, as noted by @cosmas-zachos in a comment. I once again have a basis $\{ \left| x \right\rangle\}$ that is orthonormal and complete, meaning that
$$ \left\langle x \middle| y \right\rangle \, = \, \delta \left( x - y \right) ~~~\text{and}~~~\int \, {\rm d}x \, \left| x \middle\rangle \hspace{-0.4mm} \middle\langle x \right| \, = \, \mathbb{1} \, ,~$$
with $\mathbb{1}$ the identity as usual, and $\delta (z)$ the Dirac delta function (which is infinite at $z=0$ and zero elsewhere). I can write any state using this basis as
$$ \left| \psi \right\rangle \, = \, \mathbb{1} \, \left| \psi \right\rangle \, = \, \int \, {\rm d}x  \left| x \middle\rangle \hspace{-0.4mm} \middle\langle x \middle| \psi \right\rangle \, = \, \int\, {\rm d}x \, \psi (x) \, \left| x \right\rangle \, , ~$$
where $\psi (x) \, \equiv \, \left\langle x \middle| \psi \right\rangle$ is the overlap of the state $\left| \psi \right\rangle$ with the basis state $\left| x \right\rangle$, known as the wavefunction when $x$ corresponds to position states.
Compared to the familiar inner product in finite dimensions,
$$\vec{v} \cdot \vec{w} \, = \, \left\langle v \middle| w \right\rangle\,  =\, \sum_{x=1}^N \, \left\langle v \middle| x \middle\rangle \hspace{-0.4mm} \middle\langle x \middle| w \right\rangle \, = \, \sum_{x=1}^N \, v^{\ast}_x \, w^{\vphantom{*}}_x \, ,~$$
in the infinite-dimensional case the inner product is instead
$$\vec{v} \cdot \vec{w} \, = \, \left\langle v \middle| w \right\rangle \, = \, \int \, {\rm d}x \, \left\langle v \middle| x \middle\rangle \hspace{-0.4mm} \middle\langle x \middle| w \right\rangle \, = \, \int \, {\rm d}x \, v^{\ast} (x) \, w (x) \, .~$$
As far as "visualization", just think of it the same way as the discrete case with dimension $N$ and imagine that $N \to \infty$. See also these lecture notes.
