# Verifying the correctness of KKT conditions

I have a LP problem and derived the corresponding KKT conditions for the same. I simulated the LP and obtained the primal and dual values and manually checked if the KKT conditions hold. Is there any other way to check the correctness of KKT conditions?

• What do you mean by "check the correctness"? The KKT conditions tell you whether a given point $x$ satisfies the necessary conditions of optimality, therefore you need a point $x$ to check them. You could however simply solve your LP (e.g. using simplex or barrier methods) and those are guaranteed (providing a good implementation and not awful numerics) to yield the optimal solution (and hence satisfy the KKT conditions). – Richard Jul 16 at 7:19