TITLE: linear combination, span, independence and bases for infinite dimensional vector spaces.
QUESTION [6 upvotes]: I've only recently started studying linear algebra using some lecture notes by Evan Dummit (https://math.la.asu.edu/~dummit/docs/linalgprac_2_vector_spaces.pdf).
After defining vector spaces, the notions of linear combination, span, generating set and linear independence are introduced. All of this culminates in the definition of a basis for a vector space followed by the dimension.
Def: A vector $w$ is a linear combination of a set of vectors $v_{1}, v_{2},...,v_{n}$ if $\exists$ scalars $a_{1}, a_{2},..., a_{n}$ s.t. $w=a_{1}v_{1}+a_{2}v_{2}+\cdots+a_{n}v_{n}$. Even though it is not explicitly stated this is a finite set of vectors since otherwise the expression does not have any meaning.
Def: The span of a set of vectors $S=\{v_{1}, v_{2},...,v_{n}\}$ is the set of all linear combinations of $S$.
Def: Given a vector space $V$, we say that $S$ is a generating set for $V$ if $\operatorname{span}(S)=V$. This means that every vector in $V$ can be written as a linear combination of the vectors in the set $S$.
Def: A finite set of vectors $v_{1}, v_{2},...,v_{n}$ is linearly independent if $a_{1}v_{1}+a_{2}v_{2}+\cdots+a_{n}v_{n}=0$ implies that $a_{i}=0$ $\forall i$. An infinite set of vectors is linearly independent if every finite subset is linearly independent (this is again because a linear combination of infinitely many vectors does not make sense).
Def: Given a vector space $V$, we say that an independent set of vectors which spans $V$ is a basis.
So far so good with the definitions, but there is one thing that I just couldn't understand so far. Given the basis we can talk about the dimension of the vector space (which is the number of basis elements) and there are also infinite-dimensional vector spaces. However, there is also a theorem that states that every vector space (finite- or infinite-dimensional) has a basis.
So my question is how a basis can even exist for the infinite-dimensional case when the definition of a linear combination only makes sense for finitely many vectors and the basis in this case has an infinite number of elements by definition.
Can someone please point me in the correct direction? What am I missing?
Thanks very much!

REPLY [3 votes]: All those definitions remain true for infinite dimensional spaces (spaces with an infinite basis). But they are not useful in the infinite dimensional spaces mathematicians and physicists most care about. 
Those spaces usually have enough structure to make sense of infinite sums. Here's one classic example.
Let $H$ be the set of all sequences $(a_n)$ of real (or complex) numbers such that the sum $\Sigma a_n^2$  converges. It's clear that $H$ is closed under vector summation and scalar multiplication: those happen element by element. Then you can define the distance between any two vectors by analogy with the Euclidean distance:
$$
|v-w| = \sqrt{\sum_{n = 1}^\infty (v_i - w_i)^2}
$$
With that definition you can make sense of some infinite sums of vectors, and use those infinite sums to define independence, span and basis. 
The set of vectors $e_i$ where for each $i$ the vector $e_i$ has a $1$ in place $1$ and is $0$ elsewhere is a basis.
If you think about replacing the sums in that example by integrals you can build even more interesting and useful vector spaces. The study of Fourier series can be thought of as understanding that the set of functions $\{ \sin nx, \cos nx\}$ forms a basis for the space of (nice enough) periodic functions.