Quadratic Programming Solver Calculator

Model convex or indefinite objectives with linear restrictions and limits. Review KKT-style candidates clearly now. Plot feasible regions, export summaries, and verify optimal points.

Solver Inputs


Linear Constraints

Each constraint uses the form αx + βy relation rhs. Leave a full row blank to ignore it.

Candidate Solution Table

# x y Objective Active Constraints Generated From
1 1.428571 2.285714 -12.571429 None Interior stationary point
2 1.428571 3.285714 -11.571429 C2 Edge stationary point on C2
3 2.187500 2.437500 -11.281250 C3 Edge stationary point on C3
4 2.000000 3.000000 -11.000000 C1, C2, C3 Intersection: C1 & C2 | Intersection: C1 & C3 | Intersection: C2 & C3 | Edge endpoint on C1 | Edge endpoint on C2 | Edge endpoint on C3
5 0.000000 3.000000 -9.000000 x ≥ xmin Edge stationary point on x = xmin
6 0.000000 4.000000 -8.000000 C2, x ≥ xmin Intersection: C2 & x = xmin | Edge endpoint on C2 | Edge endpoint on x = xmin
7 2.000000 0.000000 -8.000000 y ≥ ymin Edge stationary point on y = ymin
8 3.000000 0.000000 -6.000000 C3, y ≥ ymin Intersection: C3 & y = ymin | Edge endpoint on C3 | Edge endpoint on y = ymin
9 0.000000 0.000000 0.000000 x ≥ xmin, y ≥ ymin Intersection: x = xmin & y = ymin | Edge endpoint on x = xmin | Edge endpoint on y = ymin

Plotly Graph

The contour map shows the objective. The dot cloud marks feasible grid samples. The star marks the reported optimum.

Example Data Table

Item Sample Value
GoalMinimize
Objective0.5(4x² + 2xy + 2y²) - 8x - 6y
Constraint 1x + y ≤ 5
Constraint 2x + 2y ≤ 8
Constraint 33x + y ≤ 9
Bounds0 ≤ x ≤ 6 and 0 ≤ y ≤ 6
Expected Optimal Point(1.428571, 2.285714)
Expected Objective-12.571429

Formula Used

This calculator solves a two-variable quadratic program with bounded decision space. The objective is f(x,y) = 0.5(ax² + 2bxy + cy²) + dx + ey + f₀.

Linear restrictions use the form αx + βy ≤ rhs, αx + βy ≥ rhs, or αx + βy = rhs. The solver evaluates interior stationary points, boundary stationary points, and boundary intersections.

For stationary points, it solves the first-order system: ax + by + d = 0 and bx + cy + e = 0. It then filters every candidate through feasibility tests and ranks them by the chosen goal.

How to Use This Calculator

  1. Choose whether you want to minimize or maximize the quadratic objective.
  2. Enter the six objective coefficients a, b, c, d, e, and f₀.
  3. Set x and y lower and upper bounds to define the search region.
  4. Fill in up to four linear constraints. Leave unused rows blank.
  5. Click Solve Quadratic Program to compute the best feasible point.
  6. Review the objective value, active constraints, candidate table, and contour graph.
  7. Use the CSV or PDF buttons to save the result summary.

Frequently Asked Questions

1. What does this solver optimize?

It optimizes a two-variable quadratic objective with optional linear inequalities, equalities, and finite bounds. You can solve either minimization or maximization cases within the chosen search region.

2. Why are x and y bounds required?

Bounds keep the search region finite and support stable contour plotting. They also help avoid ambiguous cases where a problem could extend without limit.

3. Can I enter equality constraints?

Yes. Choose the equals relation in any constraint row. The solver treats that line as mandatory and only keeps candidate points that satisfy it within a small tolerance.

4. How is the best point selected?

The page checks interior stationary points, line-based stationary points, edge endpoints, and boundary intersections. Every feasible candidate is evaluated, then the best objective value is selected.

5. What does the active constraint list mean?

Active constraints are the restrictions that are tight at the reported optimum. In practice, their left and right sides match within numerical tolerance.

6. Does the chart show the exact feasible region?

The contour surface is exact for the objective on the plotted grid. The feasible cloud is a sampled visualization, while the reported optimum comes from analytic candidate checks.

7. What if no feasible solution appears?

That usually means your bounds and constraints do not overlap, or one enabled constraint row is invalid. Adjust the relations, right sides, or bounds and solve again.

8. When should I trust the Hessian determinant?

The determinant helps describe curvature, but it does not replace feasibility analysis. Use it together with the candidate table, active constraints, and plotted region.

Related Calculators

knapsack problem solverprofit maximization calculatorslack variable calculatorbranch and bound solverconstrained optimization solverdual simplex solvergenetic algorithm solvertransportation problem solverconstraint satisfaction solverpower flow optimization

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.