There is a vector space $S$ with basis elements $B$.
Question:
- Is it necessary that the $B\subset S$ or can there a case where $B\not\subset S$ ?
- Is infinite-dimensional Hilbert space ($\mathcal H$ of functions $f:\Bbb C \rightarrow \Bbb C ,[-\infty,\infty$]), an example of $B\not\subset S$ ?
while writing the 2nd question I am thinking of Example:
let $f(x)=e^{-\frac{x^2}{4a}}$, $f\in \mathcal H$
This function can be constructed using basis $b(x)=e^{ikx}$ by $$f(x)=\int_{-\infty}^\infty g(k)e^{ikx} dk $$ where $g(k)=\frac{1}{\sqrt{a\pi}}e^{-ak^2}$ is like weight to the basis, will give us $f(x)=e^{-\frac{x^2}{4a}}$
Hence we can get $f\in \mathcal H$ by $b\not \in \mathcal H$,
$\because$ finite value of inner product or $L^2$ condition of $\mathcal H$, is not satisfied by $b$
PS: $e^{ikx}$ basis can span infinite dimension Hilbert space by Fourier transform(the above integral), with suitable weight $g(x)$
Well, technically it's incorrect. It's not $B \in S$, rather $B \subset S$. It's for an individual element $\vec b \in B$ that we have $\vec b \in S$.
You can see on Wolfram that being a subset is given as part of the definition:
(bolding added)
$B$ is a basis if $$(\vec v \in S) \leftrightarrow (\exists! c_1,c_2 ... : \vec v = c_1\vec b_1 +c_2\vec b_2 +...)$$ That is, $S$ is the set of all vectors that are a linear combination of the elements of $B$. And $b_1$ clearly is a linear combination: just take $c_1 =1$ and the rest of the coefficients zero. Similarly for the other elements of $B$.