# Why does $\langle x' | x \rangle$ give the Dirac delta distribution? [duplicate]

I'm having difficulty understanding why the following is true:

$$\int_\mathbb{R} \langle x' | x \rangle dx = \int_ \mathbb{R} \delta(x-x')dx$$

where $$\delta(x)$$ is the delta distribution. Are we taking this to be true because we require a normalized basis for the Hilbert space? Or can this relation be shown to be true from some other postulate in QM?

I understand that if we assume it's true then the following works out:

$$\psi(x) = \langle x|\psi\rangle = \int_\mathbb{R} \langle x | x'\rangle\langle x' | \psi\rangle dx' = \int_\mathbb{R} \delta(x'-x)\psi(x') dx' = \psi(x)$$