McCormick envelopes

From Cornell University Computational Optimization Open Textbook - Optimization Wiki
Revision as of 13:58, 27 November 2021 by Smu29 (talk | contribs) (added a figure and other edits)
Jump to navigation Jump to search

Author: Susan Urban (smu29) (SYSEN 5800 Fall 2021)


Optimization of a non-convex function f(x) is challenging since it may have multiple locally optimal solutions or no solution and it can take a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution. Different techniques are used to address this challenge depending on the characteristics of the problem.

Figure 1: Relationships between the given function f(x), concave over-estimators, convex under-estimators, concave envelope and convex envelope.

One technique used for a given non-convex function is the identification of a concave envelope and a convex envelope. The concave envelope, and respectively the convex envelope, is the concave over-estimator and convex under-estimator for the given function providing the tighest fit to the given function. The envelope surrounds the given function, like an envelope encloses a letter, and limits the feasible solution space the most in comparison to all other concave over-estimators and convex under-estimators.

McCormick Envelopes: Theory, Methodology and Algorithmic Discussions

The McCormick Envelope2 is a type of convex relaxation used for optimization of bilinear (e.g., x*y, x+y) non-linear programming (NLP) problems.

Each bilinear term is replaced with a new variable and four sets of constraints are added. The non-linear programming is converted to a relaxed convex linear programming which can be more easily solved.

The LP solution gives a lower bound and any feasible solution gives an upper bound.

As noted by Scott et al3, McCormick envelopes are effective since they are recursive, can be applied to a variety of applications, and are typically stronger than those resulting from convexification or linearization procedures.

The following is a derivation of the McCormick Envelopes:

where are   upper  and   lower  bound  values  for   and , respectively.

The under-estimators of the function are represented by:

The over-estimators of the function are represented by:

The following shows the relaxation of a non-convex problem:

Original non-convex problem:


we obtain a relaxed, convex problem:

Good lower and upper bounds focus and minimize the feasible solution space; they reduce the number of iterations to find the optimal solution.

As discussed by Hazaji6, global optimization solvers focus initially on optimizing the lower and upper bounds, and when necessary, focus on domain partitioning. By dividing the domain of a given variable into partitions or smaller regions, the solver is able to tailor and further tighten the convex relaxations of each partition.

Example: Numerical

Using GAMS, the solution is z= -24, x=6, y=2.

GAMS code sample:

variable z;

positive variable x, y, w;

equations  obj, c1, c2, c3, c4, c5 ;

obj..    z =e= -w -2*x ;

c1..     w =l= 12 ;

c2..     w =g= 0;

c3..     w =g= 6*y +3*x -18;

c4..     w =l= 6*y;

c5..     w =l= 3*x;

x.up = 10;

x.lo =0;    

y.up = 2;  

y.lo = 0;       

model course5800 /all/;

option mip = baron;

option optcr = 0;

solve course5800 minimizing z using mip ;


Bilinear functions occur in numerous engineering and natural science applications, including the following :

Computer vision 4

Super resolution imaging 5                                         



Non-convex NLPs are challenging to solve and may require a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution. McCormick Envelopes provide a relaxation technique for bilinear non-convex nonlinear programming problems. McCormick Envelopes provide a straightforward technique of replacing each bilinear term with a new variable and adding four contraints. Due to the recursive nature of this technique, it may be applied to a wide variety of engineering and scientific applications involving bilinear terms.


  1. McCormick, Garth P.  Computability of Global Solutions To Factorable Nonconvex Solutions: Part I: Convex Underestimating Problems
  2. Scott, J. K. Stuber, M. D. & Barton, P. I. (2011). Generalized McCormick Relaxations. Journal of Global Optimization, Vol. 51, Issue 4, 569-606 doi: 10.1007/s10898-011-9664-7
  3. Hijazi, H., Perspective Envelopes for Bilinear Functions, unpublished manuscript, retrieved from: Perspective Envelopes for Bilinear Functions
  4. Chandraker, M. & Kriegman, D. (n.d.): Globally Optimal Bilinear Programming for Computer Vision Applications. University of San Diego, CA. Retrieved from:
  5. Gronski, J. (2019). Non-Convex Optimization and Applications to Bilinear Programming and Super-Resolution Imaging. University of Colorado. Retrieved from: