Maybe it's worthwhile to talk through where the dual comes from. This will take a while, but hopefully the dual won't seem so mysterious when we're done.
Suppose we want to use the primal's constraints as a way to find an upper bound on the optimal value of the primal. If we multiply the first constraint by $9$, the second constraint by $1$, and add them together, we get $9(2x_1 - x_2) + 1(x_1 +3 x_2)$ for the left-hand side and $9(1) + 1(9)$ for the right-hand side. Since the first constraint is an equality and the second is an inequality, this implies $$19x_1 - 6x_2 \leq 18.$$
But since $x_1 \geq 0$, it's also true that $5x_1 \leq 19x_1$, and so $$5x_1 - 6x_2 \leq 19x_1 - 6x_2 \leq 18.$$
Therefore, $18$ is an upper-bound on the optimal value of the primal problem.
Surely we can do better than that, though. Instead of just guessing $9$ and $1$ as the multipliers, let's let them be variables. Thus we're looking for multipliers $y_1$ and $y_2$ to force $$5x_1 - 6x_2 \leq y_1(2x_1-x_2) + y_2(x_1 + 3x_2) \leq y_1(1) + y_2(9).$$
Now, in order for this pair of inequalities to hold, what has to be true about $y_1$ and $y_2$? Let's take the two inequalities one at a time.
The first inequality: $5x_1 - 6x_2 \leq y_1(2x_1-x_2) + y_2(x_1 + 3x_2)$
We have to track the coefficients of the $x_1$ and $x_2$ variables separately. First, we need the total $x_1$ coefficient on the right-hand side to be at least $5$. Getting exactly $5$ would be great, but since $x_1 \geq 0$, anything larger than $5$ would also satisfy the inequality for $x_1$. Mathematically speaking, this means that we need $2y_1 + y_2 \geq 5$.
On the other hand, to ensure the inequality for the $x_2$ variable we need the total $x_2$ coefficient on the right-hand side to be exactly $-6$. Since $x_2$ could be positive, we can't go lower than $-6$, and since $x_2$ could be negative, we can't go higher than $-6$ (as the negative value for $x_2$ would flip the direction of the inequality). So for the first inequality to work for the $x_2$ variable, we've got to have $-y_1 + 3y_2 = -6$.
The second inequality: $y_1(2x_1-x_2) + y_2(x_1 + 3x_2) \leq y_1(1) + y_2(9)$
Here we have to track the $y_1$ and $y_2$ variables separately. The $y_1$ variables come from the first constraint, which is an equality constraint. It doesn't matter if $y_1$ is positive or negative, the equality constraint still holds. Thus $y_1$ is unrestricted in sign. However, the $y_2$ variable comes from the second constraint, which is a less-than-or-equal to constraint. If we were to multiply the second constraint by a negative number that would flip its direction and change it to a greater-than-or-equal constraint. To keep with our goal of upper-bounding the primal objective, we can't let that happen. So the $y_2$ variable can't be negative. Thus we must have $y_2 \geq 0$.
Finally, we want to make the right-hand side of the second inequality as small as possible, as we want the tightest upper-bound possible on the primal objective. So we want to minimize $y_1 + 9y_2$.
Putting all of these restrictions on $y_1$ and $y_2$ together we find that the problem of using the primal's constraints to find the best upper-bound on the optimal primal objective entails solving the following linear program:
$$\begin{align*}
\text{Minimize }\:\:\:\:\: y_1 + 9y_2& \\
\text{subject to }\:\:\:\:\: 2y_1 + y_2& \geq 5 \\
-y_1 + 3y_2& = -6\\
y_2 & \geq 0.
\end{align*}$$
And that's the dual.
It's probably worth summarizing the implications of this argument for all possible forms of the primal and dual. The following table is taken from p. 214 of
Introduction to Operations Research, 8th edition, by Hillier and Lieberman. They refer to this as the SOB method, where SOB stands for Sensible, Odd, or Bizarre, depending on how likely one would find that particular constraint or variable restriction in a maximization or minimization problem.
Primal Problem Dual Problem
(or Dual Problem) (or Primal Problem)
Maximization Minimization
Sensible <= constraint paired with nonnegative variable
Odd = constraint paired with unconstrained variable
Bizarre >= constraint paired with nonpositive variable
Sensible nonnegative variable paired with >= constraint
Odd unconstrained variable paired with = constraint
Bizarre nonpositive variable paired with <= constraint
We can deduce valid equations for $x_1, x_2, x_3, x_4$ in two different ways:
- As you've said, whenever a dual variable is positive, the corresponding primal constraint is tight, giving us:
\begin{align}
x_1 + 2x_2 + 3x_3 + x_4 &= 2 & \text{since } y_1 > 0 \\
2x_1 − x_2 + x_3 − 3x_4 &= 3 & \text{since } y_2 > 0
\end{align}
- Conversely, whenever a dual constraint is not tight, the corresponding primal variable is not positive, giving us:
\begin{align}
x_4 &= 0 & \text{since }y_1 - 3y_2 &< 6
\end{align}
This is still fewer equations than variables, which is a sign of degeneracy in the dual solution: with two dual variables, three constraints are tight, meaning three lines meet at a single point. This usually doesn't happen.
If it does happen, that means we need to do extra work. In this case, we could solve the three equations with $x_1$ as a free variable and get
\begin{align}
x_1 &= x_1 \\
x_2 &= x_1 - \tfrac75 \\
x_3 &= -x_1 + \tfrac85 \\
x_4 &= 0
\end{align}
All solutions of this form are optimal, but not all are feasible. In this case, we can just look at this solution and see that any choice of $x_1$ with $\frac75 \le x_1 \le \frac85$ will give a feasible (and optimal) solution. In general (for bigger systems), we'd probably need to do one or more steps of the simplex method to get a feasible solution from something like this.
(You could also try setting some more primal variables to $0$ at random. As you can see from this example, setting $x_1=0$ would not work, but $x_2=0$ or $x_3=0$ would. This is pure guesswork, but we do know that if there's degeneracy, then some primal variable can be set to $0$ even though its corresponding dual constraint is tight.)
Best Answer
When you add slack variables, the dual program isn't affected.
In the original primal program, there are two variables $x_1, x_2$, corresponding to two constraints in the dual; there are two constraints, corresponding to two dual variables which we'll call $u_1$ and $u_2$. Because the constraints are inequalities, $u_1$ and $u_2$ will be nonnegative variables. Here is the primal-dual pair: \begin{array}{rrll rrll} \text{maximize } & 6x_1 + 10x_2 & & & \text{minimize} & 60u_1 + 45u_2 \\ & 2x_1 + 8x_2 & \le 60 & (u_1) & & 2u_1 + 3u_2 & \ge 6 & (x_1) \\ & 3x_1 + 5x_2 & \le 45 & (u_2) & & 8u_1 + 5 u_2 & \ge 10 & (x_2) \\ & x_1, x_2 & \ge 0 & & & u_1, u_2 & \ge 0 \end{array}
When we add slack variables in the primal, two things change. First, the constraints become equations, which means $u_1, u_2$ are now unrestricted variables (with no nonnegativity constraints). Second, there are now two more dual constraints corresponding to the slack variables $s_1$ and $s_2$. Those dual constraints turn out to be exactly the constraints $u_1 \ge 0$ and $u_2 \ge 0$ which we lost from the first change. So we get an identical dual:
\begin{array}{rrll rrll} \text{maximize } & 6x_1 + 10x_2 & & & \text{minimize} & 60u_1 + 45u_2 \\ & 2x_1 + 8x_2 + s_1 & = 60 & (u_1) & & 2u_1 + 3u_2 & \ge 6 & (x_1) \\ & 3x_1 + 5x_2 + s_2 & = 45 & (u_2) & & 8u_1 + 5 u_2 & \ge 10 & (x_2) \\ & x_1, x_2, s_1, s_2 & \ge 0 & & & u_1 & \ge 0 & (s_1) \\ & & & & & u_2 & \ge 0 & (s_2) \end{array}
If you like, you can write both dual programs in matrix notation as $\mathbf u^{\mathsf T}\!A \ge \mathbf c^{\mathsf T}$. This gives us $$ \begin{bmatrix}u_1 & u_2\end{bmatrix} \begin{bmatrix}2 & 3 \\ 8 & 5\end{bmatrix} \ge \begin{bmatrix}6 & 10 \end{bmatrix} $$ in the first dual, and $$ \begin{bmatrix}u_1 & u_2\end{bmatrix} \begin{bmatrix}2 & 3 & 1 & 0 \\ 8 & 5 & 0 & 1\end{bmatrix} \ge \begin{bmatrix}6 & 10 & 0 & 0\end{bmatrix} $$ in the second dual. The change is because in the first dual, we're thinking of $u_1 \ge 0$ and $u_2 \ge 0$ as nonnegativity constraints (treated as a special case), while in the second dual, they are just two linear constraints like any others.
We don't typically add slack variables to the dual, but if we did, it would have an identical (but slightly sillier) effect on the primal.
I think the cleanest way to do it is to add a nonpositive slack variable: turn $2u_1 + 3u_2 \ge 6$ into $2u_1 + 3u_2 + w_1 = 6$, where $w_1 \le 0$. A nonpositive slack variable in the dual will correspond to a $\ge$ constraint in the primal, which will replace the nonnegativity constraint on $x_1$. We'll get: \begin{array}{rrll rrll} \text{maximize } & 6x_1 + 10x_2 & & & \text{minimize} & 60u_1 + 45u_2 \\ & 2x_1 + 8x_2 + s_1 & = 60 & (u_1) & & 2u_1 + 3u_2 + w_1 & = 6 & (x_1) \\ & 3x_1 + 5x_2 + s_2 & = 45 & (u_2) & & 8u_1 + 5 u_2 + w_2 & = 10 & (x_2) \\ & x_1 & \ge 0 & (w_1) & & u_1 & \ge 0 & (s_1) \\ & x_2 & \ge 0 & (w_2) & & u_2 & \ge 0 & (s_2) \\ & s_1, s_2 & \ge 0 & & & w_1, w_2 & \le 0 \end{array}
Note that $s_1, s_2$ still have special-cased nonnegativity constraints, just like $w_1, w_2$ still have special-cased nonpositivity constraints.
If we really wanted to do terrible, unnatural things to our primal-dual pair, we could add slack variables to the constraints $x_1 \ge 0, x_2 \ge 0, u_1 \ge 0, u_2 \ge 0$. This would turn the nonnegativity constraints on $s_1, s_2$ and the nonpositivity constraints on $w_1, w_2$ into ordinary constraints, make the matrix even bigger, and add more variables to both programs. You can keep going like this indefinitely, creating bloated primal-dual pairs that are ultimately equivalent to the original.