# Spectral theorem and infinite square well

I was reading about the solution to the infinite square well and it imposes boundary conditions that make the wavefunction 0 outside the well. So, that means that physically any initial state is a subset of Hilbert space (not the entire Hilbert space). You can certainly span any initial state with the eigenfunctions of the Hamiltonian corresponding to the infinite square well. I wanted to apply the spectral theorem here and make sure I am correct. Before, I thought that the Spectral theorem implied that I could span the entire Hilbert Space with the eigenfunctions corresponding to a linear self adjoint operator. But, it seems this is just a particular case. What it actually implies is that you can span any subset of Hilbert space that fullfill the physical boundary conditions with the eigenfunctions of a linear self adjoint operator, being the biggest subset the whole square integrable space (the case of a free particle or Harmonic oscillator, where the only boundary conditions is that the wave function has to be 0 at infinity). That is what is meant by completeness of the eigenfunctions. Am I correct in thinking this?

• The initial state can be span by a basis of your space. The eigenfunctions provide you a basis. Apr 2, 2018 at 1:00

If you take any subspace of a Hilbert space and complete it (add all limits with finite norms) you get another Hilbert space. You can then apply the spectral theorem in this Hilbert space. The spectral theorem is not specific to spaces of functions on the whole line or $R^3$. When we study spins, the physical Hilbert space under consideration is finite dimensional.
Completeness of the eigenfunctions of a Hermitian operator that acts on vectors in a space $V$ means that you can write any vector in $V$ as a linear combination of said eigenfunctions. Therefore, you can also write any vector in any subspace of $V$ (if you can write any vector on the big space, how could you not write any vector on a little part of the big space?).