Proof (optimality in the transport problem)

The Lagrangian of the transport problem is given by $$ \begin{align*} L(x,\v \lambda,\v \mu) &= \sum_{i=1}^{n} \sum_{j=1}^{m} c_{ij} x_{ij} - \sum_{i=1}^{n} \lambda_i\left(\sum_{j=1}^{m} x_{ij} - s_i\right) - \sum_{j=1}^{m} \mu_j \left(\sum_{i=1}^{n} x_{ij} - d_j\right) \\ &= \sum_{i=1}^{n} \sum_{j=1}^{m} (c_{ij}-\lambda_i - \mu_j) x_{ij} + \sum_{i=1}^{n} \lambda_i s_i + \sum_{j=1}^{m} \mu_j d_j. \end{align*} $$

$(\v \lambda,\v \mu)$ being dual feasible means that $L$ has a finite minimum over $x\geq 0$, which holds if and only if $c_{ij} - \lambda_i - \mu_j \geq 0$.

Complementary slackness here refers to $x_{ij} (c_{ij} - \lambda_i - \mu_j) = 0$ due to the inequality constraints in the dual problem.

The transport problem is a linear program, and primal feasible and dual feasible solutions in a linear program are optimal iff complementary slackness holds.