Ellipse naturally associated with a polygon My colleagues and I have stumbled onto a way to associate an ellipse, or equivalently a positive definite symmetric matrix, to a polygon that is different from other better known ways. We want to know if anyone has ever seen this before. Before describing this, I do want to note that there are other well-known ways of associating an ellipse to a polygon, including the matrix of second moments of the uniform distribution supported on the interior of the polygon and the so-called John ellipses, which are the ellipse of largest volume inscribed in the polygon and the one of smallest volume circumscribing the polygon.
Here is the ellipse we found: Given a polygon $P$ that contains the origin in its interior, let $\ell_1, \dots, \ell_n$ denote the lines that contain the sides of $P$. For each $i$, let $n_i$ denote the unit vector orthogonal to $\ell_i$, $h_i$ be the distance from the origin to the line $\ell_i$, and $s_i$ be the length of the side lying in $\ell_i$. For each $v \in R^2$, define
$ q(v) = \sum_{i=1}^n (v\cdot n_i)^2\frac{s_i}{h_i}. $
Let $E_P = \{ q(v) \le 1\}.$ The ellipse $E_P$ does not behave particularly nicely under translations of $P$. It however, behaves nicely under linear transformations. In particular, if $A$ is an invertible linear transformation with determinant $1$, then $E_{AP} = AE_P$. It is scale-invariant in that $E_{tP} = E_P$ for any $t > 0$.
The ellipse $E_P$ can in fact be defined without using the inner product and is a linear invariant of the polygon $P$. Its definition can be extended to any body $P$ containing the origin with a sufficiently regular boundary. It is an example of a matrix-valued valuation on the set of all convex bodies that contain the origin in their interior. Its volume is maximized if and only if the body $P$ is itself an ellipsoid centered at the origin.
Does anyone recognize this association of an ellipse to a polygon? I would be grateful for any information or references.
EDIT: Vladimir's comments below, especially the first sentence, indicate clearly that I omitted something crucial. The definition of the ellipsoid depends on the choice of the volume form in the ambient vector space (and the dual volume form in the dual vector space). Changing the volume form will rescale the ellipsoid by a factor. However, if you fix the volume form, then the ellipsoid is invariant under rescaling of the convex body.
This observation, however, makes the existence of a scale-invariant ellipsoid associated with the polygon much less surprising.
 A: Maybe it would have been more convincing if you had given the definition of $q_K$ in a unimodularly equivariant way from the beginning.  That's not at all hard to do, and it's also easy to see how to create many more such (and how to create many more in all dimensions).
For example, suppose $K\subset V$ has vertices $v_0,v_1,\ldots,v_n=v_0$ (cyclically ordered counterclockwise, say).  Let $\alpha_i\in V^\ast$ be the unique element that satisfies $\alpha_i(v_i)=\alpha_i(v_{i+1})=1$.  Then 
$$
q_K = \sum_{i=0}^{n-1} \Omega(v_i,v_{i+1})\ {\alpha_i}^2
$$
(where $\Omega$ is the area form.)  This is clearly unimodularly equivariant with respect to $K$ and, since, for $K' = tK$ (with $t>0$), one has $v'_i = tv_i$ and  $\alpha_i' = (1/t)\alpha_i$, it follows that $q_{tK} = q_K$.  Of course, anything like this would have worked.  For example, you could have taken
$$
\tilde q_K = Area_\Omega(K)\left( \sum_{i=0}^{n-1}  {\alpha_i}^2\right),
$$
and this would also have had the same equivariance property.
In dimension $n$, I think that the right formula would be to define, for each face $F$ of $K$, the element $\alpha_F\in V^\ast$ to be the linear function that equals $1$ on $F$, let $\Omega(F)$ denote the volume of the cone with vertex $0\in V$ whose base is $F$, and then set
$$
q_K = \sum_{F\in\mathcal{F}(K)} \Omega(F)\ {\alpha_F}^2.
$$
If you want it to be invariant under scaling, you should take
$$
q_K = \sum_{F\in\mathcal{F}(K)} \Omega(F)^{2/n}\ {\alpha_F}^2.
$$
Perhaps, better, though, would be to take 
$$
q_K = Vol_\Omega(K)^{(2-n)/n}\ \left(\sum_{F\in\mathcal{F}(K)} \Omega(F)\ {\alpha_F}^2\right),
$$
since this is also invariant under subdivision of the faces of $K$.
A: I am confused: is this not the construction in:
MR1781476 (2001j:52011) 
Lutwak, Erwin(1-PINY); Yang, Deane(1-PINY); Zhang, Gaoyong(1-PINY)
A new ellipsoid associated with convex bodies. 
Duke Math. J. 104 (2000), no. 3, 375–390. 
52A40 (52A39) 
If so, why ask now :)
A: (Just a question, not an answer.)
@Deane: Does the ellipse have a clear geometric relationship to the polygon?
I believe it is always a circle for a centered regular polygon.
For the equilateral triangle below, I compute
$$3 \sqrt{3} (x^2 + y^2 ) = 1$$
and for the right triangle, centered as illustrated,
$$6 x^2 + 4xy + 6y^2 = 1 \;.$$

   

A: Dear  Dean, Dear All, 
This is hopefully the last (4th) edition of my answer.  I spend few hours in calculations which could be dismissed would I think a bit before doing them. I believe that now I understand what happens and what most of you probably knew before.
First of all, there exists no  canonical construction  $K\mapsto E_K$  of an ellipse by a convec body (I understand canonically as ``depends only on the linear structure and on $K$'')  such that  it satisfies  $E_{tK} =E_K$. The reason is that this would imply the existence of a canonical euclidean structure in a 2-dimensional space equipped with a  linear  complex structure, which is wrong because the group of the linear  transformations preserving a complex structure is bigger than the group of linear transformations preserving a  euclidean structure. 
Indeed, consider a two-dimensional linear complex structure  on $\mathbb{R}^2$, i.e., fix a  matrix $J$  such that  $J^2= -1$. The group of linear transformations  preserving the complex structure evidently  contains the scalings $(x,y)\mapsto \textrm{const} \cdot (x,y)$ and therefore can not preserve any euclidean structure.   
Suppose there exists a  canonical construction of an ellipsoid $E_K$  by a convex  body $K$  such that  it behaves as follows w.r.t. to linear transformations:  for every linear transformation $A$ with $det(A)= 1$ we have $A E_K = E_{AK}$; for every scaling $S:\mathbb{R}^2 \to \mathbb{R}^2$,  $(x,y)\stackrel{S}\mapsto \textrm{const} \cdot (x,y)$  we have $E_{SK}= E_K$.  Then, we can construct a canonical  scalar product on our $\mathbb{R}^2$. Indeed, having $J$, we have a canonical notion of a circle centered at  $\vec 0$. More precisely, in every real linear 2dim-space we have the notion of an ellipse. 
 A circle around $\vec 0$ is an ellipse which is $J-$invariant.  As you see, in order to define an  ellipse  we used the linear structure of $\mathbb{R}^2$ and the complex structure  $J$ only, so any linear  transformation that preserves $J$, in particular every
scaling $(x,y)\stackrel{S}\mapsto \textrm{const} \cdot (x,y)$  takes a circle centered at $\vec 0$ to a circle centered at $\vec 0$. 
round 
Now suppose your construction $K\mapsto E_K$ exists. As  $K$, take the round ball centered at the origin.  The  freedom in choosing such a convex body  is its scaling $K\mapsto \textrm{const}\cdot K$; if  the construction do not depend on scaling  we obtain that the freedom in choosing  such a  convex body does not affect the 
ellipse $E_K$ (which must also be a circle because of the symmetry) 
  we obtain a canonical  inner product on $(\mathbb{R}^2, J)$. There is no such product though, by the  reasons I explained before: the group of complex transformations is bigger than the group of the orthogonal transformations.   
Thus, there is no hope to construct a scaling-equivarinat   and  linear-transformations-invariant ellipse by a convex body in $\mathbb{R}^2$, so it must something be wrong with the announced properties of the construction from the question.  I should confess that first I thought  that the problem is with the invariance of the construction w.r.t. linear transformations, and bothered Deane and you all with attempts of counterexamples. 
No, the problem is not with the behavior of the construction w.r.t. the linear transformations! The problem is that the construction is NOT CANONICAL. 
Indeed, it depends on the choice of the euclidean structure in the space: if you multiply the euclidean structure by a constant, the resulting ellipsoid will be the initial divided by the square of this constant!
Actually, since the   construction is indeed invariant w.r.t. to linear transformations with determinant  $1$, one can think that the information we need from the euclidean structure is its volume form only. This was pointed out by Deane to me in one of his comment, with a hint that normally should be sufficient for me to understand everything without doing the calculations.  It is also  stays inexplicit in the edited version of Deane's question.  
By the way, the ``original'' version  of the construction in the paper MR1781476 (2001j:52011) Lutwak, Erwin(1-PINY); Yang, Deane(1-PINY); Zhang, Gaoyong(1-PINY) A new ellipsoid associated with convex bodies. Duke Math. J. 104 (2000), no. 3, 375–390. 52A40 (52A39) does have additional term  inside, which makes the construction to be volume-form-independent, but the resulting ellipse does not have the desired property $E_{tK}= E_K$ anymore. 
Now, if you do not require the property $E_{tK}= E_K$, there exist tons of canonical constructions of an ellipse by a convex body. You  even can  do these construction the whole-affine-group-invariant, by first moving  the body such that  its barycenter is located in the origin of the coordinate system you are doing the construction  starting from. 
[Edit record --1st attempt: added the explanation why it could not worked at all and corrected the counterexample] [Edit record -- 2nd attempt: the previous  counterexample did not work, now the new one that works is there]  [Edit record -- 3 attempt:One more unsuccesful counterexample] [Edit record: -- 4th attempt: explanation that the construction is not invariant]
