About the double integral. In my text book it says that the volume between the some region $R$ in the $xy$ plane and the surface $z=f(x,y)$ can be found by calculating $$\iint_D f(x,y)~dxdy$$
yet in the next page it uses this formula to calculate an area in the $xy$ plane not a volume under a surface why is this the case I don't see how they go from talking about volume to talking about area.
It also says the volume can be calculated as follows:
$$\iiint_S dxdydz $$ but I don't understand why this is the case also I thought we needed $z=f(x,y)$ to calculate the volume not $\omega=f(x,y,z)$ as surely this would be some other quantity in $4$ dimensions, not a volume?
Please help me clear this up thanks.
 A: $$\iint _D 1 dxdy$$
I believe writing the number one explicitly will help you understand it. If you integrate number one over a surface, you will find the surface area.
$$\iint _D f(x,y) dxdy$$
If you integrate $z=f(x,y)$ over an area, you will find the volume under the surface defined by function $z=f(x,y)$. However this is a very restrictive method. $f(x,y)$ must be a function, that takes a single value for any pair $(x,y)$
$$\iiint _s 1 dxdydz$$
This will make you find the volume
$$\iiint _s f(x,y,z) dxdydz$$
This will make you find some property of the volume. Consider density. "mass per unit volume". Density of an object can be a function of $(x,y,z)$. If you integrate it over a volume, you will find the total mass. You can consider this to be the 3 dimensional analogue of $\iint _D f(x,y) dxdy$. We called this finding the volume under a surface, and what we just did for density could be called "finding * some 4th dimension quantity* of a volume"
A: This is a simple application of Fubbini's theorem, because
$$\iiint_S 1 dxdydz = \iint_{D} \int_{0}^{f(x,y)} 1 dz dxdy = \iint_D f(x,y) dx dy$$
