Advanced maths

Conic optimization calculator with second order cone and semidefinite constraints

Minimize a linear objective over affine inequalities, second-order cones and small positive-semidefinite matrix constraints, with explicit numerical feasibility diagnostics.

Your numbers

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

Minimize a linear objective over affine inequalities, second-order cones and small positive-semidefinite matrix constraints, with explicit numerical feasibility diagnostics.

THE FORMULAMinimize cᵀx subject to bounds, Ax≤b, ||A_k x+b_k||₂≤c_kᵀx+d_k and F_0+Σx_i F_i ⪰0.

A worked example

Minimize -x-y on the unit disk with bounds [-2,2] and PSD block [[1,x],[x,1]]. The optimizer is x=y=1/√2, objective -√2, SOC margin zero and PSD minimum eigenvalue 1-1/√2.

Good to know

One to six real decision variables, finite box bounds, at most two SOC blocks of dimension2–4 and two symmetric affine PSD blocks of order2–3, plus up to eight affine rows. Numerical primal logarithmic-barrier solution with feasibility margins, central-path stationarity residual and an estimated barrier gap; this is not an exact dual certificate. Phase-I or iteration failure is unresolved; do not label it infeasible without a validated certificate. Non-Slater and poorly conditioned models may remain unresolved; no exact-arithmetic optimality claim.

Write the cone model explicitly

The model uses one through six real decision variables and a fixed linear minimization objective. Bounds are finite for every variable. Ordinary affine rows use coefficient dot x less than or equal to a right-hand side. A second-order cone block is entered as matrices and vectors describing norm(Ax+b) less than or equal to c dot x plus d.

Each semidefinite block is a constant symmetric matrix plus one symmetric coefficient matrix for each variable. Positive semidefinite means that every eigenvalue is nonnegative; it does not mean that every matrix entry is nonnegative. Keeping the affine blocks visible makes the model reviewable and prevents a nonlinear-looking expression from being accepted without a supported convex representation.

A supporting objective meets a cone boundaryx = y = 1/√2Objective = −√2SOC margin = 0PSD margin ≈ 0.2929Unit-disk feasible region
Scroll across to see the full diagram.
The norm cone is active at the disk optimizer while the matrix constraint has a positive margin.

Compare this with the Convex quadratic programming calculator with constraints. Optimizes a linear objective under affine Euclidean-norm and positive-semidefinite matrix constraints. The existing QP supports a PSD objective Hessian but explicitly excludes quadratic/conic constraints; the existing quartic SOS page only verifies a finite Gram candidate set. SOC and SDP formats belong on this ONE conic page, not separate equivalent cone-format URLs.

Understand the common convex structure

A norm cone and the positive-semidefinite cone are convex sets. Their affine inverse images remain convex, and intersecting them with a box and affine inequalities preserves convexity. A linear objective therefore has no isolated bad local minimum inside the feasible set. This structural observation explains why one conic optimization page can support both norm and matrix constraints under a common solver interface.

Convexity alone does not guarantee an easy numerical certificate. The feasible set can have no strictly feasible point, can be very thin, or can be badly scaled. Boundary-only models require special care because a barrier method normally approaches feasible interiors. A failed phase-one or central-path iteration must remain unresolved unless a separate validated certificate establishes infeasibility.

Read feasibility and central-path evidence together

A primal candidate consists of the decision vector and its constraint slacks. The SOC margins and minimum PSD eigenvalues show how closely it satisfies the entered model. This implementation follows a primal logarithmic barrier through strictly feasible points, then reports the stationarity residual of the final barrier objective. It does not return a separately verified exact dual solution.

The barrier parameter and the cone barrier dimensions provide an estimated central-path gap when the central equations are sufficiently resolved. That estimate should be read alongside stationarity and feasibility, rather than as observed equality between two independently certified objective bounds. Floating output remains numerical. A failed phase-one or Newton solve leaves the problem unresolved, including models whose feasible set has no strict interior.

Verify the default disk problem

The default objective is minus x minus y, so minimizing it maximizes x+y over the unit disk. Cauchy–Schwarz gives x+y at most sqrt(2)*sqrt(x²+y²), hence at most sqrt(2). Equality requires x=y and unit norm, giving x=y=1/sqrt(2). The objective is therefore exactly minus sqrt(2).

The extra matrix constraint has eigenvalues 1+x and 1-x. At the disk optimizer its smaller eigenvalue is 1-1/sqrt(2), approximately 0.2928932188, so it is feasible with a positive matrix margin. The norm cone is active while the box and PSD block are inactive. This example checks multiple cone representations without confusing an inactive matrix constraint with the active geometric boundary.

Interpret the feasible-set illustration

The picture shows a circular feasible region and a supporting line representing a constant linear objective. At the optimum, moving that line farther in its preferred direction would leave the disk. A separate matrix-margin annotation reminds the reader that another constraint can be satisfied strictly even when the optimizer lies on a different boundary.

For edited high-dimensional models, the static two-dimensional drawing is an explanation of the default geometry rather than a projection certified to represent the entered feasible set. Read the actual cone residuals and matrix eigenvalue margins from the output. A two-variable slice can hide constraints involving other coordinates, and an attractive plotted boundary should never substitute for verification of the complete model.

Respect resource and conditioning limits

The calculator permits at most two SOC blocks of dimensions two through four, at most two PSD blocks of orders two or three, and at most eight extra affine rows. These limits keep dense barrier calculations and diagnostics tractable in a browser. They are not a claim that conic optimization itself is limited to such small models.

Coefficients with dramatically different units can create poor conditioning even in a tiny problem. Rescale variables and constraints so that meaningful magnitudes are comparable, then transform the returned solution back consistently. Very small eigenvalue margins are especially sensitive to perturbation. The page should flag that sensitivity and preserve an unresolved outcome rather than clipping a negative eigenvalue and silently changing the problem.

Choose conic optimization for actual cone constraints

A quadratic-programming page handles a globally quadratic objective with affine constraints, which differs from constraining a norm or a variable-dependent matrix. Some models can be reformulated between those families, but the reformulation must preserve the entire feasible set and objective. Here the cone blocks are explicit inputs, so their margins and dual interpretation can be reviewed directly.

The output is a numerical result conditional on the entered convex model and the solver diagnostics. It does not prove arbitrary symbolic convexity, handle integer variables or search nonconvex matrix constraints. Save the model JSON, coefficient units, tolerances and termination status alongside the candidate. Reproducible numerical evidence is more useful than a bare optimum claim that omits how closely the constraints were satisfied.

A few questions, answered

Does PSD mean nonnegative entries?

No. It means every eigenvalue of the symmetric matrix is nonnegative.

Is phase-one failure proof of infeasibility?

No. Without a validated certificate the status remains unresolved.

Can the optimum lie on a cone boundary?

Yes. Active cones commonly have zero margin at an optimum.

Are outputs exact?

No. This solver reports numerical candidates and feasibility, stationarity and gap diagnostics.

Find your calculator

Start typing to explore the library.