Here, you can see a function with its lower sum and upper sum on the interval [A, B].
1) Drag the endpoints A and B of the interval. What characteristics of the rectangles of the (a) upper sum, (b) lower sum do you see?
2) Now, change the number of rectangles n by moving the slider. How does this affect the difference between lower and upper sum?