Suppose we have the following problem: $ \text{minimize } \ f(x) \\ \text{subject to } \ Ax = b$
How do we know whether to write the Lagrangian Dual as $ \text{minimize } f(x) + \lambda(Ax-b)$ versus $ \text{minimize } f(x) + \lambda(b-Ax)?$
Suppose we have the following problem: $ \text{minimize } \ f(x) \\ \text{subject to } \ Ax = b$
How do we know whether to write the Lagrangian Dual as $ \text{minimize } f(x) + \lambda(Ax-b)$ versus $ \text{minimize } f(x) + \lambda(b-Ax)?$
We don't, and it does not matter. The $\lambda$ you are going to find will change sign. See also here.