# Linear Programming objective function

Is it possible for a certain variable to have zero coefficient at objective function ?

For example, can I have

Z= x while my decision variable is x and y?

• Yes, You can even make all objective coefficients zero, In that case the LP solver will stop as soon as a feasible solution is found. – Erwin Kalvelagen May 31 '18 at 16:18

• This is not necessarily true. Consider the problem $\min y$ subject to $y\geqslant x$ and $x,y\geqslant0$. The coefficient of the variable $x$ in the objective function is zero, but if we set $x=5$, the optimal objective value is $5$, while if we set $x=10$, the optimal objective value is $10$. – David M. May 31 '18 at 23:43