# Introducing a big M variable in given equations

While I do understand the general workings of the Big-M-method I am struggling with the following sample exercise, in which the Big-M-method has to be used to find a first feasible solution:

\begin{alignat}2\max&\quad 10x_1+4x_2\\\text{s.t.}&\quad x_1+x_2+x_3=4\tag1 \\&\quad 2x_1-x_2-x_4=2\tag2\\&\quad -x_1+x_5=-1\tag3\\&\quad x_1+x_3-x_4+x_5=4\tag4\\&\quad x_1,\cdots,x_5 \geq 0\tag5\end{alignat}

I am not sure how to introduce the artificial variable for the Big-M. The only problem here seems to be the negative value on the right side of equation #3. So I would multiply with $$-1$$. Now it looks as though we have a negative slack variable $$x_5$$ which would allow us to add another variable $$y_1$$ as part of the Big-M-Method. But I doubt if $$x_5$$ can be considered a slack variable here since it is given as part of the task and is also specified as $$\geq 0$$. So I just need to know if I am on the wrong track and if so, how to introduce the Big-M the right way

All your constraints are equality. So, add an artificial variable to each constraint (let's call them $$a_i \quad i\in\{1,..,4\}$$). Now all these artificial variables need to be in the objective function with a coefficient of Big-M. Since you are maximizing, you want to make sure using any of them will penalize your objective function (so, you add them with negative sign). So, your objective function becomes: $$\max \quad 10x_1 +4x_2 - Ma_1 - Ma_2 - Ma_3 - Ma_4$$
• @JohnEren You add artificial variables ($a$) to make a new space where the origin point is part of your solution so you start from there. So, you add it to a constraint that you don't have the available $+1s$ for your initial basis (where $s$ is a slack). You have that $+1$ in $\le$, you have $-1$ for $\ge$ (from a surplus) and you add an $a$ there. You also need it for equality constraint to satisfy the requirement. In your example, if constraint 4 was $x_1+x_3-x_4+x_6=4$ and you don't see $x_6$ anywhere else, then that $x_6$ could play the role in the basis for you (no need for $a$). – EhsanK Nov 26 '19 at 18:45