In mathematics, a Riemann sum is a certain kind of approximation of an integral by a finite sum. It is named after nineteenth century German mathematician Bernhard Riemann . One very common application is in numerical integration , i.e., approximating the area of functions or lines on a graph, where it is also known as the rectangle rule .