Convex optimization

From HandWiki
Short description: Subfield of mathematical optimization

Convex optimization is a subfield of mathematical optimization that studies the problem of minimizing convex functions over convex sets (or, equivalently, maximizing concave functions over convex sets). Many classes of convex optimization problems admit polynomial-time algorithms,[1] whereas mathematical optimization is in general NP-hard.[2][3][4]


Abstract form

A convex optimization problem is defined by two ingredients:[5][6]

  • The objective function, which is a real-valued convex function of n variables, [math]\displaystyle{ f :\mathcal D \subseteq \mathbb{R}^n \to \mathbb{R} }[/math].;
  • The feasible set, which is a convex subset [math]\displaystyle{ C\subseteq \mathbb{R}^n }[/math].

The goal of the problem is to find some [math]\displaystyle{ \mathbf{x^\ast} \in C }[/math] attaining

[math]\displaystyle{ \inf \{ f(\mathbf{x}) : \mathbf{x} \in C \} }[/math].

In general, there are three options regarding the existence of a solution:[7]:{{{1}}}

  • If such a point x* exists, it is referred to as an optimal point or solution; the set of all optimal points is called the optimal set; and the problem is called solvable.
  • If [math]\displaystyle{ f }[/math] is unbounded below over [math]\displaystyle{ C }[/math], or the infimum is not attained, then the optimization problem is said to be unbounded.
  • Otherwise, if [math]\displaystyle{ C }[/math] is the empty set, then the problem is said to be infeasible.

Standard form

A convex optimization problem is in standard form if it is written as

[math]\displaystyle{ \begin{align} &\underset{\mathbf{x}}{\operatorname{minimize}}& & f(\mathbf{x}) \\ &\operatorname{subject\ to} & &g_i(\mathbf{x}) \leq 0, \quad i = 1, \dots, m \\ &&&h_i(\mathbf{x}) = 0, \quad i = 1, \dots, p, \end{align} }[/math]


  • [math]\displaystyle{ \mathbf{x} \in \mathbb{R}^n }[/math] is the vector of optimization variables;
  • The objective function [math]\displaystyle{ f: \mathcal D \subseteq \mathbb{R}^n \to \mathbb{R} }[/math] is a convex function;
  • The inequality constraint functions [math]\displaystyle{ g_i : \mathbb{R}^n \to \mathbb{R} }[/math], [math]\displaystyle{ i=1, \ldots, m }[/math], are convex functions;
  • The equality constraint functions [math]\displaystyle{ h_i : \mathbb{R}^n \to \mathbb{R} }[/math], [math]\displaystyle{ i=1, \ldots, p }[/math], are affine transformations, that is, of the form: [math]\displaystyle{ h_i(\mathbf{x}) = \mathbf{a_i}\cdot \mathbf{x} - b_i }[/math], where [math]\displaystyle{ \mathbf{a_i} }[/math] is a vector and [math]\displaystyle{ b_i }[/math] is a scalar.

The feasible set [math]\displaystyle{ C }[/math] of the optimization problem consists of all points [math]\displaystyle{ \mathbf{x} \in \mathcal{D} }[/math] satisfying the inequality and the equality constraints. This set is convex because [math]\displaystyle{ \mathcal{D} }[/math] is convex, the sublevel sets of convex functions are convex, affine sets are convex, and the intersection of convex sets is convex.[7]:{{{1}}}

Many optimization problems can be equivalently formulated in this standard form. For example, the problem of maximizing a concave function [math]\displaystyle{ f }[/math] can be re-formulated equivalently as the problem of minimizing the convex function [math]\displaystyle{ -f }[/math]. The problem of maximizing a concave function over a convex set is commonly called a convex optimization problem.[8]

Epigraph form (standard form with linear objective)

In the standard form it is possible to assume, without loss of generality, that the objective function f is a linear function. This is because any program with a general objective can be transformed into a program with a linear objective by adding a single variable t and a single constraint, as follows:[9]:{{{1}}}

[math]\displaystyle{ \begin{align} &\underset{\mathbf{x},t}{\operatorname{minimize}}& & t \\ &\operatorname{subject\ to} & &f(\mathbf{x}) - t \leq 0 \\ && &g_i(\mathbf{x}) \leq 0, \quad i = 1, \dots, m \\ &&&h_i(\mathbf{x}) = 0, \quad i = 1, \dots, p, \end{align} }[/math]

Conic form

Every convex program can be presented in a conic form, which means minimizing a linear objective over the intersection of an affine plane and a convex cone:[9]:{{{1}}}

[math]\displaystyle{ \begin{align} &\underset{\mathbf{x}}{\operatorname{minimize}}& & c^T x \\ &\operatorname{subject\ to} & &x \in (b+L)\cap K \end{align} }[/math]

where K is a closed pointed convex cone, L is a linear subspace of Rn, and b is a vector in Rn. A linear program in standard form in the special case in which K is the nonnegative orthant of Rn.

Eliminating linear equality constraints

It is possible to convert a convex program in standard form, to a convex program with no equality constraints.[7](p132) Denote the equality constraints hi(x)=0 as Ax=b, where A has n columns. If Ax=b is infeasible, then of course the original problem is infeasible. Otherwise, it has some solution x0 , and the set of all solutions can be presented as: Fz+x0, where z is in Rk, k=n-rank(A), and F is an n-by-k matrix. Substituting x = Fz+x0 in the original problem gives:

[math]\displaystyle{ \begin{align} &\underset{\mathbf{x}}{\operatorname{minimize}}& & f(\mathbf{F \mathbf{z} + \mathbf{x}_0}) \\ &\operatorname{subject\ to} & &g_i(\mathbf{F \mathbf{z} + \mathbf{x}_0}) \leq 0, \quad i = 1, \dots, m \\ \end{align} }[/math]

where the variables are z. Note that there are rank(A) fewer variables. This means that, in principle, one can restrict attention to convex optimization problems without equality constraints. In practice, however, it is often preferred to retain the equality constraints, since they might make some algorithms more efficient, and also make the problem easier to understand and analyze.

Special cases

The following problem classes are all convex optimization problems, or can be reduced to convex optimization problems via simple transformations:[7]:{{{1}}}[10]

A hierarchy of convex optimization problems. (LP: linear program, QP: quadratic program, SOCP second-order cone program, SDP: semidefinite program, CP: cone program.)
  • Linear programming problems are the simplest convex programs. In LP, the objective and constraint functions are all linear.
  • Quadratic programming are the next-simplest. In QP, the constraints are all linear, but the objective may be a convex quadratic function.
  • Second order cone programming are more general.
  • Semidefinite programming are more general.
  • Conic optimization are even more general - see figure to the right,

Other special cases include;


The following are useful properties of convex optimization problems:[11][7]:{{{1}}}

  • every local minimum is a global minimum;
  • the optimal set is convex;
  • if the objective function is strictly convex, then the problem has at most one optimal point.

These results are used by the theory of convex minimization along with geometric notions from functional analysis (in Hilbert spaces) such as the Hilbert projection theorem, the separating hyperplane theorem, and Farkas' lemma.[citation needed]


Unconstrained and equality-constrained problems

The convex programs easiest to solve are the unconstrained problems, or the problems with only equality constraints. As the equality constraints are all linear, they can be eliminated with linear algebra and integrated into the objective, thus converting an equality-constrained problem into an unconstrained one.

In the class of unconstrained (or equality-constrained) problems, the simplest ones are those in which the objective is quadratic. For these problems, the KKT conditions (which are necessary for optimality) are all linear, so they can be solved analytically.[7]:{{{1}}}

For unconstrained (or equality-constrained) problems with a general convex objective that is twice-differentiable, Newton's method can be used. It can be seen as reducing a general unconstrained convex problem, to a sequence of quadratic problems.[7]:{{{1}}}Newton's method can be combined with line search for an appropriate step size, and it can be mathematically proven to converge quickly.

Other efficient algorithms for unconstrained minimization are gradient descent (a special case of steepest descent).

General problems

The more challenging problems are those with inequality constraints. A common way to solve them is to reduce them to unconstrained problems by adding a barrier function, enforcing the inequality constraints, to the objective function. Such methods are called interior point methods.[7]:{{{1}}}They have to be initialized by finding a feasible interior point using by so-called phase I methods, which either find a feasible point or show that none exist. Phase I methods generally consist of reducing the search in question to a simpler convex optimization problem.[7]:{{{1}}}

Convex optimization problems can also be solved by the following contemporary methods:[12]

Subgradient methods can be implemented simply and so are widely used.[15] Dual subgradient methods are subgradient methods applied to a dual problem. The drift-plus-penalty method is similar to the dual subgradient method, but takes a time average of the primal variables.[citation needed]

Lagrange multipliers

Consider a convex minimization problem given in standard form by a cost function [math]\displaystyle{ f(x) }[/math] and inequality constraints [math]\displaystyle{ g_i(x)\leq 0 }[/math] for [math]\displaystyle{ 1 \leq i \leq m }[/math]. Then the domain [math]\displaystyle{ \mathcal{X} }[/math] is:

[math]\displaystyle{ \mathcal{X} = \left\{x\in X \vert g_1(x), \ldots, g_m(x)\leq 0\right\}. }[/math]

The Lagrangian function for the problem is

[math]\displaystyle{ L(x,\lambda_{0},\lambda_1, \ldots ,\lambda_{m})=\lambda_{0} f(x) + \lambda_{1} g_{1} (x)+\cdots + \lambda_{m} g_{m} (x). }[/math]

For each point [math]\displaystyle{ x }[/math] in [math]\displaystyle{ X }[/math] that minimizes [math]\displaystyle{ f }[/math] over [math]\displaystyle{ X }[/math], there exist real numbers [math]\displaystyle{ \lambda_{0},\lambda_1, \ldots, \lambda_{m}, }[/math] called Lagrange multipliers, that satisfy these conditions simultaneously:

  1. [math]\displaystyle{ x }[/math] minimizes [math]\displaystyle{ L(y,\lambda_{0},\lambda_{1},\ldots ,\lambda_{m}) }[/math] over all [math]\displaystyle{ y \in X, }[/math]
  2. [math]\displaystyle{ \lambda_{0},\lambda_{1},\ldots ,\lambda_{m} \geq 0, }[/math] with at least one [math]\displaystyle{ \lambda_{k} \gt 0, }[/math]
  3. [math]\displaystyle{ \lambda_{1}g_{1}(x)=\cdots = \lambda_{m}g_{m}(x) = 0 }[/math] (complementary slackness).

If there exists a "strictly feasible point", that is, a point [math]\displaystyle{ z }[/math] satisfying

[math]\displaystyle{ g_{1}(z), \ldots, g_{m}(z)\lt 0, }[/math]

then the statement above can be strengthened to require that [math]\displaystyle{ \lambda_{0}=1 }[/math].

Conversely, if some [math]\displaystyle{ x }[/math] in [math]\displaystyle{ X }[/math] satisfies (1)–(3) for scalars [math]\displaystyle{ \lambda_{0},\ldots,\lambda_{m} }[/math] with [math]\displaystyle{ \lambda_{0}=1 }[/math] then [math]\displaystyle{ x }[/math] is certain to minimize [math]\displaystyle{ f }[/math] over [math]\displaystyle{ X }[/math].


There is a large software ecosystem for convex optimization. This ecosystem has two main categories: solvers on the one hand and modeling tools (or interfaces) on the other hand.

Solvers implement the algorithms themselves and are usually written in C. They require users to specify optimization problems in very specific formats which may not be natural from a modeling perspective. Modeling tools are separate pieces of software that let the user specify an optimization in higher-level syntax. They manage all transformations to and from the user's high-level model and the solver's input/output format.

The table below shows a mix of modeling tools (such as CVXPY and Convex.jl) and solvers (such as CVXOPT and MOSEK). This table is by no means exhaustive.

Program Language Description FOSS? Ref
CVX MATLAB Interfaces with SeDuMi and SDPT3 solvers; designed to only express convex optimization problems. Yes [16]
CVXMOD Python Interfaces with the CVXOPT solver. Yes [16]
CVXPY Python [17]
Convex.jl Julia Disciplined convex programming, supports many solvers. Yes [18]
CVXR R Yes [19]
YALMIP MATLAB, Octave Interfaces with CPLEX, GUROBI, MOSEK, SDPT3, SEDUMI, CSDP, SDPA, PENNON solvers; also supports integer and nonlinear optimization, and some nonconvex optimization. Can perform robust optimization with uncertainty in LP/SOCP/SDP constraints. Yes [16]
LMI lab MATLAB Expresses and solves semidefinite programming problems (called "linear matrix inequalities") No [16]
LMIlab translator Transforms LMI lab problems into SDP problems. Yes [16]
xLMI MATLAB Similar to LMI lab, but uses the SeDuMi solver. Yes [16]
AIMMS Can do robust optimization on linear programming (with MOSEK to solve second-order cone programming) and mixed integer linear programming. Modeling package for LP + SDP and robust versions. No [16]
ROME Modeling system for robust optimization. Supports distributionally robust optimization and uncertainty sets. Yes [16]
GloptiPoly 3 MATLAB,


Modeling system for polynomial optimization. Yes [16]
SOSTOOLS Modeling system for polynomial optimization. Uses SDPT3 and SeDuMi. Requires Symbolic Computation Toolbox. Yes [16]
SparsePOP Modeling system for polynomial optimization. Uses the SDPA or SeDuMi solvers. Yes [16]
CPLEX Supports primal-dual methods for LP + SOCP. Can solve LP, QP, SOCP, and mixed integer linear programming problems. No [16]
CSDP C Supports primal-dual methods for LP + SDP. Interfaces available for MATLAB, R, and Python. Parallel version available. SDP solver. Yes [16]
CVXOPT Python Supports primal-dual methods for LP + SOCP + SDP. Uses Nesterov-Todd scaling. Interfaces to MOSEK and DSDP. Yes [16]
MOSEK Supports primal-dual methods for LP + SOCP. No [16]
SeDuMi MATLAB, Octave, MEX Solves LP + SOCP + SDP. Supports primal-dual methods for LP + SOCP + SDP. Yes [16]
SDPA C++ Solves LP + SDP. Supports primal-dual methods for LP + SDP. Parallelized and extended precision versions are available. Yes [16]
SDPT3 MATLAB, Octave, MEX Solves LP + SOCP + SDP. Supports primal-dual methods for LP + SOCP + SDP. Yes [16]
ConicBundle Supports general-purpose codes for LP + SOCP + SDP. Uses a bundle method. Special support for SDP and SOCP constraints. Yes [16]
DSDP Supports general-purpose codes for LP + SDP. Uses a dual interior point method. Yes [16]
LOQO Supports general-purpose codes for SOCP, which it treats as a nonlinear programming problem. No [16]
PENNON Supports general-purpose codes. Uses an augmented Lagrangian method, especially for problems with SDP constraints. No [16]
SDPLR Supports general-purpose codes. Uses low-rank factorization with an augmented Lagrangian method. Yes [16]
GAMS Modeling system for linear, nonlinear, mixed integer linear/nonlinear, and second-order cone programming problems. No [16]
Optimization Services XML standard for encoding optimization problems and solutions. [16]


Convex optimization can be used to model problems in a wide range of disciplines, such as automatic control systems, estimation and signal processing, communications and networks, electronic circuit design,[7](p17) data analysis and modeling, finance, statistics (optimal experimental design),[20] and structural optimization, where the approximation concept has proven to be efficient.[7][21] Convex optimization can be used to model problems in the following fields:


Extensions of convex optimization include the optimization of biconvex, pseudo-convex, and quasiconvex functions. Extensions of the theory of convex analysis and iterative methods for approximately solving non-convex minimization problems occur in the field of generalized convexity, also known as abstract convex analysis.[citation needed]

See also


  1. 1.0 1.1 Nesterov & Nemirovskii 1994
  2. Murty, Katta; Kabadi, Santosh (1987). "Some NP-complete problems in quadratic and nonlinear programming". Mathematical Programming 39 (2): 117–129. doi:10.1007/BF02592948. 
  3. Sahni, S. "Computationally related problems," in SIAM Journal on Computing, 3, 262--279, 1974.
  4. Quadratic programming with one negative eigenvalue is NP-hard, Panos M. Pardalos and Stephen A. Vavasis in Journal of Global Optimization, Volume 1, Number 1, 1991, pg.15-22.
  5. Hiriart-Urruty, Jean-Baptiste; Lemaréchal, Claude (1996). Convex analysis and minimization algorithms: Fundamentals. p. 291. ISBN 9783540568506. 
  6. Ben-Tal, Aharon; Nemirovskiĭ, Arkadiĭ Semenovich (2001). Lectures on modern convex optimization: analysis, algorithms, and engineering applications. pp. 335–336. ISBN 9780898714913.,+Algorithms,. 
  7. 7.00 7.01 7.02 7.03 7.04 7.05 7.06 7.07 7.08 7.09 7.10 7.11 Boyd, Stephen; Vandenberghe, Lieven (2004). Convex Optimization. Cambridge University Press. ISBN 978-0-521-83378-3. Retrieved 12 Apr 2021. 
  8. "Optimization Problem Types - Convex Optimization". 9 January 2011. 
  9. 9.0 9.1 Arkadi Nemirovsky (2004). Interior point polynomial-time methods in convex programming. 
  10. Agrawal, Akshay; Verschueren, Robin; Diamond, Steven; Boyd, Stephen (2018). "A rewriting system for convex optimization problems". Control and Decision 5 (1): 42–60. doi:10.1080/23307706.2017.1397554. 
  11. Rockafellar, R. Tyrrell (1993). "Lagrange multipliers and optimality". SIAM Review 35 (2): 183–238. doi:10.1137/1035044. 
  12. For methods for convex minimization, see the volumes by Hiriart-Urruty and Lemaréchal (bundle) and the textbooks by Ruszczyński, Bertsekas, and Boyd and Vandenberghe (interior point).
  13. Nesterov, Yurii; Arkadii, Nemirovskii (1995). Interior-Point Polynomial Algorithms in Convex Programming. Society for Industrial and Applied Mathematics. ISBN 978-0898715156. 
  14. Peng, Jiming; Roos, Cornelis; Terlaky, Tamás (2002). "Self-regular functions and new search directions for linear and semidefinite optimization". Mathematical Programming 93 (1): 129–171. doi:10.1007/s101070200296. ISSN 0025-5610. 
  15. "Numerical Optimization" (in en). Springer Series in Operations Research and Financial Engineering. 2006. doi:10.1007/978-0-387-40065-5. 
  16. 16.00 16.01 16.02 16.03 16.04 16.05 16.06 16.07 16.08 16.09 16.10 16.11 16.12 16.13 16.14 16.15 16.16 16.17 16.18 16.19 16.20 16.21 16.22 16.23 16.24 Borchers, Brian. "An Overview Of Software For Convex Optimization". 
  17. "Welcome to CVXPY 1.1 — CVXPY 1.1.11 documentation". 
  18. Udell, Madeleine; Mohan, Karanveer; Zeng, David; Hong, Jenny; Diamond, Steven; Boyd, Stephen (2014-10-17). "Convex Optimization in Julia". arXiv:1410.4821 [math.OC].
  19. "Disciplined Convex Optimiation - CVXR". 
  20. Chritensen/Klarbring, chpt. 4.
  21. Schmit, L.A.; Fleury, C. 1980: Structural synthesis by combining approximation concepts and dual methods. J. Amer. Inst. Aeronaut. Astronaut 18, 1252-1260
  22. 22.0 22.1 22.2 22.3 22.4 Boyd, Stephen; Diamond, Stephen; Zhang, Junzi; Agrawal, Akshay. "Convex Optimization Applications". 
  23. 23.0 23.1 23.2 Malick, Jérôme (2011-09-28). "Convex optimization: applications, formulations, relaxations". 
  24. Ben Haim Y. and Elishakoff I., Convex Models of Uncertainty in Applied Mechanics, Elsevier Science Publishers, Amsterdam, 1990
  25. Ahmad Bazzi, Dirk TM Slock, and Lisa Meilhac. "Online angle of arrival estimation in the presence of mutual coupling." 2016 IEEE Statistical Signal Processing Workshop (SSP). IEEE, 2016.


  • Hiriart-Urruty, Jean-Baptiste, and Lemaréchal, Claude. (2004). Fundamentals of Convex analysis. Berlin: Springer.
  • Hiriart-Urruty, Jean-Baptiste; Lemaréchal, Claude (1993). Convex analysis and minimization algorithms, Volume I: Fundamentals. Grundlehren der Mathematischen Wissenschaften [Fundamental Principles of Mathematical Sciences]. 305. Berlin: Springer-Verlag. pp. xviii+417. ISBN 978-3-540-56850-6. 
  • Hiriart-Urruty, Jean-Baptiste; Lemaréchal, Claude (1993). Convex analysis and minimization algorithms, Volume II: Advanced theory and bundle methods. Grundlehren der Mathematischen Wissenschaften [Fundamental Principles of Mathematical Sciences]. 306. Berlin: Springer-Verlag. pp. xviii+346. ISBN 978-3-540-56852-0. 
  • Kiwiel, Krzysztof C. (1985). Methods of Descent for Nondifferentiable Optimization. Lecture Notes in Mathematics. New York: Springer-Verlag. ISBN 978-3-540-15642-0. 
  • Lemaréchal, Claude (2001). "Lagrangian relaxation". in Michael Jünger and Denis Naddef. Computational combinatorial optimization: Papers from the Spring School held in Schloß Dagstuhl, May 15–19, 2000. Lecture Notes in Computer Science. 2241. Berlin: Springer-Verlag. pp. 112–156. doi:10.1007/3-540-45586-8_4. ISBN 978-3-540-42877-0. 
  • Nesterov, Yurii; Nemirovskii, Arkadii (1994). Interior Point Polynomial Methods in Convex Programming. SIAM. 
  • Nesterov, Yurii. (2004). Introductory Lectures on Convex Optimization, Kluwer Academic Publishers
  • Rockafellar, R. T. (1970). Convex analysis. Princeton: Princeton University Press. 
  • Ruszczyński, Andrzej (2006). Nonlinear Optimization. Princeton University Press. 
  • Schmit, L.A.; Fleury, C. 1980: Structural synthesis by combining approximation concepts and dual methods. J. Amer. Inst. Aeronaut. Astronaut 18, 1252-1260

External links