# Description. Geometric Medians on a Sphere.

*1, P2,...,Pn*

*Applet is used to study the distribution of*geometric medians*on a sphere of radius R, „induces“ by the discrete sample of movable points in the 3-D space*. On a circle- in Applet. There is a set lP={P*} of points and*{(xi,yi,zi)∈ℝ3:i = 1,...,n} -their coordinates

*.*

*Let a point (x,y,z) minimize a function of the sum of distances from this point to points lP. It is called*

*Fermat's point*

*https://en.wikipedia.org/wiki/Fermat_point*

*or the*

*Geometric median*https://en.wikipedia.org/wiki/Geometric_median

*of the set lP.*

__Problem__:*find the positions of critical points (global minima and maxima too) of the function of*

*sum of distances*

*not only in the entire*

*, but**in the 3-D space**on its bounded area*

*.*Definitions of geometric medians can be generalized, in the sense that the critical points of the

*sum*

*of distances function searched*

*on a bounded area**of**3-D space*

*.*## Geometric Medians on a bounded area (on a sphere), „induced“ by the points from 3-D space

The Geometric Median is defined here as

**point**on*a sphere*from where the*function of*sum of the distances to each point**P****i**'s have at**that point***:*local minimums, maximums or saddle points.*Critical points can be found using***Lagrange multipliers**as (Λ(x,y,z,λ)=f(x,y,z)+λ*g(x,y,z)) finding the Extreme values of the function :*-sum of the distances from (**f(x,y,z)=**x,y,z) to each point p*_{i}'s, subject to a constraining equation:*=**g(x,y,z)**.**Let***S**be a sphere of radius R around the point O:**S**:*={**∈ℝ*^{3}: ||*||=R}.**Further we will use positional vectors**I.e. it is necessary to find the critical points f(x,y,z) subject to: g(x,y,z)=0.**:=(x,y,z)*^{T }: f(x,y,z)=*and g(x,y,z):=**-R=0. The gradients are: ∇f=**and ∇g =**/R -gradient of the magnitude of a position vector r*. There is a system of equations: ∇f(x,y,z)= λ*∇g(x,y,z). A local optimum occurs when ∇f(x,y,z) and ∇g(x,y,z) are parallel, and so ∇f is some multiple of ∇*. The condition that ∇f is parallel to ∇g means ∇f = λ∇g.**g***☛**Thus, condition for a point c on*a restricted region***S**to be GM is:**the***resultant of all unit vectors*from the set of points lP to this point*(*)**is***parallel*to*, i.e. the angle Δφ between these two vectors is 0 or π (Fig. 2c and Fig. 2b in column Δα≟ π ).***its positional vector***There are no**explicit*Geometric Medians formulas, in contrast to Geometric Centers explicit formulas. The solution of the system of equations can be found use iterative procedures. I propose iterative procedures in which each step produces is a more accurate approximation:*=R***UnitVector*(*) finds the Maxima - points and**=R***UnitVector*(*)**finds the Minima - points. Iterative procedure to find Saddle points has a two-step combination:* =R* + ); =R* ), where You can visually observe (Fig. 1c) and explore single solutions max-Z1/min-Z2/saddle-Z3 in the*UnitVector*(**m/R****UnitVector*(**m**is the parameter that sometimes need to be configured in manual settings mode (Fig.1a and Fig.1b). These iterative formulas has the advantages of fast convergence speed for all initial positions.**manual settings mode**(Fig. 1b) at points from the lP. T*heir coordinates (x*. In the_{i},y_{i}) are set by moving the (x,y)_{Pi}points and the coordinates z_{i}-by moving the z_{i}-points (Fig. 1a)**automatic settings mode**__Buttons: max min sad (in__**click on***4. Automatic search for critical points -*Fig. 1c) and will get all the critical points._{φ}=0; f'

_{θ}=0 -implicit functions of equations , their intersection are solutions of the Lagrange equations. e) -graph of the distance sum function f(φ, θ).

**f(x,y,z):**

*The solution (critical points of a function f(x,y,z)) of the system of equations can be found too as the intersection points of the corresponding implicit functions and*

*In the spherical coordinate system**we will have**a two-variable function*f(φ,θ) over a rectangular region: - π ≤φ≤ π and π/2≤θ≤π/2.*The two-dimensional surface plot of f(φ,θ) -function of sum of the distances for a point with angular position (φ,θ) on a sphere of radius R for a given location of points from the set lP is shown in**Fig. 1e and Fig 2e*.*is shown in Fig. 1c and Fig. 2a.*Distribution of points from lP in 3D and corresponding critical points

*By changing the positions of the points from lP (fig. 1a) you can find the positions of the**geometric medians in ℝ*on the bounded surface S.^{3}**max/min/sad**(from Table -Fig. 2b) and directions for them "resulting all unit vectors" and position vectors on the surface of a sphere is

*shown in Fig. 2c. For illustration purposes, the vectors are attached to the points.*

## New Resources

## Discover Resources

Download our apps here: