I have a two lists $LHS$ and $RHS$, both of size $n$. I want to solve a system of inequalities of the form:

$$LHS[1] \leq RHS[1]$$

$$LHS[2] \leq RHS[2]$$

$$LHS[3] \leq RHS[3]$$


$$LHS[n] \leq RHS[n]$$

We assume that:

Each $LHS[i]$ is a linear equation in $m$ variables, say: $\alpha_{1}, \dots, \alpha_{m}$ and each $RHS[i]$ is a linear equation in $m$ variables, say: $\beta_{1}, \dots, \beta_{m}$.

We need to solve for $\alpha_{1}, \dots, \alpha_{m}$, $\beta_{1}, \dots, \beta_{m}$, which are positive integers.

Take m=2. To solve a single inequality (for some $i$ between $1$ and $n$) I know that I need to enter:


(I haven't put the constrains to make the code simpler)

But, if I need to solve all the inequalities, how do I input a list in 'Reduce' ?

Thanks a lot in advance.

  • $\begingroup$ Have you checked the documentation? From the doc one example which should help you: Reduce[x^2 + y z == 1 && x + 2 y <= 3 z + 1 && x y z > 7, {x, y, z}, Reals]. If this does not help you, can you post a minimal specific example, not the general problem? $\endgroup$
    – halirutan
    Commented Oct 16, 2012 at 23:42
  • 1
    $\begingroup$ Do you just need something like And @@ Thread[lhs <= rhs]? $\endgroup$
    – wxffles
    Commented Oct 16, 2012 at 23:50

1 Answer 1


You could use Inner to build the system of inequalities:

Reduce[ Inner[ LessEqual, lhs, rhs, And], Variables[{lhs,rhs}], Reals ]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.