A Riemann sum is a sum of the signed areas of a collection of rectangles, each of the same uniform width, and each with a height determined by the graph of a function \(f.\) A Riemann sum approximates the area of the region bound by the graph and the \(x\)-axis between \({x=a}\) and \({x=b;}\) the more rectangles considered in the Riemann sum, the better the approximation will be. The area is signed in the sense that any rectangle with negative height will have a negative area.
For a Riemann sum with \(n\) rectangles, the interval \([a,b]\) is partitioned
into \(n\) subintervals, each with the same width \(h = \tfrac{1}{n}(b\!-\!a).\)
There are various conventions for how each rectangle’s height is chosen.
Letting the rectangle’s height be the function’s value
at the left-endpoint of its base results in a left-endpoint Riemann sum.
Alternatively, letting the rectangle’s height be the right-endpoint
results in a right-endpoint Riemann sum.
For large values of \(n\) (many many rectangles)
this sum is unwieldy to write, so we use sigma summation notation.
\[ \sum_{i=1}^{n} \bigl(f(a+ih) \times h\bigr) \quad\text{for}\;\; h = \frac{b-a}{n}\,. \]
The units of the Riemann sum will be the product of the units of the variables \(x\) and \(y.\) E.g. if \(x\) is measured in feet-per-second and \(y\) is measured in seconds, then the Riemann sum (area) will have units feet.