Advanced maths

Minimum enclosing ellipse calculator for planar points

The minimum enclosing ellipse problem finds an affine quadratic enclosure for a planar point set.

Your numbers

3–64 x,y rows spanning a nonzero area.

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

The minimum enclosing ellipse problem finds an affine quadratic enclosure for a planar point set. This calculator uses a bounded dual iteration, reconstructs the center and quadratic form, then enlarges the result just enough to contain every supplied point with a roundoff margin. It clearly reports whether the optimization tolerance was reached.

THE FORMULAE={x:(x−c)ᵀA(x−c)≤1}; minimize ellipse area π/sqrt(det A) subject to containment.

A worked example

The four corners (±2,±1) have enclosing ellipse x²/8+y²/2≤1. Its semi-axes are sqrt(8) and sqrt(2), so its area is 4pi. Each corner lies on the boundary. A circle of radius sqrt(5) also encloses the points but has larger area 5pi.

Good to know

3–64 planar points spanning two dimensions. Khachiyan-style iteration has a 30,000-step cap and target dual design gap 10^−5. Capped results are approximate enclosures, not certified minima. Collinear or numerically singular sets are rejected; geometric roundoff is not an exact containment proof.

The quadratic form carries orientation and scale

The ellipse is represented by a center and a positive-definite two-by-two matrix. Off-diagonal entries rotate its principal directions relative to the coordinate axes. Semi-axis lengths come from the eigenvalues of that matrix, so simply reading the diagonal entries would give the wrong axes for a rotated point cloud.

Before iteration, the points are centered and scaled to keep the numerical system manageable. The final center and quadratic form are mapped back into the original coordinates. Area therefore uses the square of the coordinate scale, while the reported semi-axis lengths use the scale itself.

The rectangle corners lie on an ellipse with area four pia = √8; b = √2Area = 4πCorners on boundary
Corners (±2,±1) satisfy x²/8+y²/2=1. Semi-axis lengths sqrt(8) and sqrt(2) give area 4pi. The ellipse passes through every corner and has less area than the enclosing circle of radius sqrt(5).

The Smallest enclosing circle calculator for points covers a related task. This page focuses on minimum enclosing ellipse calculator for planar points with the method limits and worked example described below.

Optimization progress and enclosure are separate guarantees

The dual iteration updates nonnegative weights on the supplied points and monitors the largest leverage-like score against the two-dimensional optimal-design target. Reaching the printed gap tolerance indicates numerical convergence of that algorithm. Stopping at the iteration cap does not establish that the current ellipse has minimum area.

After recovering the ellipse, the calculator evaluates every point’s quadratic value and inflates the ellipse if necessary. This gives a verified numerical enclosure at the supplied precision even when optimization is unfinished. The status therefore distinguishes an enclosure from an achieved minimum-area tolerance instead of using a single unqualified success label.

Degenerate point sets need a different model

Collinear points have an enclosing ellipse whose area can shrink toward zero, so there is no ordinary positive-area optimum with a nonsingular quadratic matrix. Nearly collinear data can also make the matrix inversion unstable. Such cases are rejected rather than returning extremely large coefficients with a misleading precision display.

The smallest enclosing circle calculator constrains both principal radii to be equal. Allowing an ellipse can reduce area substantially for elongated data, but that flexibility changes the optimization problem. This page encloses only the listed points; it does not estimate a confidence ellipse or a probability region for an underlying population.

A few questions, answered

Is this a confidence ellipse?

No. It is a deterministic enclosure of the supplied points, with no probability model.

What if the iteration cap is reached?

The page returns an inflated approximate enclosure and explicitly leaves the optimization tolerance unmet.

Find your calculator

Start typing to explore the library.