# I would like to extend the definition of an circumcenter for noncyclic polygons. Namely, let us define the least squares circumcenter as the point A(x_0, y_0) such that the point A minimizes the sum of the squares of the residuals. Let us consider the case for a noncyclic quadrilateral with vertices P(x_1, y_1), Q(x_2, y_2), R(x_3, y_3), and S(x_4, y_4). Let us also define the origin O(0,0). How would we solve for the point A in this case?

Least Squares Circumcenter of Polygons
It is well known that the circumcenter of a polygon exists if and only if the polygon is cyclic.
I would like to extend the definition of an circumcenter for noncyclic polygons. Namely, let us define the least squares circumcenter as the point A $\left({x}_{0},{y}_{0}\right)$ such that the point A minimizes the sum of the squares of the residuals.
Let us consider the case for a noncyclic quadrilateral with vertices P $\left({x}_{1},{y}_{1}\right)$, Q$\left({x}_{2},{y}_{2}\right)$, R$\left({x}_{3},{y}_{3}\right)$, and S $\left({x}_{4},{y}_{4}\right)$. Let us also define the origin O(0,0).
How would we solve for the point A in this case? I was thinking of using matrices and solving ${A}^{\mathsf{T}}A\stackrel{^}{x}={A}^{\mathsf{T}}b$, although any methods are welcome.
You can still ask an expert for help

• Questions are typically answered in as fast as 30 minutes

Solve your problem for the price of one coffee

• Math expert for every subject
• Pay only if we can solve it

Mario Dorsey
Step 1
Suppose the polygon has vertices ${P}_{1},\dots ,{P}_{m}\in {\mathbb{R}}^{n}$. The distance ${d}_{i}$ from a point x to ${P}_{i}$ is simply ${d}_{i}=‖{P}_{i}-x{‖}_{2}$. We would like to minimize the sum of squares of distances. That is, find x solving:
$\underset{x}{min}\sum _{i=1}^{m}{d}_{i}^{2}=\underset{x}{min}\sum _{i=1}^{m}‖{P}_{i}-x{‖}_{2}^{2}$
Consider the square of the 2-norm of the block matrix of size $mn×1$ (tall vector),
$\left[\begin{array}{c}{P}_{1}-x\\ {P}_{2}-x\\ ⋮\\ {P}_{m}-x\end{array}\right]$
Step 2
The square of the 2-norm of this matrix is exactly $\sum _{i}{d}_{i}^{2}$. To see this note that ${d}_{i}^{2}$ is the sum of squares of the entries in the vector ${P}_{i}-x$ so that $\sum _{i}{d}_{i}^{2}$ is the sum of squares of the entries in ${P}_{i}-x$ for all i.
We can rewrite this matrix in the form $b-Ax$,
$\left[\begin{array}{c}{P}_{1}-x\\ {P}_{2}-x\\ ⋮\\ {P}_{m}-x\end{array}\right]=\left[\begin{array}{c}{P}_{1}\\ {P}_{2}\\ ⋮\\ {P}_{m}\end{array}\right]-\left[\begin{array}{c}I\\ I\\ ⋮\\ I\end{array}\right]x$
where I is the $n×n$ identity.
To find x we then solve the least squares problem $\underset{x}{min}‖b-Ax{‖}_{2}$.
EDIT: to see that this just gives the average of the points, form the normal equations.