Multiple Integrals over Rectangles

Consider a solid tent-shaped region sitting above a rectangular floor in the xyxy-plane. Its height at each point (x,y)(x,y) is given by some function f(x,y)f(x,y). What number should we call its volume? For a single-variable function, we sliced the region under a curve into thin vertical strips. We then summed rectangular areas. The same idea works in higher dimensions. But now we must slice a rectangle in Rn\mathbb{R}^n into a grid of tiny sub-rectangles, rather than an interval into sub-intervals. We must track how the resulting sums behave as the grid gets finer in every direction simultaneously. This construction matters because it is the rigorous foundation beneath every multivariable volume, mass, flux, and probability computation. Physicists, engineers, and statisticians all rely on it. Before one can legitimately swap the order of integration, change variables, or integrate over a disk or a sphere, one needs a precise notion. One must know what "the integral of ff over a rectangle R⊂RnR \subset \mathbb{R}^n" even means. One also needs a workable test for when that number exists. The big picture is a direct generalization of the one-variable Riemann integral. First, partition the rectangle into a grid of sub-rectangles. Then form upper and lower sums using the supremum and infimum of ff on each piece. Declare ff integrable when these sums can be forced arbitrarily close together by refining the grid. Continuity — building on Limits and Continuity in Several Variables — combined with compactness of closed rectangles, will guarantee this happens. This holds true for a large and useful class of functions. This article builds the definition of partitions and Riemann sums over a rectangle R⊂RnR \subset \mathbb{R}^n. It proves the fundamental integrability criterion (Riemann's criterion). It also shows continuous functions on compact rectangles are always integrable. It sets the stage for later results. These include Fubini's Theorem, which reduces multiple integrals to iterated single integrals. It also sets the stage for the extension of integration to non-rectangular regions.

Key takeaways
  • A rectangle R=[a1,b1]×⋯×[an,bn]⊂RnR = [a_1,b_1]\times\cdots\times[a_n,b_n] \subset \mathbb{R}^n is partitioned by partitioning each side, producing a grid of sub-rectangles.
  • Upper and lower Riemann sums are built from suprema/infima of ff on each sub-rectangle, weighted by sub-rectangle volume.
  • The upper integral is the infimum of upper sums; the lower integral is the supremum of lower sums; ff is integrable when they agree.
  • Riemann's criterion: ff is integrable on RR iff for every ε>0\varepsilon>0 there is a partition with upper sum minus lower sum less than ε\varepsilon.
  • Every continuous function on a closed, bounded rectangle is integrable — this relies crucially on compactness giving uniform continuity.
  • Key idea: integrability is a statement about how well suprema and infima on a grid can be squeezed together as the grid refines in every coordinate direction at once.

Where this lives today

The Riemann integral over rectangles is the direct ancestor of every volume, mass, moment-of-inertia, and probability computation done with multiple integrals in applied mathematics, physics, and engineering — for instance computing the total mass of a rectangular plate with variable density ρ(x,y)\rho(x,y), or the flux of a field through a rectangular aperture. It is the base case from which Fubini's Theorem reduces double and triple integrals to iterated single-variable integrals, which is how such integrals are actually computed in practice, and it is the base case from which Integrals over General Regions extends integration to disks, balls, and arbitrary bounded domains by extending the integrand by zero outside the region and integrating over an enclosing rectangle. In probability and statistics, joint probability density functions over rectangular (or box-shaped, in higher dimensions) sample spaces are integrated exactly via this machinery to compute joint probabilities and expectations. In numerical analysis, the partition/Riemann-sum picture is the conceptual seed of numerical quadrature schemes in higher dimensions (e.g. tensor-product Simpson's rule, midpoint rule cubature), which approximate multiple integrals by refined finite sums exactly analogous to U(f,P)U(f,P) and L(f,P)L(f,P). In computer graphics and finite-element methods, discretizing a domain into rectangular (or box) elements and summing local contributions is a direct computational descendant of upper/lower Riemann sums. The theoretical criterion also foreshadows Lebesgue's integrability criterion, which characterizes Riemann integrability precisely in terms of the set of discontinuities having Lebesgue measure zero — a refinement of the continuity-based sufficient condition proved here.

Ask the tutor: How does the proof that continuous functions are integrable change if the rectangle RR is replaced by a more general compact region?

DefinitionPartitions, Riemann sums, and the multiple integral over a rectangle

Let R=[a1,b1]×[a2,b2]×⋯×[an,bn]⊂RnR = [a_1,b_1] \times [a_2,b_2] \times \cdots \times [a_n,b_n] \subset \mathbb{R}^n be a closed rectangle (with ai<bia_i < b_i for each ii), and let f:R→Rf : R \to \mathbb{R} be a bounded function.

Partitions. A partition of [ai,bi][a_i,b_i] is a finite set of points

Pi:ai=ti,0<ti,1<⋯<ti,ki=bi.P_i : a_i = t_{i,0} < t_{i,1} < \cdots < t_{i,k_i} = b_i.

A partition of RR is an nn-tuple P=(P1,…,Pn)P = (P_1,\dots,P_n), one partition for each side. It divides RR into finitely many closed sub-rectangles

Q=[t1,j1−1,t1,j1]×⋯×[tn,jn−1,tn,jn],Q = [t_{1,j_1-1},t_{1,j_1}] \times \cdots \times [t_{n,j_n-1},t_{n,j_n}],

one for each choice of indices 1≤ji≤ki1 \le j_i \le k_i. Write Q(P)\mathcal{Q}(P) for the collection of all such sub-rectangles; they have pairwise disjoint interiors and their union is RR. The volume of a sub-rectangle Q=∏i[ci,di]Q = \prod_i [c_i,d_i] is v(Q)=∏i(di−ci)v(Q) = \prod_i (d_i - c_i).

Upper and lower sums. Since ff is bounded on RR, it is bounded on each Q∈Q(P)Q \in \mathcal{Q}(P). Define

MQ(f)=sup⁡x∈Qf(x),mQ(f)=inf⁡x∈Qf(x).M_Q(f) = \sup_{x \in Q} f(x), \qquad m_Q(f) = \inf_{x \in Q} f(x).

The upper sum and lower sum of ff with respect to PP are

U(f,P)=∑Q∈Q(P)MQ(f) v(Q),L(f,P)=∑Q∈Q(P)mQ(f) v(Q).U(f,P) = \sum_{Q \in \mathcal{Q}(P)} M_Q(f)\, v(Q), \qquad L(f,P) = \sum_{Q \in \mathcal{Q}(P)} m_Q(f)\, v(Q).

Refinement. A partition P∗P^* refines PP if Pi∗⊇PiP_i^* \supseteq P_i for every side ii (each side-partition of P∗P^* contains all the division points of PP, plus possibly more). Given any two partitions P,P′P, P' of RR, their common refinement P∗=(P1∪P1′,…,Pn∪Pn′)P^* = (P_1 \cup P_1', \dots, P_n \cup P_n') refines both.

Upper and lower integrals. Define

∫R‾f=inf⁡PU(f,P),∫R‾f=sup⁡PL(f,P),\overline{\int_R} f = \inf_P U(f,P), \qquad \underline{\int_R} f = \sup_P L(f,P),

the infimum and supremum taken over all partitions PP of RR.

Integrability. The function ff is Riemann integrable on RR if ∫R‾f=∫R‾f\overline{\int_R} f = \underline{\int_R} f, and in that case the common value is called the integral of ff over RR, denoted

∫Rf=∫Rf(x) dx.\int_R f = \int_R f(x)\, dx.

Intuition

Picture n=2n=2: a rectangle R=[a1,b1]×[a2,b2]R = [a_1,b_1]\times[a_2,b_2] in the plane, and a surface z=f(x,y)z = f(x,y) sitting above it. A partition slices RR into a checkerboard grid of small rectangles QQ. Over each tiny rectangle, ff is approximately constant if ff is well-behaved, so the true volume under the surface over QQ is trapped between mQ(f) v(Q)m_Q(f)\,v(Q) (a flat box built to the lowest height reached on QQ) and MQ(f) v(Q)M_Q(f)\,v(Q) (a flat box built to the highest height). Summing over all the tiles gives L(f,P)≤(true volume)≤U(f,P)L(f,P) \le (\text{true volume}) \le U(f,P) for every partition PP — this sandwiching is the entire content of the definition. Refining a partition (adding more grid lines in either direction) can only push U(f,P)U(f,P) down and L(f,P)L(f,P) up, because breaking a rectangle into smaller pieces can only shrink each local supremum and grow each local infimum (or leave them the same). The upper integral is the best (smallest) upper sum achievable; the lower integral is the best (largest) lower sum achievable. Integrability says these two "best bounds" meet exactly — the boxy over- and under-approximations of the volume converge to a single honest number as the grid becomes infinitely fine in every direction. The genuinely new phenomenon in Rn\mathbb{R}^n, compared to R1\mathbb{R}^1, is that the grid must refine along all nn axes at once — one cannot simply refine in the xx-direction and declare victory while the yy-direction stays coarse. The criterion below packages exactly the condition needed to control this multi-directional refinement.

:::svg[A partition of R=[0,2]×[0,1]R=[0,2]\times[0,1] into 6 sub-rectangles, with one tile's sup/inf sandwich indicated] x y Q t₁,₁ t₁,₂ t₂,₁ a₂ b₂ a₁ b₁ m_Q(f)·v(Q) ≤ (volume over Q) ≤ M_Q(f)·v(Q)

TheoremRiemann's Criterion for Integrability

Let R⊂RnR \subset \mathbb{R}^n be a closed rectangle and f:R→Rf : R \to \mathbb{R} bounded. Then ff is Riemann integrable on RR if and only if for every ε>0\varepsilon > 0 there exists a partition PP of RR such that

U(f,P)−L(f,P)<ε.U(f,P) - L(f,P) < \varepsilon.
LemmaRefinement Lemma

Let R⊂RnR \subset \mathbb{R}^n, f:R→Rf:R\to\mathbb{R} bounded, and let P∗P^* be a refinement of the partition PP of RR. Then

L(f,P)≤L(f,P∗)≤U(f,P∗)≤U(f,P).L(f,P) \le L(f,P^*) \le U(f,P^*) \le U(f,P).
Proof

(Proof of the Refinement Lemma; technique: comparing suprema/infima on nested sets.) The middle inequality L(f,P∗)≤U(f,P∗)L(f,P^*) \le U(f,P^*) is immediate: for each sub-rectangle Q′Q' of P∗P^*, mQ′(f)≤MQ′(f)m_{Q'}(f) \le M_{Q'}(f) since the infimum of a bounded set never exceeds its supremum, and v(Q′)≥0v(Q') \ge 0, so summing preserves the inequality termwise. It remains to show U(f,P∗)≤U(f,P)U(f,P^*) \le U(f,P); the argument for LL is symmetric (replace sup⁡\sup by inf⁡\inf and reverse the inequality). Since P∗P^* refines PP, each sub-rectangle Q∈Q(P)Q \in \mathcal{Q}(P) is exactly partitioned by finitely many sub-rectangles of Q(P∗)\mathcal{Q}(P^*); write Q(P∗)∣Q={Q1′,…,Qr′}\mathcal{Q}(P^*)|_Q = \{Q_1',\dots,Q_r'\} for those pieces of Q(P∗)\mathcal{Q}(P^*) contained in QQ, so that Q=⋃k=1rQk′Q = \bigcup_{k=1}^r Q_k' with pairwise disjoint interiors, and every Q′∈Q(P∗)Q' \in \mathcal{Q}(P^*) lies in Q(P∗)∣Q\mathcal{Q}(P^*)|_Q for exactly one Q∈Q(P)Q \in \mathcal{Q}(P) (because P∗P^*'s grid lines include all of PP's grid lines in each coordinate, so refining sub-rectangles cannot straddle a boundary of QQ). Because each Qk′⊆QQ_k' \subseteq Q, we have

MQk′(f)=sup⁡x∈Qk′f(x)≤sup⁡x∈Qf(x)=MQ(f),M_{Q_k'}(f) = \sup_{x \in Q_k'} f(x) \le \sup_{x\in Q} f(x) = M_Q(f),

since the supremum over a subset is bounded above by the supremum over the whole set. Also volumes are additive over this sub-partition of QQ:

∑k=1rv(Qk′)=v(Q),\sum_{k=1}^r v(Q_k') = v(Q),

which is a standard fact for rectangles cut by a grid extending an existing grid (the volume of a box is the product of side lengths, and side lengths of an interval partitioned into consecutive sub-intervals sum to the whole length; applying this coordinate-by-coordinate and multiplying gives additivity of volume over the grid pieces of QQ). Hence

∑k=1rMQk′(f) v(Qk′)≤∑k=1rMQ(f) v(Qk′)=MQ(f)∑k=1rv(Qk′)=MQ(f) v(Q).\sum_{k=1}^r M_{Q_k'}(f)\, v(Q_k') \le \sum_{k=1}^r M_Q(f)\, v(Q_k') = M_Q(f) \sum_{k=1}^r v(Q_k') = M_Q(f)\, v(Q).

Summing this inequality over all Q∈Q(P)Q \in \mathcal{Q}(P) and using that Q(P∗)\mathcal{Q}(P^*) is the disjoint union of the Q(P∗)∣Q\mathcal{Q}(P^*)|_Q gives

U(f,P∗)=∑Q′∈Q(P∗)MQ′(f) v(Q′)=∑Q∈Q(P)∑k=1rMQk′(f)v(Qk′)≤∑Q∈Q(P)MQ(f) v(Q)=U(f,P).U(f,P^*) = \sum_{Q' \in \mathcal{Q}(P^*)} M_{Q'}(f)\,v(Q') = \sum_{Q \in \mathcal{Q}(P)} \sum_{k=1}^r M_{Q_k'}(f) v(Q_k') \le \sum_{Q\in\mathcal{Q}(P)} M_Q(f)\,v(Q) = U(f,P).

This proves U(f,P∗)≤U(f,P)U(f,P^*) \le U(f,P). ■\blacksquare

∎
CorollaryEvery lower sum is at most every upper sum

For a bounded f:R→Rf: R \to \mathbb{R} and any two partitions P1,P2P_1, P_2 of RR (not necessarily related by refinement),

L(f,P1)≤U(f,P2).L(f,P_1) \le U(f,P_2).

Consequently ∫R‾f≤∫R‾f\underline{\int_R} f \le \overline{\int_R} f.

Proof

Let P∗P^* be the common refinement of P1P_1 and P2P_2. By the Refinement Lemma applied twice,

L(f,P1)≤L(f,P∗)≤U(f,P∗)≤U(f,P2).L(f,P_1) \le L(f,P^*) \le U(f,P^*) \le U(f,P_2).

This proves the displayed inequality. Taking the supremum over P1P_1 on the left gives ∫R‾f≤U(f,P2)\underline{\int_R} f \le U(f,P_2) for every P2P_2; then taking the infimum over P2P_2 on the right gives ∫R‾f≤∫R‾f\underline{\int_R} f \le \overline{\int_R} f. ■\blacksquare

∎
Proof

(Proof of Riemann's Criterion; technique: squeeze argument via infimum/supremum characterizations, using the preceding Corollary.) (⇒\Rightarrow) Suppose ff is integrable, so ∫R‾f=∫R‾f=:I\overline{\int_R} f = \underline{\int_R} f =: I. Let ε>0\varepsilon > 0. Since I=inf⁡PU(f,P)I = \inf_P U(f,P), by the definition of infimum there is a partition P′P' with

U(f,P′)<I+ε2.U(f,P') < I + \tfrac{\varepsilon}{2}.

Since I=sup⁡PL(f,P)I = \sup_P L(f,P), by the definition of supremum there is a partition P′′P'' with

L(f,P′′)>I−ε2.L(f,P'') > I - \tfrac{\varepsilon}{2}.

Let PP be the common refinement of P′P' and P′′P''. By the Refinement Lemma,

U(f,P)≤U(f,P′)<I+ε2,L(f,P)≥L(f,P′′)>I−ε2.U(f,P) \le U(f,P') < I + \tfrac{\varepsilon}{2}, \qquad L(f,P) \ge L(f,P'') > I - \tfrac{\varepsilon}{2}.

Subtracting,

U(f,P)−L(f,P)<(I+ε2)−(I−ε2)=ε.U(f,P) - L(f,P) < \left(I + \tfrac{\varepsilon}{2}\right) - \left(I - \tfrac{\varepsilon}{2}\right) = \varepsilon.

This is the required partition. (⇐\Leftarrow) Suppose that for every ε>0\varepsilon > 0 there is a partition PP with U(f,P)−L(f,P)<εU(f,P) - L(f,P) < \varepsilon. Fix such ε\varepsilon and PP. By the Corollary above (applied with P1=P2=PP_1 = P_2 = P, or directly from the definitions),

L(f,P)≤∫R‾f≤∫R‾f≤U(f,P),L(f,P) \le \underline{\int_R} f \le \overline{\int_R} f \le U(f,P),

where the middle inequality is the Corollary and the outer two hold because ∫R‾f\underline{\int_R} f is a supremum of lower sums (hence ≥L(f,P)\ge L(f,P)) and ∫R‾f\overline{\int_R} f is an infimum of upper sums (hence ≤U(f,P)\le U(f,P)). Therefore

0≤∫R‾f−∫R‾f≤U(f,P)−L(f,P)<ε.0 \le \overline{\int_R} f - \underline{\int_R} f \le U(f,P) - L(f,P) < \varepsilon.

Since ε>0\varepsilon > 0 was arbitrary, ∫R‾f−∫R‾f≤0\overline{\int_R} f - \underline{\int_R} f \le 0, and combined with the Corollary's inequality ∫R‾f≤∫R‾f\underline{\int_R} f \le \overline{\int_R} f, we conclude

∫R‾f=∫R‾f,\overline{\int_R} f = \underline{\int_R} f,

i.e. ff is integrable. ■\blacksquare

∎
TheoremContinuous functions on rectangles are integrable

Let R⊂RnR \subset \mathbb{R}^n be a closed, bounded rectangle and let f:R→Rf : R \to \mathbb{R} be continuous. Then ff is Riemann integrable on RR.

Proof

(Technique: uniform continuity from compactness, then Riemann's Criterion.) Since RR is closed and bounded in Rn\mathbb{R}^n, it is compact (this uses Compactness in R^n, specifically the Heine–Borel characterization). A continuous real-valued function on a compact set is bounded and, moreover, uniformly continuous on that set: for every ε>0\varepsilon > 0 there is δ>0\delta > 0 such that for all x,y∈Rx,y \in R,

∥x−y∥<δ  ⟹  ∣f(x)−f(y)∣<ε.\|x - y\| < \delta \implies |f(x) - f(y)| < \varepsilon.

(This is the standard compactness fact that continuity upgrades to uniform continuity on compact domains, proved e.g. by a sequential compactness/contradiction argument using Compactness in R^n.) In particular ff is bounded on RR, so the upper/lower sums are well-defined finite numbers. Fix ε>0\varepsilon > 0. Let ε′=ε/v(R)>0\varepsilon' = \varepsilon / v(R) > 0 (where v(R)=∏i(bi−ai)>0v(R) = \prod_i (b_i - a_i) > 0 is the volume of RR; if one prefers to avoid dividing by v(R)v(R) one may equally use ε′=ε/(v(R)+1)\varepsilon' = \varepsilon/(v(R)+1), but here v(R)>0v(R)>0 so division is safe). By uniform continuity there is δ>0\delta > 0 such that ∥x−y∥<δ\|x-y\| < \delta implies ∣f(x)−f(y)∣<ε′|f(x)-f(y)| < \varepsilon' for all x,y∈Rx, y \in R. Choose a partition PP of RR fine enough that every sub-rectangle Q∈Q(P)Q \in \mathcal{Q}(P) has diameter diam⁡(Q)<δ\operatorname{diam}(Q) < \delta. (This is possible: partition each side [ai,bi][a_i,b_i] into equal sub-intervals of length less than δ/n\delta/\sqrt{n}; then every sub-rectangle has diameter at most ∑i(δ/n)2=δ\sqrt{\sum_i (\delta/\sqrt n)^2} = \delta; refine slightly, e.g. use length <δ/(2n)<\delta/(2\sqrt n), to get strict inequality.) For each sub-rectangle Q∈Q(P)Q \in \mathcal{Q}(P), QQ is itself closed and bounded, hence compact, and ff is continuous, so ff attains a maximum and a minimum on QQ at some points xQmax⁡,xQmin⁡∈Qx_Q^{\max}, x_Q^{\min} \in Q (extreme value theorem on a compact set). Thus

MQ(f)=f(xQmax⁡),mQ(f)=f(xQmin⁡).M_Q(f) = f(x_Q^{\max}), \qquad m_Q(f) = f(x_Q^{\min}).

Since xQmax⁡,xQmin⁡∈Qx_Q^{\max}, x_Q^{\min} \in Q and diam⁡(Q)<δ\operatorname{diam}(Q) < \delta, we have ∥xQmax⁡−xQmin⁡∥<δ\|x_Q^{\max} - x_Q^{\min}\| < \delta, so by uniform continuity

MQ(f)−mQ(f)=f(xQmax⁡)−f(xQmin⁡)<ε′.M_Q(f) - m_Q(f) = f(x_Q^{\max}) - f(x_Q^{\min}) < \varepsilon'.

Therefore

U(f,P)−L(f,P)=∑Q∈Q(P)(MQ(f)−mQ(f))v(Q)<ε′∑Q∈Q(P)v(Q)=ε′⋅v(R)=ε,U(f,P) - L(f,P) = \sum_{Q \in \mathcal{Q}(P)} \big(M_Q(f) - m_Q(f)\big) v(Q) < \varepsilon' \sum_{Q \in \mathcal{Q}(P)} v(Q) = \varepsilon' \cdot v(R) = \varepsilon,

using that the sub-rectangle volumes sum exactly to v(R)v(R) (additivity of volume across a partition of RR, the same fact used in the Refinement Lemma, applied to the whole rectangle RR instead of a sub-piece QQ). We have produced, for arbitrary ε>0\varepsilon > 0, a partition PP with U(f,P)−L(f,P)<εU(f,P) - L(f,P) < \varepsilon. By Riemann's Criterion for Integrability, ff is integrable on RR. ■\blacksquare

∎

Worked examples

Example 1: A genuinely two-dimensional continuous function, computed from the definition. Let R=[0,1]×[0,2]⊂R2R = [0,1] \times [0,2] \subset \mathbb{R}^2 and f(x,y)=x+2yf(x,y) = x + 2y. This is continuous, hence integrable by the theorem above; we verify the value using Riemann sums directly (without invoking Fubini, which is not yet available). Partition [0,1][0,1] into nn equal sub-intervals of length 1/n1/n and [0,2][0,2] into nn equal sub-intervals of length 2/n2/n, giving n2n^2 sub-rectangles

Qjk=[j−1n,jn]×[2(k−1)n,2kn],j,k=1,…,n,Q_{jk} = \left[\tfrac{j-1}{n}, \tfrac{j}{n}\right] \times \left[\tfrac{2(k-1)}{n}, \tfrac{2k}{n}\right], \qquad j,k = 1,\dots,n,

each of volume v(Qjk)=1n⋅2n=2n2v(Q_{jk}) = \dfrac{1}{n}\cdot\dfrac{2}{n} = \dfrac{2}{n^2}. Since f(x,y)=x+2yf(x,y) = x+2y is increasing in both xx and yy, its maximum on QjkQ_{jk} occurs at the corner with largest xx and largest yy, namely (j/n, 2k/n)(j/n,\, 2k/n), and its minimum at ( (j−1)/n, 2(k−1)/n )(\,(j-1)/n,\ 2(k-1)/n\,). So

MQjk=jn+2⋅2kn=j+4kn,mQjk=j−1n+2⋅2(k−1)n=(j−1)+4(k−1)n.M_{Q_{jk}} = \frac{j}{n} + 2\cdot\frac{2k}{n} = \frac{j + 4k}{n}, \qquad m_{Q_{jk}} = \frac{j-1}{n} + 2\cdot\frac{2(k-1)}{n} = \frac{(j-1)+4(k-1)}{n}.

Upper sum:

U(f,Pn)=∑j=1n∑k=1nj+4kn⋅2n2=2n3∑j=1n∑k=1n(j+4k).U(f,P_n) = \sum_{j=1}^n \sum_{k=1}^n \frac{j+4k}{n}\cdot \frac{2}{n^2} = \frac{2}{n^3}\sum_{j=1}^n\sum_{k=1}^n (j + 4k).

Compute the double sum:

∑j=1n∑k=1n(j+4k)=∑j=1n(nj+4⋅n(n+1)2)=n⋅n(n+1)2+2n2(n+1)=n2(n+1)2+2n2(n+1).\sum_{j=1}^n\sum_{k=1}^n (j+4k) = \sum_{j=1}^n\left( nj + 4\cdot\frac{n(n+1)}{2}\right) = n\cdot\frac{n(n+1)}{2} + 2n^2(n+1) = \frac{n^2(n+1)}{2} + 2n^2(n+1).
=n2(n+1)(12+2)=5n2(n+1)2.= n^2(n+1)\left(\frac12 + 2\right) = \frac{5n^2(n+1)}{2}.

So

U(f,Pn)=2n3⋅5n2(n+1)2=5(n+1)n=5+5n.U(f,P_n) = \frac{2}{n^3}\cdot \frac{5n^2(n+1)}{2} = \frac{5(n+1)}{n} = 5 + \frac{5}{n}.

Lower sum: replace j→j−1j \to j-1, k→k−1k\to k-1 in the roles above; by the same computation shifted,

∑j=1n∑k=1n((j−1)+4(k−1))=∑j=0n−1∑k=0n−1(j+4k)=5(n−1)2n2⋅1n∣redo directly:\sum_{j=1}^n\sum_{k=1}^n \big((j-1)+4(k-1)\big) = \sum_{j=0}^{n-1}\sum_{k=0}^{n-1}(j+4k) = \frac{5(n-1)^2 n}{2}\cdot\frac{1}{n}\Big|_{\text{redo directly:}}

Let's redo cleanly: with j′=j−1,k′=k−1j' = j-1, k'=k-1 ranging over 0,…,n−10,\dots,n-1,

∑j′=0n−1∑k′=0n−1(j′+4k′)=∑j′=0n−1(nj′+4⋅(n−1)n2)=n⋅(n−1)n2+2n(n−1)n=n2(n−1)2+2n2(n−1)\sum_{j'=0}^{n-1}\sum_{k'=0}^{n-1}(j'+4k') = \sum_{j'=0}^{n-1}\left(n j' + 4\cdot\frac{(n-1)n}{2}\right) = n\cdot\frac{(n-1)n}{2} + 2n(n-1)n = \frac{n^2(n-1)}{2} + 2n^2(n-1)
=n2(n−1)(12+2)=5n2(n−1)2.= n^2(n-1)\left(\frac12+2\right) = \frac{5n^2(n-1)}{2}.

So

L(f,Pn)=2n3⋅5n2(n−1)2=5(n−1)n=5−5n.L(f,P_n) = \frac{2}{n^3}\cdot \frac{5n^2(n-1)}{2} = \frac{5(n-1)}{n} = 5 - \frac{5}{n}.

As n→∞n\to\infty, U(f,Pn)→5U(f,P_n) \to 5 and L(f,Pn)→5L(f,P_n) \to 5, and U(f,Pn)−L(f,Pn)=10/n→0U(f,P_n) - L(f,P_n) = 10/n \to 0, consistent with Riemann's Criterion. Both sequences squeeze to 55, so

∫R(x+2y) dx dy=5.\int_R (x+2y)\, dx\,dy = 5.

(Sanity check by elementary geometry: ∫Rf=∫Rx dA+2∫Ry dA\int_R f = \int_R x\,dA + 2\int_R y \, dA. The average value of xx over [0,1][0,1] is 1/21/2 and area of RR is 22, contributing 12⋅2=1\tfrac12\cdot 2 = 1; the average value of yy over [0,2][0,2] is 11, contributing 2⋅1⋅2=42\cdot 1 \cdot 2 = 4. Total 1+4=51+4=5, matching.)

Example 2: Riemann's Criterion applied to a discontinuous function. Let R=[0,1]×[0,1]R = [0,1]\times[0,1] and define

f(x,y)={1if x is rational0if x is irrational,f(x,y) = \begin{cases} 1 & \text{if } x \text{ is rational} \\ 0 & \text{if } x \text{ is irrational,} \end{cases}

independent of yy (a two-dimensional analogue of Dirichlet's function, discontinuous at every point). We show directly, via Riemann's Criterion, that ff is not integrable on RR — illustrating that the criterion is a genuine tool for disproving integrability, not just proving it. Let P=(P1,P2)P = (P_1,P_2) be any partition of RR, with P1P_1 dividing [0,1][0,1] into sub-intervals I1,…,IpI_1,\dots,I_p and P2P_2 dividing [0,1][0,1] into J1,…,JqJ_1,\dots,J_q. Each sub-rectangle is Qab=Ia×JbQ_{ab} = I_a \times J_b. Every non-degenerate interval IaI_a (having positive length) contains both rational and irrational points (density of Q\mathbb{Q} and R∖Q\mathbb{R}\setminus\mathbb{Q} in R\mathbb{R}), so

MQab(f)=sup⁡Qabf=1,mQab(f)=inf⁡Qabf=0M_{Q_{ab}}(f) = \sup_{Q_{ab}} f = 1, \qquad m_{Q_{ab}}(f) = \inf_{Q_{ab}} f = 0

for every a,ba,b. Hence

U(f,P)=∑a,b1⋅v(Qab)=v(R)=1,L(f,P)=∑a,b0⋅v(Qab)=0.U(f,P) = \sum_{a,b} 1\cdot v(Q_{ab}) = v(R) = 1, \qquad L(f,P) = \sum_{a,b} 0 \cdot v(Q_{ab}) = 0.

This holds for every partition PP, so ∫R‾f=inf⁡PU(f,P)=1\overline{\int_R} f = \inf_P U(f,P) = 1 while ∫R‾f=sup⁡PL(f,P)=0\underline{\int_R} f = \sup_P L(f,P) = 0. Since 1≠01 \neq 0, Riemann's Criterion fails for every ε<1\varepsilon < 1: no partition can make U(f,P)−L(f,P)<εU(f,P) - L(f,P) < \varepsilon once ε≤1\varepsilon \le 1 is impossible to beat, and indeed U(f,P)−L(f,P)=1U(f,P)-L(f,P) = 1 always. So ff is not Riemann integrable on RR.

CounterexampleBoundedness cannot be dropped

The Riemann integral over a rectangle is defined only for bounded functions f:R→Rf: R \to \mathbb{R} — this hypothesis is essential, not a technicality, because upper and lower sums require MQ(f)=sup⁡QfM_Q(f) = \sup_Q f and mQ(f)=inf⁡Qfm_Q(f) = \inf_Q f to be finite real numbers. To see what breaks without it, let R=[0,1]×[0,1]R = [0,1] \times [0,1] and define

f(x,y)={1xif x>00if x=0.f(x,y) = \begin{cases} \dfrac{1}{x} & \text{if } x > 0 \\ 0 & \text{if } x = 0. \end{cases}

This ff is unbounded on RR: as x→0+x \to 0^+, f(x,y)→∞f(x,y) \to \infty for every fixed yy. Take any partition PP of RR. The sub-rectangles QQ meeting the edge {0}×[0,1]\{0\} \times [0,1] (i.e. those whose first-coordinate interval is [0,t][0, t] for some t>0t>0) contain points with xx arbitrarily close to 00, so sup⁡Qf=+∞\sup_Q f = +\infty on every such QQ. Consequently MQ(f)v(Q)M_Q(f) v(Q) is not a finite number (it is +∞+\infty times a positive number), so the upper sum U(f,P)=+∞U(f,P) = +\infty for every partition PP — the supremum-based construction simply does not produce a real number. One might try to patch this by declaring ∫R‾f=+∞\overline{\int_R} f = +\infty and salvaging a one-sided notion, but then the entire "squeeze UU and LL together" machinery of Riemann's Criterion collapses: U(f,P)−L(f,P)U(f,P) - L(f,P) is undefined (it is ∞−L(f,P)\infty - L(f,P)), so the criterion cannot even be stated, let alone be used to establish integrability. This is exactly why boundedness is listed as a standing hypothesis on ff in the definition, before partitions are ever introduced. (Such functions can sometimes be handled by improper multiple integrals, a separate construction taking limits of integrals over shrinking sub-rectangles, but that is not the Riemann integral defined here.)

Scope, edge cases & common traps

SituationWhat holdsWhat can fail
ff continuous on closed rectangle RRAlways integrable (theorem above)—
ff bounded with finitely many discontinuities on RR (n=1 case, or measure-zero discontinuity sets in general)Still integrable (a stronger theorem, via Lebesgue's criterion, not proved here)Requires the discontinuity set to be "small" (measure zero)
ff bounded but discontinuous on a "thick" set (e.g. Example 2's Dirichlet-type function)—Integrability can fail entirely
ff unbounded on RR—Riemann integral is not even defined; see counterexample
RR not closed or not bounded (e.g. open or infinite rectangle)—Compactness argument fails; extreme values may not be attained, uniform continuity may fail
Refining a partitionUpper sums decrease (weakly), lower sums increase (weakly)Common refinement is essential to compare two different partitions meaningfully

The mathematician behind it

Origins · 1 minBernhard Riemann and how this was discovered
BR
Bernhard Riemann
1826–1866 · 19th-century Göttingen, foundations of analysis and geometry

Georg Friedrich Bernhard Riemann was a German mathematician whose 1854 habilitation lecture and related work laid the rigorous groundwork for what is now called the Riemann integral, generalizing Cauchy's earlier integral for continuous functions to a broader class defined via oscillation of a function on partition elements. Riemann's approach — controlling the difference between upper-type and lower-type approximating sums — is exactly the mechanism formalized in the upper/lower sum definitions used here, later sharpened into the modern Darboux formulation by Jean-Gaston Darboux. Riemann's short life produced foundational results across analysis, differential geometry (Riemannian manifolds), and number theory (the Riemann zeta function and hypothesis), and his integral remains the standard first rigorous notion of integration taught before measure-theoretic integration.

History
- 1854 — Riemann's habilitation thesis at Göttingen introduces a rigorous integrability criterion for functions with possibly infinitely many discontinuities.
- 1875 — Jean-Gaston Darboux reformulates Riemann's integral using upper and lower sums (the presentation used in this article), clarifying the original oscillation-based definition.
- 1902 — Henri Lebesgue introduces measure-theoretic integration, later yielding the precise characterization (Lebesgue's criterion) of which bounded functions are Riemann integrable, in terms of the measure-zero size of the discontinuity set.
- Early 20th century — the Riemann integral over rectangles in Rn\mathbb{R}^n, alongside Fubini's theorem (1907, Guido Fubini) for reducing multiple integrals to iterated one-variable integrals, becomes standard in multivariable calculus curricula.
- Mid-to-late 20th century — the rectangle-based Riemann/Darboux construction becomes the universal pedagogical entry point to multivariable integration, with extension to general (non-rectangular) regions handled by extending functions by zero.
What exactly is a "sub-rectangle" and why must the sides be partitioned independently?

A sub-rectangle is one cell of the grid formed by choosing one sub-interval from each side's partition and taking their Cartesian product. Partitioning each side independently (rather than, say, choosing a single mesh size for the whole rectangle) is what allows the grid to be refined unevenly — finer in directions or regions where ff oscillates more, coarser elsewhere. This flexibility is essential for the "for every ε\varepsilon there exists a partition" structure of Riemann's Criterion: sometimes no uniform grid works efficiently, but a cleverly shaped one does. In nn dimensions the sub-rectangles tile RR exactly, with pairwise disjoint interiors, which is what makes volumes additive across the partition — a fact used repeatedly in the refinement lemma and the continuity theorem.

Is the upper integral always at least as large as the lower integral, even for non-integrable functions?

Yes. This is exactly the Corollary proved from the Refinement Lemma: for any bounded ff on a rectangle RR, one always has ∫R‾f≤∫R‾f\underline{\int_R} f \le \overline{\int_R} f, regardless of whether the two sides are equal. The proof only uses that any two partitions have a common refinement, and refining pushes lower sums up and upper sums down. Equality of the two sides is the extra condition that defines integrability; the inequality itself is unconditional and holds even for wild functions like the Dirichlet-type example, where it becomes the strict inequality 0<10 < 1.

Does continuity everywhere except at a few points still guarantee integrability?

Yes, but this is a stronger and separate theorem not proved in this article: a bounded function on a closed rectangle is Riemann integrable if its set of discontinuities has Lebesgue measure zero (Lebesgue's criterion for Riemann integrability). Continuity everywhere, proved here, is the special case where the discontinuity set is empty. Finitely many discontinuities, or discontinuities along finitely many line segments in R2\mathbb{R}^2, still constitute a measure-zero set, so such functions remain integrable — but this requires measure-theoretic machinery beyond the compactness/uniform-continuity argument given here.

How does this definition connect to the later Fubini's Theorem?

This article defines ∫Rf\int_R f as a single number obtained directly from nn-dimensional partitions and sums — it says nothing yet about computing that number via nested single-variable integrals. Fubini's Theorem is the separate (and computationally crucial) result that, under mild hypotheses, this nn-dimensional integral equals an iterated integral, e.g. ∫Rf=∫a1b1 ⁣(∫a2b2f(x,y) dy)dx\int_R f = \int_{a_1}^{b_1}\!\left(\int_{a_2}^{b_2} f(x,y)\,dy\right) dx for n=2n=2. Riemann's Criterion proved here is typically a key ingredient in proving Fubini's Theorem, because one needs to know the multiple integral exists before showing it matches the iterated one.

Why can't we just define the integral using only one partition, say the "obvious" uniform grid?

Using only uniform grids and taking a limit as the mesh size shrinks to 00 does, in fact, give the same integral when ff is integrable — this is a standard equivalent formulation. But the definition via upper/lower sums over all partitions is more fundamental because it directly produces a genuine number (the upper integral, an infimum, and lower integral, a supremum) without needing to first prove a limit exists. It also makes the non-integrability proofs (like Example 2) airtight: showing some clever partition fails is not enough to prove non-integrability, but showing every partition gives the same fixed gap is exactly what the all-partitions definition demands and what Example 2 verifies.

Does the theorem require RR to be a "rectangle" in the strict sense, or does it work for other shapes?

The construction here is specific to rectangles (products of closed intervals) because partitioning each side independently is what produces the grid of sub-rectangles with cleanly additive volumes. For more general bounded regions D⊂RnD \subset \mathbb{R}^n, one typically extends the integrand ff by zero to a rectangle R⊇DR \supseteq D and integrates the extended function over RR — this is exactly the strategy used in Integrals over General Regions, and it relies on the rectangle theory developed here as its foundation.

What role does compactness play beyond just "RR is closed and bounded"?

Compactness (via Compactness in R^n) is used twice in the continuity theorem: first, to guarantee that continuous ff is uniformly continuous on RR (not merely continuous at each point), which is what lets a single δ\delta work for the entire rectangle simultaneously; second, to guarantee that ff attains an actual maximum and minimum on each closed sub-rectangle QQ (extreme value theorem), so that MQ(f)M_Q(f) and mQ(f)m_Q(f) are honest function values whose difference can be bounded using uniform continuity. Without compactness, both of these could fail, as illustrated by unbounded or open domains where suprema/infima are not attained or are infinite.

Before this

Where this leads