On the horizontal integration of the Lebesgue integral

In your example, $\mu$ would represent the base of the rectangle. But that's not the important part. The important part is the definition of the set you are taking the measure of.

Let's look at your image. Imagine each rectangle is height of exactly 1 unit. We might define the sets like this:

$$E_n = \{ x : n \le f(x) < n+1\}.$$

We look at the measure of each of these sets.

For $n = 1$, the set of numbers in $E_1$ is exactly the bottom-most rectangle projected onto the $x$-axis. It has measure $\mu(E_1)$. The second rectangle from the bottom is $E_2$, and so forth.

Each of these rectangles has height $1$, so we can approximate the integral as

$$\int f\, d\mu = \sum 1\cdot \mu(E_n).$$

What might be stumbling you up is that you are expecting that the location of those horizontal slices, as shown in the picture, is somehow embedded within the sum. It is not; rather, the rectangles are essentially sets, pulled upwards by steps of $1$.

Of course, we need not choose height $1$, and it need not be uniform. Instead, we can choose height $a_n$.


The fact that the Lebesgue integral "works vertically" means that we start by partitioning the range of the function (instead of the domain) and drawing horizontal lines from these points. But the final rectangles are not horizontal in the sense of your red figure.

Therefore, you didn't understand it because there is no natural connection between the usual definition and your red figure. Actually, as the $E_i$ are not apparent, the important fact that they aren't intervals, aren't lengths or heights and, eventually, are very complicated (which motivates the definition of measurable sets and measurable functions) is completely lost in the figure. By the way, the fact that this figure is so wrong that it should be removed from the Wikipedia's article is discussed here.

I suggest you take a look at the appropriate geometric interpretation as, for example, in Preface of Mikusinski's book or in Chapter 2 of Folland's book. As explained in these texts, the correct picture would have the following form (source):

enter image description here

Of course, this picture can also illustrate an approximation for the Riemann integral. This happens because the Lebesgue integrable functions that have "nice figures" are also Riemann integrable. So, what really matters is not the final form of the figure (as suggested by the original red figure), but the way it is constructed (which is explained in the cited books).