# Converting box constraints from matrix to interval form: box_constraints

### 5.38.9 Converting box constraints from matrix to interval form: box_constraints

The box_constraints command can convert bounds of given variables from the matrix form to interval form.

- box_constraints takes two mandatory arguments:
  - vars, a list of variables [x1,x2,…,xn].
  - bnds, a matrix with n rows and two columns in which the k-th row contains the lower and upper bound lk and uk of xk, respectively.
- box_constraints(vars,bnds) returns the sequence (x1=l1… u1,x2=l2… u2,…,xn=ln… un).

#### Examples.

- Input:
  box_constraints([x,y],[[-2,2],[-5,5]])
  Output:

  x=−2… 2,y=−5… 5