an r.i. space with associate space $Y$ that not only has the property that $M\colon X
\rightarrow Y$, but is also the optimal range space corresponding to $X$. If $\psi \notin X^{\prime }(0,\infty )$, there is no r.i. space $Z$ over $\mathbb{R}^{n}$ such that $M\colon X\rightarrow Z$.

The situation turns out to be considerably more complicated in the case of the fractional maximal operator, another classical operator of harmonic analysis. The reason is that the appropriate analogue of the Riesz–Wiener–Herz inequality for the fractional maximal operator leads to an inevitable involvement of a supremum type operator, rather than just an integral mean. Supremum operators are not linear and in general are less manageable than their integral companions. However, using a fine analysis combining known and new techniques and various delicate estimates we are able to characterize the optimal range space for this operator as well. Since the general resulting condition is however naturally not so simple as in the case of the operator $M$, we include another, simpler characterization, available under a rather mild extra assumption. We also include an interesting and perhaps somewhat surprising result describing a vital link between optimality properties of a space and boundedness of a 