Help Visualizing the double integral I understand that the double integral is

However what confuses me is when I try to visualize why this formula only accounts for the region inside the bounds and not the whole rectangular region.

My guess is it has to do with one of the bounds being (x) but I have a hard time visualizing that. Could someone maybe give me the 2 variable analog to this equation of the single integral, and show how it only looks at points within the specified region

 A: The formula in your first picture seems to refer to double integrals over rectangles only. But if you know how to integrate over a rectangle, you can define the double integral over a non-rectangular bounded set $M$ by taking a rectangle $D$ which contains $M$, setting
$$
g(x,y) =
\begin{cases}
f(x,y), & (x,y) \in M
,\\
0, & \text{otherwise}
,
\end{cases}
$$
and defining
$$
\iint_M f(x,y) \, dxdy := \iint_D g(x,y) \, dxdy
$$
(provided that the integral on the right-hand side exists).
A: 
The equation works for non rectangular regions because dy or dx can be a function of x and y itself meaning the height and width of your rectangles dydx changes based on were you evaluate your point, thus only accounting for the area inside the the region as n goes to infinty.
A: To illustrate Hans' (+1) answer:

Extending the integrand by $0$ outside the triangle of integration gives us a function whose Riemann sums we can compute. The darker gray squares represent the contributions where the integrand is given by a piecewise formula (i.e., not by $f(x, y)$ or by $0$). The total contribution from these squares is negligible in the limit as the mesh of the partition goes to $0$.
As for the variable limits of integration, the terms of the Riemann sum where $x < y$ (i.e., the lighter-shaded squares) are zero. We can think of including those terms in the Riemann sum (because $f(x_{i}, y_{j}) = 0$), or we can omit those terms by summing only over the unshaded and darker-shaded squares. Either way, in the limit as the mesh decreases we obtain the stated iterated integral. For each $x$, the integral over $0 \leq y \leq x$ is approximated by the Riemann sum over the blue slice.
