Slack variables are introduced to convert your LP model into standard form. The design of the simplex method calls for your model to be of the standard form $Max/Min$ $z=c^Tx$ subject to $Ax=b, x\ge 0$. By introducing extra variables which take up the 'slack' in the inequality you get a model where there are only equalities and which is of the requisite standard form. It is easily established that both problems have the same feasible set, thereby the same solutions.
Your second question stems from confusing $\le$ type inequalities with $\ge$ inequalities. In case you have an inequality of the sort $2x+3y+4z\le 5$ you can add the slack variable $s$ on the left hand side to get an equation $2x+3y+4z+s=5$. In case your inequality was $2x+3y+4z\ge 5$ you can add the slack variable $s$ on the right hand side to get an equation $2x+3y+4z=5+s$ or equivalently $2x+3y+4z-s=5$. (We add the slack on the right since in this case the right hand side represented a quantity which was less and so needed the slack.)
Now the issue with $\ge$ is that it yields equations of the sort where the slack variable is being "subtracted" from the left hand side instead of being added. I will not go into details, but the usual application of the simplex algorithm fundamentally depends on the slack variable being "added" instead of being subtracted. Hence the $\ge$ represents the problem. To make the algorithm work "artificial variables" are further added to such equations. These behave just like the slack variables. So for example, $2x+3y+4z\ge 5$ will be changed to $2x+3y+4z-s+A= 5$ where $A$ is the new artificial variable. Introduction of these artificial variables is permitted since through a clever manipulation it is ensured that these variables are zero in the optimum solution. The net effect is that two variables per $\ge$ inequality are introduced in the problem, whereas only one variable per $\le$ inequality is introduced.
You have probably encountered maximization problems with only $\le$ constraints and minimization problems with only $\ge$ constraints. The number of slack variables has nothing to do with maximization or minimization, but as explained above has to do with the $\le$ or $\ge$ sign in the constraints.
To get an optimal solution, it is necessary to have a basic solution as a starting point. This means, that the number of constraints must be equal to the number of basic variables. Thus every constraint has to have a positive slack variable or a positive artificial variable. If the slack variable is negative or is not needed, then you add an artificial variable.
There are three cases:
$\color{blue}{\leq-\texttt{constraint}}$
If you have a $\leq$-constraint, then you have to add a slack variable for each constraint.
$2y+z \leq 2 \quad \Longrightarrow \quad 2y+z +s_1=2$
$\color{blue}{=\texttt{-constraint}}$
If you have a $=$-constraint, then you do not have to add a slack variable for each constraint. But you have to add an artificial variable for each constraint.
$x+y+z=4 \quad \Longrightarrow \quad x+y+z+a_1=4$
$\color{blue}{\geq-\texttt{constraint}}$
If you have a $\geq$-constraint, then you have to substract a slack variable for each constraint. Additionally you have to add an artificial variable for each constraint.
$x-2y+z \geq 3 \quad \Longrightarrow \quad x-2y+z-s_2+a_2 = 3$
The initial simplex tableau is
$\begin{array}{|c|c|c|c|c|c|c|c|} \hline x & y & z & s_1 & s_2 & a_1 & a_2 & RHS \\ \hline -2 & 1 & -3 & 0 & 0 & 0 & 0 & 0 \\ \hline 0 & 2 & \color{red} 1 & 1 & 0 & 0 & 0 & 2 \\ \hline 1 & 1 & 1 & 0 & 0 & 1 & 0 & 4 \\ \hline 1 & -2 & 1 & 0 & -1 & 0 & 1 & 3 \\ \hline \end{array} $
The coefficients of the objective function have to be multiplied by (-1), because the objective function has to be maximized.
The initial basic solution is $(x, y, z, s_1, s_2, a_1, a_2)=(0, 0, 0, 2, 0, 4, 3)$
The first pivot element is the red One.
Best Answer
You just add slack variables for every single $\leq$-constraint.
min $-6x-4y+2z$
subject to
$x + y + 4z +s_1= 20$
$-5y + 5z +s_2= 100$
$x + 3y + z +s_3= 400$
$x,y,z \geq 0$
Then the initial tableau is
$$\begin{array}{|c|c|c|c|c|c|c|c|} \hline x & y & z & s_1 & s_2 & s_3 & \textrm{RHS} \\ \hline \color{red} 1 & 1 & 4 & 1 & 0 & 0 & 20 \\ \hline 0 & -5 & 5 & 0 & 1 & 0 & 100 \\ \hline 1 & 3 & 1 & 0 & 0 & 1 & 400 \\ \hline -6 & -4 & 2 & 0 & 0 & 0 & 0 \\ \hline\end{array}$$
The last row of the table is represents the objective function, which needs to be minimized. That is the reason why the coefficients of the objective function are not multiplied by $(-1)$. The basic feasible solution is $(x,y,z,s_1,s_2,s_3)=(0,0,0,1,1,1)$. To find the pivot element we have to choose the pivot column. The most negative coefficient is at column
x
. Then the the minimum of the corresponding ratios is $\min \{\frac{20}{1},\frac{400}{1}\}=20$. So the red marked cell is the pivot element. The next tableau is$$\begin{array}{|c|c|c|c|c|c|c|c|} \hline x & y & z & s_1 & s_2 & s_3 & \textrm{RHS} \\ \hline 1 & 1 & 4 & 1 & 0 & 0 & 20 \\ \hline 0 & -5 & 5 & 0 & 1 & 0 & 100 \\ \hline 0 & 2 & -3 & -1 & 0 & 1 & 380 \\ \hline 0 & 2 & 26 & 6 & 0 & 0 & 120 \\ \hline\end{array}$$
Since all coefficients of the objective function are non-negative we are finished. The optimal solution is $(x^*,y^*,z^*)=(20,0,0)$, where the optimal value of the objective function is $\color{red}{-120}$.