ForHosting KIT · Math

Corner point calculator

Enter the objective coefficients and the corners of the feasible region and see which corner scores highest: for 3x + 5y over (0, 0), (0, 4), (3, 3) and (5, 0), the best is (3, 3), worth 24. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Objective
3, 5
You get
Optimal vertex
3, 3
Objective value
24
Index
2
Vertices evaluated
4

The corner point calculator answers the last step of any linear programming exercise: given the objective coefficients and the corner points of the feasible region, which vertex maximizes the objective, and what value does it reach? A linear objective over a convex polytope always attains its optimum at a vertex, so evaluating the objective at each corner point and keeping the best one is not an approximation — it is the exact solution.

Why the optimum is always a corner point

The fundamental theorem of linear programming says that if a linear program has an optimal solution and its feasible region has at least one vertex, then some vertex is optimal. A linear objective moves in parallel level sets; pushing those sets in the direction of improvement eventually presses them against an extreme point of the feasible polytope. That is why textbook methods — graphical solutions in two variables, the simplex method in higher dimensions — reason exclusively about corner points.

If you have already enumerated the vertices of your feasible region, the remaining work is purely arithmetic: compute c·x at each vertex and pick the largest. Because it evaluates every vertex, it also tells you how many candidates were compared, which is useful when you audit a solution or teach the method step by step.

Preparing the vertices from your constraints

The input is deliberately simple: an objective array and a vertices array, where every vertex is an array of numbers with the same length as the objective. Getting those vertices is your job — typically by intersecting pairs of constraint lines in two dimensions, or by running a vertex-enumeration routine in higher dimensions. Ties are deterministic: when two vertices reach the same maximum value, the one that appears first in your list wins, so repeated calls with the same input always return the same answer byte for byte.

Reading the result and automating it

The index matters in practice because vertices usually come with labels in your own model — machine mix A, portfolio B — and the position lets you map the answer back without a fragile coordinate comparison. Typical automations include grading student assignments against a reference solution, verifying that a solver's reported optimum matches an independent vertex enumeration, and scoring small scheduling or blending models where enumerating corners is cheaper than deploying a full LP solver.

Finish a graphical LP exercise

After finding the feasible corners of a two-variable problem by hand, confirm which one maximizes profit without redoing the arithmetic.

Grade optimization homework at scale

Automate the comparison between a student's submitted corner points and the reference answer, one deterministic call per submission.

What if several vertices reach the same maximum?

The first one in your list wins. The tie rule is deterministic, so identical input always produces the identical answer.

Does it check that my vertices satisfy the constraints?

No. It never sees your constraints — it trusts the vertex list you send. Feasibility must be established when you enumerate the corners.

Which dimensions are supported?

Any dimension from 1 up to the documented limit, as long as every vertex has exactly the same length as the objective array.

Why is the optimum of a linear program always at a corner point?

Because a linear objective improves steadily in one direction, so pushing it as far as the feasible region allows ends at an extreme point. If an optimal solution exists and the region has a vertex, some vertex is optimal.

How do I find the corner points of the feasible region?

In two variables, intersect pairs of constraint lines and keep the intersections that satisfy every constraint; in more dimensions you need a vertex-enumeration method. The calculator does not do this step for you: it compares the corners you give it.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/math/corner-point

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/math/corner-point \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"objective":[3,5],"vertices":[[0,0],[0,4],[3,3],[5,0]]}'
{
  "objective": [
    3,
    5
  ],
  "vertices": [
    [
      0,
      0
    ],
    [
      0,
      4
    ],
    [
      3,
      3
    ],
    [
      5,
      0
    ]
  ]
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "math.corner_point",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

max_rows4096
max_cols64
max_abs1000000000000
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

You send the coefficient vector and the list of vertices; the endpoint evaluates the dot product at every vertex, applies a deterministic tie rule, and returns the winning vertex, its objective value and its position in your list. It runs in milliseconds, keeps nothing, and the same code runs free in your browser on this page.

Why the optimum is always a corner point

This endpoint does exactly that, with strict validation so a malformed vertex or a dimension mismatch fails loudly instead of silently corrupting your result.

Preparing the vertices from your constraints

Each vertex you send must be feasible; the endpoint trusts the list you provide and does not re-check constraints, because it never sees them. Every coordinate must be a finite number within the documented magnitude limit, and an empty vertex list is rejected with an invalid_input error, since a feasible region with no corner points has nothing to optimize over.

Reading the result and automating it

The response carries four fields: optimal_vertex, a copy of the winning coordinates; objective_value, the maximum c·x attained; index, the zero-based position of that vertex in the array you sent; and vertices_evaluated, the count of candidates compared.

Cross-check an LP solver

Feed an independently enumerated vertex list and the objective into the endpoint and verify that the solver's reported optimum matches.

What does it cost?

$0.002 per request via the API. It is also free to run in your browser on this page — the same code executes both ways.

What happens with an empty vertex list?

The request is rejected with an invalid_input error and is not charged: without corner points there is nothing to optimize over.

Can it minimize instead of maximize?

Negate the objective coefficients and the returned objective_value: maximizing −c·x is the same as minimizing c·x.

Read the full KIT documentation →