A Riemann sum approximates the area under a curve on by dividing the interval into subintervals of width and summing the areas of rectangles:
where is a sample point in the -th subinterval. Common choices:
- Left Riemann sum: .
- Right Riemann sum: .
- Midpoint rule: midpoint of subinterval (more accurate).
As (rectangles get arbitrarily thin), if is integrable, the Riemann sum converges to the definite integral:
This definition of the integral ties together discrete summation and continuous area, motivating the integral notation as a "stretched S" for sum. Riemann sums also underlie all numerical integration (trapezoidal rule, Simpson's rule).