TITLE: Is there a continuous way to represent a triangle with a vector with no ambiguity?
QUESTION [6 upvotes]: I'm looking for a continuous way to represent a triangle with a vector of real numbers.
If a triangle is naively represented by a triplet of 2-dimensional vertices $(\mathbf{p}_1, \mathbf{p}_2, \mathbf{p}_3)$, then the representation is dependent of the order of the points, because for every permutation of the vertices $\sigma$, the triplet $(\mathbf{p}_{\sigma(1)}, \mathbf{p}_{\sigma(2)}, \mathbf{p}_{\sigma(3)})$ would also represent the same triangle. So a triangle would not have a unique representation.
One way to ensure the unicity of representation would be to sort the points depending on a criteria: lexicographic order for example (sort on x value, then y value if x's are equal), but then the representation would not be continuous, because a tiny modification of a vertex could lead to a different order of the sorted vertices if two points were closed on the x coordinate.
So is it possible to have a computer representation that is not dependent of the order of the vertices but also continuous ? I imagine that there may be topological arguments to prove this is not possible, but I can't figure it out.

REPLY [6 votes]: If we represent each vertex by a complex number, then any triangle is uniquely determined as a triple $\,(a,b,c)\,$
of complex numbers. Let
$$e_1:=a+b+c,\quad e_2:=ab+ac+bc,\quad e_3:=abc$$ be
the elementary symmetric polynomial functions which do not
depend on the order of the vertices.
Each $\,e_i\,$ has a real part and an imaginary part
which together are a pair of real numbers. Note that the
cubic equation $$ 0 = z^3-e_1\,z^2+e_2\,z-e_3 $$
has three roots, namely $\,a,b,c$ and thus $\,z\,$ is
one of the three vertices if and only if $\,z\,$ is a root of
the cubic equation.
Of course, there are other sets of
symmetric polynomial functions
which could have been used instead.