# Removing redundant inequalities from a linear system of linear inequalities

**URL:** <https://discourse.julialang.org/t/removing-redundant-inequalities-from-a-linear-system-of-linear-inequalities/39742>\
**Category:** Numerics\
**Tags:** question\
**Created:** [May 19, 2020, 6:49am UTC](https://discourse.julialang.org/t/removing-redundant-inequalities-from-a-linear-system-of-linear-inequalities/39742 "2020-05-19T06:49:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![KiriaKasis](https://avatars.discourse-cdn.com/v4/letter/k/ecc23a/32.png) [@KiriaKasis](https://discourse.julialang.org/u/KiriaKasis)\
**Post date:** [May 19, 2020, 6:49am UTC](https://discourse.julialang.org/t/removing-redundant-inequalities-from-a-linear-system-of-linear-inequalities/39742/1 "2020-05-19T06:49:02Z")

</div>

I have a satisfiable system of inequalities Ax ≤ b or equivalently a\_i · x ≤ b\_i for 1 ≤ i ≤ n. I would like to find all indexes i such that the i\text{-th} inequality is redundant.

For example in

\begin{aligned} x + y &\le 4\\ x + 2y &\le 5\\ x &\le 3\\ x &\le 4 \\ \end{aligned}

both x \le 4 and x + 2y \le 5 are redundant, the former trivially so, the latter not so much.

For my use case I only have 2 variables, so something that only applies to that dimension is fine.

But I am also interested in a general solution in term of matrix operations on A, sort of similar to a positive Gaussian elimination.

Currently I believe I have a solution, I would like to get a nicer one. It should be enough to iterate through all rows and try to maximize a\_i\cdot x subject to Ax\le b and then check if for the solution c the equality a\_i\cdot c\le b\_i holds.
