What Are Convex And Concave Functions?
Convex and concave functions are classified by their chords, the straight segments joining two points on the graph. A function is convex on an interval when every chord lies on or above the graph between its endpoints, and concave when every chord lies on or below it. That is the answer to the common question "What are concave and convex functions?", and the formal statement below says exactly the same thing in symbols.
A function defined on an interval is convex on when, for all and in and every with ,
It is concave on when the inequality points the other way:
What each part means:
is a point between and ; as runs from to , it slides from to .
The left side is the height of the graph at that point.
The right side is the height of the chord at the same point, a weighted average of the two endpoint heights.
The function is strictly convex (or strictly concave) when the inequality is strict for every and every strictly between and . The domain must be an interval, because the definition needs every in-between point to exist. One more view connects this to geometry: is convex exactly when the region on and above its graph is a convex shape, with no dents.
Why Do Some Textbooks Say Concave Up Instead Of Convex?
"Convex" and "concave up" describe the same bowl shape; they come from two traditions that never agreed on one word. Most first-year calculus books, including OpenStax Calculus, say concave up and concave down. Analysis, optimization and economics texts say convex and concave. A few older or translated texts use a third pair, as the Wikipedia article on convex functions records.
Shape | Analysis, optimization, economics | Most calculus textbooks | Some older or translated texts |
|---|---|---|---|
Bowl, holds water | Convex | Concave up | Convex downward |
Dome, sheds water | Concave | Concave down | Convex upward |
This naming took a while to settle the first time: "convex downward" sounds like a dome, yet it names the bowl. The safe habit is to translate every term back to the chord picture before using it. In this article, convex always means the bowl and concave always means the dome.
How Do You Determine If A Function Is Convex Or Concave?
You can determine whether a function is convex or concave with any of three equivalent tests: the chord test, the tangent line test or the second derivative test. The chord test works for every function, the tangent test needs one derivative, and the second derivative test, the quickest, needs two.
Test 1: The Chord Test
The chord test is the definition itself, and it is the only one of the three that also works for functions with corners. For , subtract the graph height from the chord height:
For , both and are non-negative and , so the gap is never negative and is convex everywhere.
Test 2: The Tangent Line Test
A differentiable function is convex on an interval exactly when its graph lies on or above every one of its tangent lines there:
For a concave function the graph lies on or below every tangent. With and the tangent at , this gives the useful inequality for every real . If tangent line equations are new, that page builds from scratch.
Test 3: The Second Derivative Test
For a function that is twice differentiable on an open interval :
So the condition to check is . Actually, that is too strict: the test asks for , and zero is allowed. The function has second derivative , which is at , yet is not only convex but strictly convex. A strictly positive guarantees strict convexity, but strict convexity does not force to be strictly positive.
Why does the sign of decide the shape? A short proof sketch:
means is non-decreasing, the same idea as increasing and decreasing functions applied one level up.
Take . By the mean value theorem, the chord slope on equals and the chord slope on equals for some .
Since is non-decreasing, : the graph climbs no faster before than after it, which places on or below the chord from to .
Which Common Functions Are Convex Or Concave?
Most functions you meet are convex on some intervals and concave on others, so the honest answer always names the interval. The table lists the standard cases with the second derivative that settles each one.
Function | Second derivative | Verdict |
|---|---|---|
, (any even power) | , | Convex on all real numbers |
Not defined at | Convex (chord test; corner at ) | |
Strictly convex everywhere | ||
with , | Convex, even when decreasing () | |
Convex on , concave on | ||
Concave on all real numbers | ||
Concave on | ||
Concave on | ||
Both convex and concave | ||
Concave for , convex for , neither overall | ||
Concave on , convex on , neither overall |
Two entries correct claims that circulate online. A decreasing exponential such as is convex, not concave, because is positive whichever way the curve slopes. And is not a convex function on the real line; it switches between the two shapes every units.
What Properties Do Convex And Concave Functions Share?
Convex and concave functions mirror each other, so every property of one has a twin for the other. These are the properties competitors list and the ones problems actually use:
Negation swaps the type. is convex exactly when is concave, which is why most results are stated for convex functions only.
Sums and positive multiples stay convex. If and are convex and , then and are convex; is convex because both parts are.
The larger of two convex functions is convex. That is why is convex despite its corner.
A local minimum of a convex function is a global minimum. A convex function has no false bottoms: any low point you find is the lowest point on the interval, and the twin statement holds for the local maximum of a concave function. Finding those points is covered under maxima and minima.
Composition needs a direction condition. If is convex and is convex and non-decreasing, then is convex, which shows at once that is convex.
Convex functions on open intervals are continuous. A jump would break the chord inequality near the jump.
What Is Jensen's Inequality For Convex Functions?
Jensen's inequality says that for a convex function, the function of an average is at most the average of the function values. The two-point version with equal weights is the chord definition at :
The general version allows any number of points and any weights that are non-negative and add up to :
For a concave function the inequality reverses. With and equal weights , the two-point form gives , the first step of the root-mean-square inequality you may meet later. The Wikipedia article on Jensen's inequality shows how the arithmetic mean and geometric mean inequality drops out of the concavity of , which Example 5 below carries out with numbers.
The Mathematicians Behind Convex And Concave Functions
Johan Ludwig William Valdemar Jensen (1859 to 1925, Denmark) worked for the Copenhagen telephone company for most of his life and did mathematics in his spare time, according to his MacTutor biography. In 1906 he published the inequality for convex functions that now carries his name, showing that many classical inequalities are special cases of one statement about convexity.
How Are Convex And Concave Functions Different?
Convex and concave functions are opposites in every test: whatever holds for one holds with the inequality flipped for the other. The difference also decides how they behave in optimization, the second half of a common question about the two.
Feature | Convex function | Concave function |
|---|---|---|
Shape | Bowl (concave up) | Dome (concave down) |
Chord | On or above the graph | On or below the graph |
Tangent lines | On or below the graph | On or above the graph |
Second derivative | ||
First derivative | non-decreasing | non-increasing |
Guaranteed extreme | Any local minimum is global | Any local maximum is global |
Jensen's inequality | ||
Typical examples | , , | , , |
Examples Of Convex And Concave Functions
Each example answers a version of the standard exercise: show whether a function is convex, concave or neither, and on which interval.
Example 1
Show that is convex on all real numbers.
Since for every , the function is strictly convex.
Final answer: is strictly convex on .
Example 2
Decide whether is convex or concave.
The tempting argument goes: the graph falls from left to right, so it must bend downward, so it is concave. Test that claim with a chord from to , at the midpoint :
The graph height sits below the chord height , which is what a convex function does, so the concave guess has already failed. The slope tells you the direction of travel; it says nothing about the bending. The second derivative settles it for every :
Final answer: is strictly convex on all real numbers, even though it is decreasing.
Example 3
Find where is convex and where it is concave.
The second derivative is negative for and positive for .
Final answer: concave on , convex on , and neither on the whole real line.
The first instinct with a cubic is to give one verdict for the whole function. A cubic always switches shape once, so the only correct answer names the two intervals.
Example 4
Show that is concave and use its tangent at to prove for .
So is concave on . The tangent at has slope and passes through :
A concave graph lies on or below its tangents, so
Final answer: is concave on and for all , with equality only at .
Example 5
Use Jensen's inequality to show that for positive , , , and check it with , , .
Because is concave, Jensen's inequality with weights points the other way:
The natural logarithm is increasing, so the inequality between the logarithms carries over to the numbers themselves. Check:
Final answer: the arithmetic mean is at least the geometric mean; here .
Example 6
A shop's weekly profit is for items. Show that the critical point gives the largest possible profit.
is concave on its whole domain, so any local maximum is the global maximum. Setting gives .
Final answer: the profit is greatest at items, where it equals , and concavity guarantees no other quantity does better.
Why Do Convex And Concave Functions Matter? "One Bottom, With Nowhere Else To Hide"
Convexity exists to answer a question every optimizer faces: is the low point I found the lowest one, or just a dip? For a convex function the answer is always yes, so a search that keeps going downhill cannot get stuck in a false valley. That single guarantee is why the idea earns a name of its own.
It turns local answers into global ones. Example 6 needed one critical point and one sign check; without concavity, every other quantity would have to be compared by hand.
It produces inequalities for free. Jensen's inequality, the tangent line test and the chord test each turn one shape fact into a family of inequalities such as and the arithmetic and geometric mean inequality.
It models diminishing returns. A concave curve rises, but each extra unit adds less than the one before, which is how output, satisfaction and many learning curves behave.
Where Are Convex And Concave Functions Used?
Convex and concave functions are used wherever a best choice has to be found or a diminishing effect has to be modelled.
Optimization problems. Most optimization problems in a first course quietly rely on a convex cost or a concave profit, so the critical point found is the true optimum.
Economics. Production functions are usually modelled as increasing and concave, the shape of diminishing returns, as the University of Toronto economics tutorial explains, and utility functions are drawn concave for the same reason. More of this appears under calculus in economics.
Machine learning. Training a model means minimizing an error function, and when that function is convex, as with a squared-error fit to a straight line, gradient descent cannot be trapped in a false minimum.
Finance and risk. A concave utility function, through Jensen's inequality, values a sure amount above a gamble with the same average, which is the mathematical form of risk aversion.
Why Do Students Get Convex And Concave Functions Wrong?
Most errors here come from trusting a picture or a word instead of the definition, and each one has a fast fix.
Mistake 1: Reading Convex As A Dome
Where it slips in: Moving between a calculus textbook (concave up) and an economics or optimization text (convex).
Don't do this: Assume "convex" means bulging upward like a dome because a convex lens bulges outward.
The correct way: Translate every term back to the chord picture: convex means the chord is on or above the graph, the bowl shape.
The memorizer is hit hardest here, because a memorized phrase like "convex bulges out" was learned for lenses and polygons, not graphs.
Mistake 2: Requiring At Every Point
Where it slips in: Functions like or whose second derivative touches zero.
Don't do this: Conclude that is not convex because .
The correct way: Use for convexity; check strict convexity with the chord test if it matters.
Mistake 3: Judging The Shape From Whether The Function Rises Or Falls
Where it slips in: Exponential and logarithmic functions, such as (falling but convex) and (rising but concave).
Don't do this: Call a decreasing function concave or an increasing function convex.
The correct way: Look at the sign of , or at how changes, never at the sign of itself.
Students who sketch two tangent lines before answering stop making this mistake almost at once, because the drawing shows whether the slopes are growing or shrinking, which is the question convexity actually asks.
Mistake 4: Giving One Verdict For A Function That Changes Shape
Where it slips in: Cubics, and , which are convex on one interval and concave on another.
Don't do this: Declare " is convex" without naming the interval.
The correct way: Find where changes sign, then state the verdict separately on each interval of the domain.
The rusher makes this mistake under time pressure: one test value gives a sign, and the answer goes down for the whole real line.
Practice Problems On Convex And Concave Functions
Show that is strictly convex on all real numbers.
Show that is concave on .
Find the intervals where is convex and where it is concave.
Is convex? Give a reason without differentiating at .
Find where is convex and where it is concave.
Use Jensen's inequality with to show , and check it with , .
Answer to Problem 1: for every , so is strictly convex.
Answer to Problem 2: for , so is concave there.
Answer to Problem 3: ; concave on and convex on .
Answer to Problem 4: Yes. is convex (a shifted absolute value) and is convex, and a sum of convex functions is convex.
Answer to Problem 5: ; concave on and convex on .
Answer to Problem 6: is convex, so the two-point Jensen inequality gives the result directly; with , , the left side is and the right side is .
Bottom Line
Convex and concave functions are defined by chords: on or above the graph for convex, on or below for concave.
The chord, tangent line and second derivative tests are equivalent, and the second derivative test asks for , not .
"Convex" and "concave up" name the same bowl shape; translate any term back to the chord picture.
A local minimum of a convex function is a global minimum, which is why convexity matters in optimization.
Jensen's inequality compares the function of an average with the average of the function, and yields inequalities such as the arithmetic and geometric mean inequality.
Where To Go From Here
Work through Practice Problems 1 to 6 using the second derivative test first and the chord test as a check; if Problem 4 or Problem 6 trips you up, return to the sections on properties and on Jensen's inequality. Want a live Bhanzu trainer to go through convexity proofs with you? Book a free demo class.
Read More
Was this article helpful?
Your feedback helps us write better content
