The duality gap splits into two sums. The first is resource price times unused capacity. The second is production times the excess assigned resource value over product contribution. For feasible primal and dual points, every term is nonnegative. Zero gap therefore requires each product to be zero. This decomposition explains complementary slackness and gives you a practical numerical check in the lab.
