Lably
Skip to content

Constraint (mathematics)

Condition of an optimization problem which the solution must satisfy

  • 3 min read
  • 4 chapters
  • 1 lab on Lably

Learn it on Lably

Example

The following is a simple optimization problem:

minf(x)=x12+x24

subject to

x1≥1

and

x2=1,

where x denotes the vector (x1, x2).

In this example, the first line defines the function to be minimized (called the objective function, loss function, or cost function). The second and third lines define two constraints, the first of which is an inequality constraint and the second of which is an equality constraint. These two constraints are hard constraints, meaning that it is required that they be satisfied; they define the feasible set of candidate solutions.

Without the constraints, the solution would be (0,0), where f(x) has the lowest value. But this solution does not satisfy the constraints. The solution of the constrained optimization problem stated above is x=(1,1), which is the point with the smallest value of f(x) that satisfies the two constraints.

Sign in to keep reading

3 more chapters are free with a Lably account.

More in Topics in mathematics