In mathematics, the **John ellipsoid** or **Löwner–John ellipsoid** *E*(*K*) associated to a convex body *K* in *n*-dimensional Euclidean space **R**^{n} can refer to the *n*-dimensional ellipsoid of maximal volume contained within *K* or the ellipsoid of minimal volume that contains *K*.

Often, the minimal volume ellipsoid is called the Löwner ellipsoid, and the maximal volume ellipsoid is called the John ellipsoid (although John worked with the minimal volume ellipsoid in its original paper).^{[1]} One can also refer to the minimal volume circumscribed ellipsoid as the **outer** **Löwner–John ellipsoid**, and the maximum volume inscribed ellipsoid as the **inner** **Löwner–John ellipsoid**.^{[2]}

The German-American mathematician Fritz John proved in 1948 that each convex body in **R**^{n} is circumscribed by a unique ellipsoid of minimal volume, and that the dilation of this ellipsoid by factor 1/*n* is contained inside the convex body.^{[3]} That is, the outer Lowner-John ellipsoid is larger than the inner one by a factor of at most *n*. For a balanced body, this factor can be reduced to .

The inner Löwner–John ellipsoid *E*(*K*) of a convex body *K* ⊂ **R**^{n} is a closed unit ball *B* in **R**^{n} if and only if *B* ⊆ *K* and there exists an integer *m* ≥ *n* and, for *i* = 1, ..., *m*, real numbers *c*_{i} > 0 and unit vectors *u*_{i} ∈ **S**^{n−1} ∩ ∂*K* such that^{[4]}

and, for all *x* ∈ **R**^{n}

In general, computing the John ellipsoid of a given convex body is a hard problem. However, for some specific cases, explicit formulas are known. Some cases are particularly important for the ellipsoid method.^{[5]}^{: 70–73 }

Let E(**A**,**a**) be an ellipsoid in **R**^{n}, defined by a matrix **A** and center **a**. Let **c** be a nonzero vector in **R**^{n}. Let E'(**A**,**a**,**c**) be the half-ellipsoid derived by cutting E(**A**,**a**) at its center using the hyperplane defined by **c**. Then, the Lowner-John ellipsoid of E'(**A**,**a**,**c**) is an ellipsoid E(**A'**,**a'**) defined by:

where b is a vector defined by:

Similarly, there are formulas for other sections of ellipsoids, not necessarily through its center.

The computation of Löwner–John ellipsoids (and in more general, the computation of minimal-volume polynomial level sets enclosing a set) has found many applications in control and robotics.^{[6]} In particular, computing Löwner–John ellipsoids has applications in obstacle collision detection for robotic systems, where the distance between a robot and its surrounding environment is estimated using a best ellipsoid fit.^{[7]}

Löwner–John ellipsoids has also been used to approximate the optimal policy in portfolio optimization problems with transaction costs.^{[8]}