<p>Your formulation ensures that $|x_i|=t_i$ in every <em>optimal</em> solution. However, this does not hold for an arbitrary <em>feasible</em> point. </p>

<p>Picky people could then complain that your formulation isn't entirely correct. However, as long as you don't change your objective function nor use $t_i$ in any other constraint, then you will be fine in practice.</p>

<p><a href="http://orinanobworld.blogspot.fr/2012/07/modeling-absolute-values.html" rel="nofollow">This blog post describes several ways to model absolute values</a>.</p>

CC BY-SA 3.0
2013-07-08T21:16:27.730Z
2013-07-27T23:01:03.043Z
2013-07-27T23:01:03.043Z
Austin Buchanan
<p>This is really a basic (undergrad) question in LP but still i would like to
clarify it for myself to be sure. I have a minimization problem from the sort $\min \sum_i |x_i|$ s.t $Ax \le b$.
I've seen that the standard way to convert it to LP is to represent $x_i$ as the difference
of two non negative variables. We question is, can i also handle it like so : 
add a new variable t : $|x_i|=t_i$ and get
$$\min \sum_i t_i \\ 
Ax \le b \\ 
-t_i \le x_i \le t_i $$
Thanks.</p>

CC BY-SA 3.0
2013-07-08T14:52:17.270Z
Looks fine to me.
Austin Buchanan
<linear-programming><convex-optimization>
Linear programming, a non standard handling of absolute value
gil
# Linear programming, a non standard handling of absolute value

(Asked by: username_0 on 2013-07-08)

This is really a basic (undergrad) question in LP but still i would like to
clarify it for myself to be sure. I have a minimization problem from the sort $\min \sum\_i |x\_i|$ s.t $Ax \le b$.
I've seen that the standard way to convert it to LP is to represent $x\_i$ as the difference
of two non negative variables. We question is, can i also handle it like so :
add a new variable t : $|x\_i|=t\_i$ and get
$$\min \sum\_i t\_i \\
Ax \le b \\
-t\_i \le x\_i \le t\_i $$
Thanks.

**Tags:** linear-programming, convex-optimization
> **Comments:**
> **username_1**: Looks fine to me.  

---

## 1 answers

### Answer by username_1 on 2013-07-08. Score: 2 | Accepted answer

Your formulation ensures that $|x\_i|=t\_i$ in every *optimal* solution. However, this does not hold for an arbitrary *feasible* point.

Picky people could then complain that your formulation isn't entirely correct. However, as long as you don't change your objective function nor use $t\_i$ in any other constraint, then you will be fine in practice.

[This blog post describes several ways to model absolute values](http://orinanobworld.blogspot.fr/2012/07/modeling-absolute-values.html).


---

