In linear programming, the dual problem is formulated using the information from the primal problem. The primal problem is the original linear programming problem where the goal is to maximize or minimize an objective function subject to certain constraints. By using the primal problem's coefficients, the dual problem is created in such a way that its solution provides useful information about the optimal solution to the primal problem.
The dual problem provides a different perspective on the same problem, and it is particularly useful in determining the economic interpretation of the constraints. For example, the dual variables represent the shadow prices, which indicate the rate of change in the objective function for a unit increase in the right-hand side of a constraint.
Formulating the dual problem helps in gaining deeper insights into the primal problem, and the duality theorem guarantees that the optimal value of the primal problem is equal to the optimal value of the dual problem, provided both problems have feasible solutions.