The authors consider the problem of approximation by B-spline functions, using a norm compatible with the discrete sequence-space l2 instead of the usual norm L2. This setting is natural for digital signal/image processing and for numerical analysis. To this end, sampled B-splines are used to define a family of approximation spaces S(m)n subset-of l2. For n odd, S(m)n is partitioned into sets of multiresolution and wavelet spaces Of l2. It is shown that the least squares approximation in S(m)n of a sequence s is-an-element-of l2 is obtained using translation-invariant filters. The authors study the asymptotic properties of these filters and provide the link with Shannon's sampling procedure. Two pyramidal representations of signals are derived and compared: the l2-optimal and the stepwise l2-optimal pyramids, the advantage of the latter being that it can be computed by the repetitive application of a single procedure. Finally, a step by step discrete wavelet transform Of l2 is derived that is based on the stepwise optimal representation. As an application, these representations are implemented and compared with the Gaussian/Laplacian pyramids that are widely used in computer vision.