
In mathematics, the ideas of concavity and convexity sit at the heart of analysis, geometry and optimisation. These properties tell us how a function curves, how it behaves under averaging, and how we can locate global best solutions with confidence. This guide unpacks the concepts of concave and convex functions in a clear, reader‑friendly way, while also offering rigorous definitions and useful techniques for practitioners in economics, statistics, machine learning and beyond.
Introductory Overview: Why Concave and Convex Functions Matter
When we speak of a function being concave or convex, we are describing the way its graph bends and how it responds to combining inputs. The distinction matters because it directly influences the existence and uniqueness of optimal points, the stability of numerical algorithms, and the behaviour of models across disciplines. From optimisation problems in industrial design to utility theory in economics, the structure provided by convexity and concavity delivers powerful guarantees.
Definitions: What Are Concave and Convex Functions?
Two precise definitions lay the groundwork for all subsequent discussion. They are deceptively simple, yet they unlock a wealth of theory when combined with additional concepts like epigraphs and transformations.
Formal definitions
Let f be a real-valued function defined on a convex set C in a real vector space. Then:
- Convex function: For any x, y ∈ C and any t ∈ [0, 1],
f(tx + (1−t)y) ≤ t f(x) + (1−t) f(y). - Concave function: For any x, y ∈ C and any t ∈ [0, 1],
f(tx + (1−t)y) ≥ t f(x) + (1−t) f(y).
Equivalently, a function is convex if the line segment between any two points on its graph lies above the graph; it is concave if the segment lies below. If the inequalities are strict for all x ≠ y and 0 < t < 1, we say the function is strictly convex or strictly concave.
Visual intuition
Think of a bowl or a dish: a convex function curves upward; the line connecting any two points on its graph stays above or on the graph. Now imagine a dome: a concave function curves downward; the line segment lies below or on the graph. These pictures are not merely metaphorical— they capture the essence of how these functions respond to averaging inputs and how their graphs shape the feasible region of optimisation problems.
Key Properties of Concave and Convex Functions
Several core properties help engineers and scientists apply these concepts with confidence. Understanding these will aid in recognising preserved structures under common operations and transformations.
Epigraphs and hypographs
The epigraph of a function f is the set of points lying on or above its graph: epi(f) = { (x, t) : t ≥ f(x) }. A function is convex if and only if its epigraph is a convex set. Dually, the hypograph, hyp(f) = { (x, t) : t ≤ f(x) }, is convex if and only if f is concave. This geometric viewpoint often provides a powerful abstract route to proving convexity or concavity, particularly when dealing with non‑scalar inputs or functions of several variables.
Preservation under addition, scaling and affine transforms
Convexity and concavity are preserved under several operations, which makes them practical in modelling:
- Sum of convex functions is convex.
- Non‑negative scalar multiplication preserves convexity; the same holds for concave functions.
- Affine transformations of the input (f(Ax + b)) preserve convexity and concavity when A is a linear map and b is a fixed vector, provided the domain remains convex.
- Composition rules: composing a convex function with a non‑decreasing convex function preserves convexity in certain contexts; compositions require careful checking of monotonicity and curvature.
Strict versus non‑strict convexity/concavity
When a function is strictly convex or strictly concave, the inequality is strict for all distinct inputs and interior t values. This stronger property guarantees a unique minimiser (for convexity) or a unique maximiser (for concavity) on a given convex domain, a fact that is central to optimisation theory and algorithm design.
Second Derivative Test: A Practical Criterion for Twice Differentiable Functions
For functions that are twice differentiable on an interval, the sign of the second derivative provides a practical test for convexity or concavity. This link between curvature and derivatives makes calculus a powerful ally in identifying and classifying functions.
Twice differentiable functions and the test
If f is twice differentiable on an interval I:
- f”(x) ≥ 0 for all x ∈ I implies f is convex on I.
- f”(x) ≤ 0 for all x ∈ I implies f is concave on I.
When f”(x) changes sign, the function may be convex on parts of the interval and concave on others. Special care is required at inflection points, where f”(x) = 0 and the curvature changes direction.
Practical caveats
The second derivative test applies to twice differentiable functions. If the function is not twice differentiable everywhere, one must rely on the original definition (the midpoint inequality with t in [0,1]) or other characterisations such as the epigraph criterion or Jensen’s inequality. In multiple dimensions, the Hessian matrix generalises the second derivative test: a function is convex if its Hessian is positive semidefinite on the domain; concavity corresponds to negative semidefiniteness.
Examples: Common Concave and Convex Functions
Concrete examples illuminate the theory. Here are several standard functions commonly encountered in analysis and applied disciplines.
Examples of convex functions
- Quadratic functions: f(x) = ax^2 + bx + c with a ≥ 0 is convex on R; if a > 0, it is strictly convex. The graph is a parabola opening upwards.
- Exponential functions: f(x) = e^x is convex on R, with f”(x) = e^x > 0 everywhere.
- Norms and distances: f(x) = ||x|| is convex on Euclidean space; the triangle inequality underpins this property.
Examples of concave functions
- Negative quadratics: f(x) = −x^2 is concave on R, opening downward, with f”(x) = −2 < 0.
- Logarithmic function: f(x) = log x on (0, ∞) is concave; its curvature reflects diminishing returns as x grows.
- Square root: f(x) = √x on (0, ∞) is concave, with derivative decreasing as x increases.
Concavity and Convexity in Optimisation
Perhaps the most practical impact of these concepts arises in optimisation. Convexity provides guarantees about the existence and uniqueness of optimal solutions, which is invaluable for algorithm design and analysis.
Why convexity matters in optimisation
If the objective function is convex and the feasible set is convex, any local minimum is a global minimum. This powerful property allows gradient methods, proximal algorithms and other numerical schemes to converge reliably to the best solution, even in high dimensions. Concavity plays the complementary role in maximisation problems, where a concave objective on a convex feasible set likewise yields a global maximum.
Jensen’s inequality: A fundamental tool
Jensen’s inequality relates the value of a convex (or concave) function at the average of inputs to the average of the function values. Specifically, for a convex function f and random variable X with finite expectation,
E[f(X)] ≥ f(E[X]).
For concave functions, the inequality reverses:
E[f(X)] ≤ f(E[X]).
Jensen’s inequality underpins risk assessment in economics, variance reduction in statistics, and numerous proofs in analysis. Its intuitive message is that averaging before applying a convex function yields a higher result than applying the function first and then averaging, with the reverse holding for concave functions.
Practical optimisation strategies
When facing a convex problem, modern algorithms such as gradient descent, Newton methods with line search, and proximal methods are well‑understood and widely used. In constrained problems, projecting onto convex feasible sets or employing barrier and penalty methods preserves tractability. For concave maximisation, similar principles apply but with attention to the direction of inequalities and the nature of the feasible region.
Transformations: How Functions Change Under Mapping
Understanding how concavity and convexity respond to transformations helps in model construction and in deducing properties of complex functions from simpler components.
Affine transformations preserve convexity and concavity
If f is convex (or concave) on a convex domain, then the function g(x) = f(Ax + b) is convex (or concave) on the domain mapped by A and b, provided the domain remains convex. This makes it straightforward to reparameterise problems without losing the fundamental curvature properties.
Compositions with monotone functions
Composition rules are more delicate. If φ is increasing and convex, and f is convex, then φ∘f is convex under certain conditions. If φ is increasing and concave, φ∘f tends to preserve concavity under appropriate constraints. When in doubt, verify using the definitions or rely on established composition theorems to avoid misclassifying a function’s curvature.
Applications Across Disciplines
Concave and convex functions appear in a wide range of real‑world contexts. Their structural properties provide robust foundations for theory and practice alike.
Economics and finance
Utility functions are typically concave, reflecting diminishing marginal utility for wealth. Risk measures and cost functions often rely on convexity to guarantee tractable optimisation and to model preferences, budgets, and production possibilities accurately. In portfolio theory, convexity underpins diversification strategies and the management of risk via convex risk measures.
Statistics and machine learning
Loss and regularisation terms in machine learning are frequently convex, enabling efficient training and reliable convergence. Convex penalties such as L1 and L2 regularisation promote desirable properties in models. In statistics, convexity emerges in likelihoods, log‑probabilities, and in the design of estimators and confidence regions.
Engineering and operations research
In engineering design, convex constraints simplify feasibility checks and enable global optimisation of systems. Operations research relies on convex programs for routing, scheduling, and resource allocation, where guarantees about optimality and computational tractability are essential.
Common Pitfalls and How to Avoid Them
Even seasoned practitioners can stumble when dealing with concave and convex functions. Here are some frequent issues and practical tips to avoid them.
- Assuming convexity from a graph that is only locally curved. Local curvature does not guarantee global convexity unless the function is defined on a convex set and satisfies the defining inequality globally.
- Overlooking domain restrictions. Convexity is domain‑dependent; a function may be convex on one interval and not on another if the domain is not convex.
- Confusing concavity with concave utility. A function can be concave without representing a utility function in economics; context matters for interpretation.
- Neglecting non‑differentiability. The second derivative test is convenient but not universal. At points where derivatives fail to exist, rely on the original inequality or epigraph/hypograph criteria.
The Role of Concavity and Convexity in Modelling
In modelling, choosing functions with the right curvature can simplify analysis and strengthen conclusions. If an optimisation problem requires a unique solution and stable numerical performance, convex or concave objective functions on convex domains are often the best architectural choice. Conversely, if a model demands non‑trivial multiple optima or certain curvature patterns, one may deliberately incorporate non‑convex components, while still leveraging local convex regions for efficient computation.
Advanced Topics: Epigraphs, Hypographs and Duality
For readers seeking deeper theoretical insight, convex analysis extends far beyond basic definitions. Two central notions that frequently appear in research and advanced applications are the epigraph and the hypograph, already introduced in a geometric form earlier in this article. Additionally, duality theory in convex optimisation reveals rich structures connecting a problem with its dual, often simplifying computation and revealing bounds on optimum values. While these topics can be highly technical, the underlying ideas stem from the same fundamental ideas of curvature and averaging that we have discussed.
Epigraphs in practice
In optimisation, the epigraph approach allows one to recast a potentially non‑linear constraint into a convex feasibility problem. This reformulation can enable the use of robust convex solvers and guarantee convergence properties that are otherwise hard to obtain.
Hypographs and concavity
Concavity is intimately tied to the hypograph. Recognising this relation can lead to simpler proofs and clearer intuition when dealing with economic utilities, production frontiers, or information theoretic quantities that prefer concavity properties.
Practical Guidelines for Working with Concave and Convex Functions
Whether you are a student preparing for exams or a professional building a model, these practical guidelines help you apply concavity and convexity effectively.
- Always verify the domain: a convex domain is essential for standard convexity results to hold.
- Use the inequality definitions directly when differentiability is uncertain; this keeps reasoning rigorous.
- Leverage the epigraph/hypograph viewpoint to prove convexity or concavity in higher dimensions or non‑standard spaces.
- Remember the transformation rules: affine precomposition and monotone function compositions can preserve or alter convexity/concavity in predictable ways.
- When in doubt, test with simple examples like f(x) = x^2, f(x) = log x, or f(x) = e^x to gain intuition about curvature and optimization behaviour.
Frequently Asked Questions
To consolidate understanding, here are concise answers to common questions about concave and convex functions.
- What is the main difference between concave and convex functions?
- Convex functions lie below any chord connecting two points on their graph, while concave functions lie above such a chord. In optimisation terms, convex functions have non‑increasing slopes, concave functions have non‑decreasing slopes on their domains.
- Can a function be both convex and concave?
- Only if it is affine (a linear function plus a constant). Such functions have zero curvature and trivially satisfy both inequalities.
- Do all functions have a convex hull?
- Every function defined on a convex domain has a convex hull associated with it, in the sense that the convex envelope gives the greatest convex function bounded above by the original function. This concept is central in convex analysis and optimization practice.
- Why is convexity important in machine learning?
- Convexity guarantees that local minima are global minima, enabling reliable training with gradient-based methods, and providing theoretical guarantees for convergence and generalisation in many models.
Conclusion: The Power of Curvature
Concave and convex functions are more than abstract curiosities; they provide a disciplined framework for reasoning about optimisation, economics, statistics and engineering. By understanding the two fundamentally different yet related notions of curvature, you gain a robust toolkit for modelling, analysing and solving real‑world problems. From the second derivative test to the elegance of Jensen’s inequality, the ideas underpinning concave and convex functions empower you to reason with clarity, design better algorithms, and interpret results with greater assurance. Embracing these concepts opens doors to more efficient computations, stronger theoretical results and a deeper appreciation of how averaging, curvature and shape influence outcomes across disciplines.
Further Reading and Exploration
For readers who wish to deepen their knowledge, consider exploring textbooks on convex analysis, functional analysis and optimisation theory. Classic references cover foundational theorems, duality, subgradients, and advanced topics such as convex programming in infinite-dimensional spaces. Practical papers and tutorials emphasise numerical methods, algorithmic implementation and real‑world case studies in economics, data science and engineering.