A function is said to be convex on an interval if the line segment between any two points on the graph of the function lies above the graph. In other words, a function is convex if its second derivative is non-negative. A function is said to be concave on an interval if the line segment between any two points on the graph of the function lies below the graph. In other words, a function is concave if its second derivative is non-positive.