Why Rectangle Differences Need Care
Rectangles are the basic sets used to build measures on product spaces. Their intersections are again rectangles, but their differences need not be a single rectangle. The useful property is more precise: the difference of two measurable rectangles can be written as a finite disjoint union of measurable rectangles. This is the defining feature that makes rectangles a semiring.
Let \((X,\mathcal{M})\) and \((Y,\mathcal{N})\) be measurable spaces, and write \(\mathcal{M}\otimes\mathcal{N}=\sigma(\{A\times B:A\in\mathcal{M},\,B\in\mathcal{N}\})\) for the product sigma-algebra on \(X\times Y\). The measurable rectangles are the sets \(A\times B\) with \(A\in\mathcal{M}\) and \(B\in\mathcal{N}\). No measure is needed in this tutorial, so finiteness, sigma-finiteness, and completeness are not assumptions. The set identities below hold for arbitrary measurable spaces.
For measurable rectangles, the intersection calculation is immediate from membership in a Cartesian product. The difference calculation has two parts: remove the portion whose first coordinate lies in the second rectangle, then remove the remaining portion whose second coordinate lies in it. The resulting pieces do not overlap.
The Set Identities
Proof. A point \((x,y)\in X\times Y\) belongs to \((A\times B)\cap(C\times D)\) exactly when \(x\in A\), \(y\in B\), \(x\in C\), and \(y\in D\). These conditions are equivalent to \(x\in A\cap C\) and \(y\in B\cap D\), proving the intersection identity.
For the difference identity, take \((x,y)\in(A\times B)\setminus(C\times D)\). Then \(x\in A\) and \(y\in B\), and it is not the case that both \(x\in C\) and \(y\in D\). If \(x\notin C\), the point belongs to \((A\setminus C)\times B\). If \(x\in C\), the fact that \((x,y)\notin C\times D\) forces \(y\notin D\), so the point belongs to \((A\cap C)\times(B\setminus D)\). Conversely, a point in either displayed piece belongs to \(A\times B\) and fails at least one of the two coordinate conditions for membership in \(C\times D\). It therefore belongs to the difference. A point in the first piece has \(x\notin C\), whereas a point in the second has \(x\in C\); hence the pieces are disjoint. Since \(\mathcal{M}\) and \(\mathcal{N}\) are sigma-algebras, all four coordinate sets used in the two pieces are measurable. Thus the pieces are measurable rectangles; if a coordinate set is empty, its rectangle is simply \(\varnothing\). \(\square\)
The formula separates the possibilities according to the first coordinate. Points whose first coordinate is outside \(C\) remain in the difference regardless of their second coordinate. For first coordinates inside \(C\), the second coordinate must be outside \(D\). This partition is why the two pieces are disjoint.
Worked Example: Difference of Two Half-Open Rectangles
Work in \((\mathbb{R},\mathcal{B}_{\mathbb{R}})\) for each coordinate, and let \(R=[0,4)\times[0,3)\) and \(S=[1,3)\times[1,2)\). All intervals here are half-open: for example, \(1\in[1,3)\) but \(3\notin[1,3)\). Compute \(R\cap S\) and \(R\setminus S\).
For the intersection, the first-coordinate intersection is \([0,4)\cap[1,3)=[1,3)\), and the second-coordinate intersection is \([0,3)\cap[1,2)=[1,2)\). Therefore \(R\cap S=[1,3)\times[1,2)\).
For the difference formula, the first-coordinate pieces are \(A\setminus C=[0,4)\setminus[1,3)=[0,1)\cup[3,4)\) and \(A\cap C=[1,3)\). The second-coordinate difference is \(B\setminus D=[0,3)\setminus[1,2)=[0,1)\cup[2,3)\). Distributing these finite unions gives
These four rectangles are pairwise disjoint: the first two have disjoint first-coordinate intervals, and the last two have disjoint second-coordinate intervals; either of the first two is disjoint from either of the last two because their first-coordinate intervals do not overlap. Check: \((0,1.5)\) lies in \(R\setminus S\) and in the first rectangle, while \((2,1.5)\) lies in \(S\) and in none of the four pieces. At the boundary, \(x=3\) is included in the second piece because \(3\in[3,4)\); \(y=2\) is included in the fourth piece because \(2\in[2,3)\).
Why the Rectangle Family Is a Semiring
Proof. The sets \(\varnothing\in\mathcal{M}\) and \(Y\in\mathcal{N}\) give \(\varnothing=\varnothing\times Y\in\mathcal{R}\). If \(Y=\varnothing\), the same identity still holds. For any \(A\times B,C\times D\in\mathcal{R}\), the intersection identity in the proposition expresses their intersection as \((A\cap C)\times(B\cap D)\), which belongs to \(\mathcal{R}\) because \(A\cap C\in\mathcal{M}\) and \(B\cap D\in\mathcal{N}\). The difference identity expresses \((A\times B)\setminus(C\times D)\) as a union of two disjoint members of \(\mathcal{R}\); an empty piece is allowed and can be omitted. Thus all three conditions in the definition of a semiring hold. No measure or finiteness assumption was used. \(\square\)
Worked Example: Difference on Finite Measurable Spaces
Let \(X=\{a,b,c,d\}\) and \(Y=\{u,v,w\}\), each with its full power-set sigma-algebra. Set \(A=\{a,b,c\}\), \(C=\{b,d\}\), \(B=\{u,v\}\), and \(D=\{v,w\}\). Compute the intersection and difference of \(A\times B\) and \(C\times D\).
The coordinate intersections are \(A\cap C=\{b\}\) and \(B\cap D=\{v\}\), so \((A\times B)\cap(C\times D)=\{b\}\times\{v\}=\{(b,v)\}\).
For the difference, \(A\setminus C=\{a,c\}\), \(A\cap C=\{b\}\), and \(B\setminus D=\{u\}\). The disjoint decomposition is therefore
The first piece has four ordered pairs and the second has one; the pieces are disjoint because their first coordinates lie in disjoint sets. The original rectangle \(A\times B\) has \(3\cdot2=6\) ordered pairs, and its intersection with \(C\times D\) has one. The difference has \(6-1=5\) ordered pairs, agreeing with the explicit list. This counting check verifies the decomposition without invoking a measure.
Worked Example: A Difference with an Empty Piece
In \((\mathbb{R},\mathcal{B}_{\mathbb{R}})\) in each coordinate, take \(R=[0,2)\times[0,2)\) and \(S=[-1,1)\times[-1,3)\). Compute the pieces in the difference formula, paying attention to the endpoint \(1\).
Here \(A\setminus C=[0,2)\setminus[-1,1)=[1,2)\), \(A\cap C=[0,1)\), and \(B\setminus D=[0,2)\setminus[-1,3)=\varnothing\). The formula gives
The second piece is empty because every \(y\in[0,2)\) also belongs to \([-1,3)\). The first piece is exactly the part of \(R\) whose first coordinate is not in \([-1,1)\). In particular, \(x=1\) is included in the difference: the interval \([-1,1)\) excludes \(1\), while \([1,2)\) includes it. As a check, the intersection is \([0,1)\times[0,2)\); together with the difference, it partitions \(R\) into two disjoint rectangles.
A Common Mistake and the Correct Partition
A tempting but incorrect rule is to subtract both coordinate sets at once and claim that the difference is \((A\setminus C)\times(B\setminus D)\). This keeps only points whose first and second coordinates both lie outside the corresponding sets. But a point in \(A\times B\) fails to belong to \(C\times D\) as soon as either coordinate condition fails; it does not need both to fail.
For the first worked example, that incorrect rule would retain only \(([0,1)\cup[3,4))\times([0,1)\cup[2,3))\). It misses, for instance, \((0,1.5)\): its first coordinate is outside \([1,3)\), so the point is in \(R\setminus S\), even though its second coordinate \(1.5\) is inside \([1,2)\). The correct decomposition assigns it to \([0,1)\times[0,3)\). The two-piece formula avoids this error by first taking all second coordinates when \(x\notin C\), and considering \(y\notin D\) only when \(x\in C\).
Another important point is that the decomposition must be disjoint. The two pieces in the formula are disjoint because their first-coordinate conditions, \(x\in A\setminus C\) and \(x\in A\cap C\), cannot hold together. Disjointness is part of the semiring condition, not a cosmetic feature: it lets later constructions assign content to a finite union by adding the contents of its pieces without double-counting.
What the Semiring Property Provides
The semiring property is a set-theoretic tool for constructing measures from rectangles. Intersections stay within the rectangle family, and differences can be resolved into a finite disjoint collection of rectangles. That structure is more flexible than requiring every difference to be a single rectangle, which is generally false. It is also different from being a sigma-algebra: the semiring conditions concern finite intersections and finite disjoint decompositions of differences, not arbitrary countable unions or complements.
For the measurable rectangles in \(X\times Y\), the proof used only the sigma-algebra properties of \(\mathcal{M}\) and \(\mathcal{N}\). It did not use measures on \(X\) or \(Y\), nor any assumption that such measures are finite or sigma-finite. When measures are introduced, this same decomposition will be useful for organizing finite unions and defining rectangle content consistently.
Check Your Understanding
Use the definitions and set identities above to answer the following questions.
- For \(A,C\in\mathcal{M}\) and \(B,D\in\mathcal{N}\), derive the formula for \((A\times B)\cap(C\times D)\) by testing membership of a point.
- Explain why the two rectangles in the difference decomposition are disjoint, even if some of their coordinate sets are empty.
- Suppose \(A\subseteq C\). Simplify the general formula for \((A\times B)\setminus(C\times D)\).
- In the finite-space example, list the ordered pairs in the intersection and verify that the intersection and difference partition \(A\times B\).
- Give a point that the incorrect formula \((A\setminus C)\times(B\setminus D)\) can miss, and state which correct piece contains it.