Consider a surface $f(x,y)$; you might temporarily think of this as representing physical topography—a hilly landscape, perhaps. What is the average height of the surface (or average altitude of the landscape) over some region?

As with most such problems, we start by thinking about how we might approximate the answer. Suppose the region is a rectangle, $[a,b]\times[c,d]$. We can divide the rectangle into a grid, $m$ subdivisions in one direction and $n$ in the other, as indicated in figure 15.1.1. We pick $x$ values $x_0$, $x_1$,…, $x_{m-1}$ in each subdivision in the $x$ direction, and similarly in the $y$ direction. At each of the points $(x_i,y_j)$ in one of the smaller rectangles in the grid, we compute the height of the surface: $f(x_i,y_j)$. Now the average of these heights should be (depending on the fineness of the grid) close to the average height of the surface: $${f(x_0,y_0)+f(x_1,y_0)+\cdots+f(x_0,y_1)+f(x_1,y_1)+\cdots+ f(x_{m-1},y_{n-1})\over mn}.$$

As both $m$ and $n$ go to infinity, we expect this approximation to converge to a fixed value, the actual average height of the surface. For reasonably nice functions this does indeed happen.

Figure 15.1.1. A rectangular subdivision of $[a,b]\times[c,d]$.

Using sigma notation, we can rewrite the approximation: \eqalign{ {1\over mn}\sum_{i=0}^{n-1}\sum_{j=0}^{m-1}f(x_j,y_i) &={1\over(b-a)(d-c)}\sum_{i=0}^{n-1}\sum_{j=0}^{m-1}f(x_j,y_i) {b-a\over m}{d-c\over n}\cr &= {1\over(b-a)(d-c)}\sum_{i=0}^{n-1}\sum_{j=0}^{m-1}f(x_j,y_i)\Delta x\Delta y.\cr } The two parts of this product have useful meaning: $(b-a)(d-c)$ is of course the area of the rectangle, and the double sum adds up $mn$ terms of the form $f(x_j,y_i)\Delta x\Delta y$, which is the height of the surface at a point times the area of one of the small rectangles into which we have divided the large rectangle. In short, each term $f(x_j,y_i)\Delta x\Delta y$ is the volume of a tall, thin, rectangular box, and is approximately the volume under the surface and above one of the small rectangles; see figure 15.1.2. When we add all of these up, we get an approximation to the volume under the surface and above the rectangle $R=[a,b]\times[c,d]$. When we take the limit as $m$ and $n$ go to infinity, the double sum becomes the actual volume under the surface, which we divide by $(b-a)(d-c)$ to get the average height.