\begin{document}

\title{On the spherical convexity of  quadratic functions 
\thanks{This work was supported by CNPq (Grants  302473/2017-3 and 408151/2016-1) and FAPEG.}}

\author{
 O. P. Ferreira\thanks{IME/UFG, Avenida Esperan\c{c}a, s/n, Campus II,  Goi\^ania, GO - 74690-900, Brazil (E-mails: {\tt orizon@ufg.br}).}
\and
S. Z. N\'emeth \thanks{School of Mathematics, University of Birmingham, Watson Building, Edgbaston, Birmingham - B15 2TT, United Kingdom
(E-mail: {\tt s.nemeth@bham.ac.uk}).}
}

\maketitle

\begin{abstract}
 In this paper we study the spherical convexity of quadratic functions on spherically convex sets. In particular, conditions characterizing the  spherical convexity of quadratic functions on spherical convex sets associated to the positive orthants and  Lorentz  cone are given. 

\end{abstract}

\nablaoindent
{\bf Keywords:}
  Spheric convexity,  quadratic functions, positive orthant,  Lorentz cone.\\

\nablaoindent
 {\bf  2010 AMS Subject Classification:} 26B25, 90C25, 90C33.

\section{Introduction} \label{sec:Int}

In this paper we study the spherical convexity of quadratic functions on spherical convex sets. This problem arises when one tries to
make certain fixed point theorems, surjectivity theorems, and existence theorems for complementarity problems and variational inequalities more explicit (see \cite{IsacNemeth2003,IsacNemeth2004,IsacNemeth2005,IsacNemeth2006}). Other results on this subject can also be found in \cite{IsacNemeth2008}.  In particular, some existence theorems could be reduced to optimizing a quadratic function on the intersection of the sphere and a cone. 

Indeed, consider a closed convex cone $K\subseteq\mathbb R^n$ with dual $K^*$. Let $F:\mathbb R^n\to\mathbb R^n$ be a continuous mapping such that 
$G:\mathbb R^n\to\mathbb R^n$ defined by $G(x)=\|x\|^2F(x/\|x\|^2)$ and $G(0)=0$  is differentiable at $0$. Denote by $DG(0)$ the Jacobian matrix of $G$ at $0$.
By \cite[Corollary~8.1]{IsacNemeth2006} and \cite[Theorem18]{Nemeth2006}, if 
$\min_{\|u\|=1,u\in K}\langle DG(0)u, u\rangle>0$, then the  nonlinear 
complementarity problem defined by $K\nablai x\partialerp F(x)\in K^*$ has a solution. 
Thus, we need to minimize a quadratic form on the
intersection between a cone and the sphere. These sets are exactly the spherically convex sets;  see \cite{FerreiraIusemNemeth2014}. Therefore,
this leads to minimizing quadratic functions on spherically convex sets.  In fact the optimization problem above reduces to the problem of
calculating the scalar derivative, introduced by S. Z. N\'emeth in  \cite{Nemeth1992,Nemeth1993,Nemeth1997},  along cones; see \cite{Nemeth2006}.
Similar minimizations  of quadratic functions on spherically convex sets  are needed in the other settings; see
\cite{IsacNemeth2003,IsacNemeth2004,IsacNemeth2005}.  Apart from the above, motivation of this study is much wider.    For instance,  the
quadratic constrained optimization problem on the sphere
\begin{equation}\label{eq:gp}
	\min \{\langle Qx, x\rangle~:~x\in C\}, \qquad  C\subseteq\mathbb S^{n}, 
\end{equation}
for  a symmetric matrix $Q$,  is a minimal eigenvalue problem, that is, finding  the spectral norm of the matrix \(-Q\) (see, e.g.,~\cite{Smith1994}). The problem \eqref{eq:gp} also contains the trust region problem that appears in many nonlinear programming  algorithms as a sub-problem,  see \cite{DennisSchnabel1983}.

It is worth to point out that when a quadratic function is spherically convex (see, for example,  \cite{FerreiraIusemNemeth2014}), then the spherical local minimum is equal to the global minimum.   Furthermore,  convex  optimization problems posed on the sphere, have a specific underlining algebraic structure that could be exploited to greatly reduce the cost of obtaining the solutions; see \cite{Smith1994,So2011,Zhang2003,Zhang2012}. Therefore, it is natural to consider the problem of determining the spherically convex quadratic functions on spherically convex sets. The goal of the paper is to present conditions satisfied by quadratic functions which are spherically convex on spherical convex sets. Besides,  we present conditions characterizing the spherical convexity of quadratic functions on spherically convex sets associated to the  Lorentz  cones and  the positive orthant cone. 

The remainder of this paper is organized as follows. In Section~\ref{sec:NotBasRes}, we recall some notations and basic results used throughout  the paper. In Section~\ref{Sec: GenProp} we present some general properties satisfied by quadratic functions which are spherically convex. In Section~\ref{sec: CharQFPosiOth} we present a condition characterizing the spherical convexity of quadratic functions on the spherical convex set defined by the positive orthant cone. In Section~\ref{sec: CharQFPCircCone} we present a condition characterizing  the spherical convexity of quadratic functions on spherical convex sets defined by   Lorentz cone. We conclude this paper by making some final
remarks in Section~\ref{sec;FinalRemarks}.

\section{Notations and basic results} \label{sec:NotBasRes}

In this section we present  the notations and  some auxiliary results used throughout the paper. Let $\mathbb R^n$ be the $n$-dimensional Euclidean 
space with the canonical inner product $\langle\cdot,\cdot\rangle$, norm $\|\cdot\|$. Denote by 
$\mathbb R^n_+$ the nonnegative orthant and by $\mathbb R^n_{++}$
the positive orthant. The notation $x\partialr y$ means that $\langle x,y\rangle=0$. Denote by $e^i$ the $i$-th canonical unit vector in $\mathbb R^n$. The 
{\it unit sphere} is denoted by 
$$
\mathbb S:=\left\{ x\in \mathbb R^{n}~:~\|x\|=1\right\}.
$$
The {\it dual cone} of a cone ${\cal{K}} \subset \mathbb R^n$ is the cone 
${\cal{K}}^*\!\!:=\!\{ x\in \mathbb R^n : \langle x, y \rangle\!\geq\! 0, ~ \fracorall \, y\!\in\! {\cal{K}}\}.$
Any pointed closed convex cone with nonempty interior will be called {\it proper cone}. ${\cal K}$ is called {\it subdual} if ${\cal K}\subset
{\cal K}^*$, {\it superdual} if ${\cal K}^*\subset {\cal K}$ and {\it self-dual} if ${\cal K}^*={\cal K}$. ${\cal K}$ is called {\it strongly
superdual} if ${\cal K}^*\subset\inte({\cal K})$. The set of all $m \times n$ matrices with real entries is denoted by $\mathbb R^{m \times n}$ and
$\mathbb R^n\equiv \mathbb R^{n \times 1}$. In Section 5 we will also use the identification $\mathbb R^n\equiv\mathbb R^{n-1}\times\mathbb R$, which makes
the notations much easier. The matrix ${\rm I_n}$ denotes the 
$n\times n$ identity matrix.    If $x\in \mathbb R^n$ then $\diag (x)$ will denote an
$n\times n$  diagonal matrix with $(i,i)$-th entry equal to $x_i$, for $i=1,\dots,n$.    For  $a\in \mathbb R$ and $B\in \mathbb R^{(n-1)\times (n-1)}$  we
denote    $\diag(a ,B)\in  \mathbb R^{n\times n}$ the matrix defined by 
$$
\diag(a,B):=
\begin{bmatrix}
a & 0 \\
0 & B
\end{bmatrix}.
$$
Recall that a {\it Z-matrix} is a matrix with nonpositive off-diagonal elements. Let ${\cal K} \subset \mathbb R^n $ be  a  pointed closed convex cone  with nonempty interior,  the  {\it ${\cal K}$-Z-property} of a matrix $A\in\mathbb R^{n\times n}$ means that 
$\langle Ax,y\rangle\le0$, for any $(x,y)\in C({\cal K})$, where $C({\cal K}):=\{(x,y)\in\mathbb R^n\times\mathbb R^n:x\in {\cal K},\textrm{ }y\in {\cal K}^*, ~x\partialr
y\}$. The matrix  $A\in\mathbb R^{n\times n}$ is said to have the  {\it ${\cal K}$-Lyapunov-like property} if $A$ and $-A$  have the ${\cal
K}$-Z-property, and  is said to be  {\it ${\cal K}$-copositive} if  $\langle Ax,x\rangle\geq 0$ for all $x\in {\cal K}$. If ${\cal K}=\mathbb R^n_+$, then the
${\cal K}$-Z-property of a matrix coincides with the matrix being a Z-matrix and the ${\cal K}$-Lyapunov-like property with the matrix being
diagonal.

The intersection curve of a plane though the origin of \(\mathbb R^{n}\) with the sphere \( \mathbb S\) is called a { \it geodesic}.   A geodesic segment   is said to be {\it minimal} if its arc length is 
equal to the intrinsic  distance between its end points, i.e., if 
\(
\ell(\gamma):=\arccos \langle  \gamma(a), \gamma(b)\rangle, 
\)
where  \(\gamma: [a, b]\to \mathbb S\) is a parametrization of the geodesic segment. {\it Through the paper we will use the same terminology for a geodesic and its parameterization.} The set \(C\subseteq \mathbb S\) is said to be {\it spherically convex} if for any \(x\), \(y\in C\) 
all the minimal geodesic segments joining \(x\) to \(y\)  are contained in \(C\).  Let \( C\subset \mathbb S\) be a spherically convex set and $I\subset \mathbb R$ an interval.   The following result is proved in  \cite{FerreiraIusemNemeth2013}.
\begin{proposition} \label{pr:ccs}
Let   $K_C:=\left\{ tp \, :\, p\in C, \; t\in [0, +\infty) \right\}$ be the cone generated by the set $C \subset \mathbb S^n$. The set   $C $ is   spherically convex if and only if  the associated  cone  $K_C$ is convex and pointed.
\end{proposition}

A function \(f:C\to \mathbb R\)  is said to be   {\it  spherically convex (respectively, strictly spherically convex) }
if for any minimal geodesic  segment \(\gamma:I\to C\), the composition  \( f\circ \gamma :I\to \mathbb R\) is convex (respectively, strictly convex) in
the usual sense.   The next result is an immediate  consequence of  \cite[Propositions~8 and ~9]{FerreiraIusemNemeth2014}.
\begin{proposition} \label{pr:sgmd}
Let ${\cal K}\subset\mathbb R^n$ be a proper cone, ${\cal C}=\inte({\cal K})\cap \mathbb S$ and  \(f:{\cal C} \to \mathbb R\) a differentiable function. 
 Then, the following statements are equivalent:
	\begin{itemize}
		\item[(i)]   \(f\) is  spherically convex; 
		\item[(ii)] $ \left\langle Df(x)-  Df(y) , x-y\right\rangle +  (\langle x,  y \rangle -1)\left[ \langle Df(x), x \rangle+  \langle Df(y), y \rangle\right] \geq 0$, for all  $x,  y\in {\cal C}$; 
		\item[(iii)]$ \left\langle D^2f(y)x, x \right\rangle - \langle Df(y), y\rangle \geq 0$,   for all $y\in {\cal C}$, $ x\in \mathbb S$ with $x\partialr y$.
	\end{itemize}	
\end{proposition} 
It is well known that  if  $Q\in \mathbb R^{n\times n}$ is  an orthogonal matrix, then $Q$ defines a linear orthogonal mapping,  which is an isometry of
the sphere.  In the following remark we state some  important properties of the isometries of the sphere, for that,  given  $  {\cal C}\subset
\mathbb S$ and  $Q\in \mathbb R^{n\times n}$, we define
$$
 Q { {\cal C}}:=\{ Qx ~:~ x\in {\cal C}\}.
$$
\begin{remark}  \label{re:isom}
Let $Q\in \mathbb R^{n\times n}$  be  an orthogonal matrix, i.e., $Q^T=Q^{-1}$, ${\cal C}_1$ and ${\cal C}_2$ be spherically convex sets. Then  ${\tilde
{\cal C}}_2:= Q { {\cal C}_2}$   is a spherically convex set.  Hence, if     ${\tilde {\cal C}}_2\subset \tilde{\cal C}_1$ and   $ f:{\tilde {\cal
C}}_1\to\mathbb R$ is a spherically convex function, then   $h:= f\circ Q :{\cal C}_2\to\mathbb R$ is also a   spherically convex function.  In
particular,  if ${\tilde {\cal C}}_2= \tilde{\cal C}_1$ then, $f: \tilde{\cal C}_1\to\mathbb R$  is spherically convex if,  only if,   $h:= f\circ Q : {\cal C}_{2} \to\mathbb R$ is spherically convex.
 \end{remark}
 We will show next a useful property of proper cones which will be used in the Section~\ref{sec: CharQFPCircCone}.
 \begin{lemma}\label{p-l}
	Let ${\cal K}\subset\mathbb R^n$ be a proper cone. If $x\in \mathbb S$ and $y\in {\cal K}\cap \mathbb S$ such that $x\partialr y$, then $x\nablaotin
	\inte({\cal K}^*)\cup-\inte({\cal K}^*)$. 
\end{lemma}
\begin{proof}
	If $x\in\inte({\cal K}^*)$, then $\langle x,y\rangle>0$ and if $x\in-\inte({\cal K}^*)$, then $\langle x,y\rangle<0$. Hence, $x\in \mathbb S$, $y\in {\cal K}\cap \mathbb S$ and $x\partialr y$
	imply $x\nablaotin  \inte({\cal K}^*) \cup- \inte({\cal K}^*) $.
\end{proof}
Let $\mathcal C\subseteq\mathcal D\subseteq\mathbb R^n$ and $A\in\mathbb R^{n\times n}$. For a quadratic function $f:\mathcal C\to\mathbb R$ defined by $f(x)=\langle Ax,x\rangle$, we 
will simply use the notation $f$ for the function $\tilde f:\mathcal D\to\mathbb R$ defined by $\tilde f(x)=\langle Ax,x\rangle$.

\section{Quadratic functions  on spherical convex sets} \label{Sec: GenProp}

 In this section we present some general  properties satisfied  by  quadratic functions which are spherically  convex.
\begin{proposition}\label{pr:CharMon}
	Let ${\cal K}\subset\mathbb R^n$ be a proper cone, ${\cal C}=\inte({\cal K})\cap \mathbb S$ and let $f:{\cal C}\to\mathbb R$ be defined by 
	$f(x)=\langle Ax,x\rangle$, where $A\in\mathbb R^{n\times n}$. Then, the following statements are equivalent:
	\begin{itemize}
		\item[(i)] The function $f$ is spherically convex;
		\item[(ii)]  $ \langle Ax,x\rangle-  \langle Ay,y\rangle \geq 0$, for all  $x\in \mathbb S$ and  $y\in {\cal K}\cap \mathbb S$  with $x\partialerp y$.
	\end{itemize}
\end{proposition}
\begin{proof}
To  prove the equivalence of items  (i) and (ii), note that  ${\cal C}=\inte({\cal K})\cap \mathbb S$ is an open spherically convex set,

$Df(x)=2Ax$ and $D^2f(x)=2A$,  for all $x\in {\cal C}$. Then,  from  item (iii) of
Proposition~\ref{pr:sgmd} we conclude that  $\langle Ax,x\rangle\geq\langle Ay,y\rangle$, for all  $x\in \mathbb S$ and  $y\in {\cal C}$  with $x\partialerp y$.  Hence,
by  continuity  this inequality  extends for all    $y\in {\cal K}\cap \mathbb S$  with $x\partialerp y$.  
\end{proof}
\begin{proposition}\label{pr:Char2}
	Let  ${\cal K}\subset\mathbb R^n$ be a proper cone, ${\cal C}=\inte({\cal K})\cap \mathbb S$ and let $f:{\cal C}\to\mathbb R$ be defined by 
	$f(x)=\langle Ax,x\rangle$, where $A=A^T\in\mathbb R^{n\times n}$. 
	The following statements are equivalent:
	\begin{itemize}
		\item[(i)] The function $f$ is spherically convex;
		\item[(ii)]   $ 2\left\langle Ax,y\right \rangle \leq \left(  \langle Ax,x \rangle +  \langle Ay,y \rangle   \right)  \langle x,y \rangle$, for all $x,y\in  {\cal K}\cap \mathbb S$.
	\end{itemize}
	As a consequence, if ${\cal K}$ is superdual and $f$ is spherically convex, then $A$ has the ${\cal K}$-Z-property.
\end{proposition}
\begin{proof}
First note that, by  taking $f(x)=\langle Ax,x\rangle$  the inequality in item (ii) of Proposition~\ref{pr:sgmd}  becomes 
$\left\langle Ax-  Ay , x-y\right\rangle +  (\langle x,  y \rangle -1)\left[ \langle Ax, x \rangle+  \langle Ay, y \rangle\right] \geq 0$, for all  $x,  y\in {\cal C}$. Considering that $A=A^T$, some algebraic manipulations   show that $ 2\left\langle Ax,y\right \rangle \leq \left(  \langle Ax,x \rangle +  \langle Ay,y \rangle   \right)$, for all  $x,  y\in {\cal C}$, and  by  continuity  this inequality  extends for all $x,y\in  {\cal K}\cap \mathbb S$. Terefore, the equivalence of items  (i) and (ii)  follows from  item (ii) of Proposition~\ref{pr:sgmd}. For the second part, let $x\in {\cal K}\cap \mathbb S$ and  $y\in  {\cal K}^* \cap \mathbb S\subset {\cal K}\cap \mathbb S$ with $x\partialr y$. Since $f$ is
 spherically convex and $x\partialr y$, the inequality in item (ii) implies  $\left\langle  Ax,y\right \rangle \leq 0$. Therefore, the result follows
 from the definition of ${\cal K}$-Z-property.
\end{proof}
\begin{proposition}\label{r-l}
	Let ${\cal K}\subset\mathbb R^n$ be a superdual proper cone, ${\cal C}=\inte({\cal K})\cap \mathbb S$ and $f:{\cal C}\to\mathbb R$ be defined by  $f(x)=\langle
	Ax,x\rangle$, where $A=A^T\in\mathbb R^{n\times n}$.  If $f$ is spherically convex, then  the following statements hold:
	\begin{itemize}
		\item[(i)] If $x,y\in  ({\cal K}\cup -{\cal K}) \cap \mathbb S $ are such that $x\partialr y$, then $\langle Ax,x\rangle=\langle Ay,y\rangle$; 
		\item[(ii)] If $x\in    \inte({\cal K})   \cap \mathbb S $ and $y\in   {\cal K}\cap \mathbb S$ are  such that $x\partialr y$, then $Ax\partialr y$;  
		\item[(iii)] If $x\in  -\inte({\cal K})   \cap  \mathbb S$ and $y\in   {\cal K}\cap \mathbb S$ are such that $x\partialr y$, then $Ax\partialr y$.  
	\end{itemize}
\end{proposition}
\begin{proof}
For proving item  (i), we use  the equivalence of items (i) and (ii) of Proposition \ref{pr:CharMon}  to obtain that  $\langle Ax,x\rangle\geq\langle
Ay,y\rangle$ and $\langle Ay,y\rangle\geq\langle Ax,x\rangle$, for all  $x,y\in  ({\cal K}\cup -{\cal K}) \cap \mathbb S $, and the results follows. To prove item
(ii), given $x\in    \inte({\cal K})   \cap \mathbb S $ and $y\in   {\cal K}\cap \mathbb S$ such that $x\partialr y$, define $u=(1/(m^2+1))(mx-y)$ and
$v=(1/(m^2+1))(x+my)$, where $m$ is a positive integer. Since $x\in    \inte({\cal K})   \cap \mathbb S $, if $m$ is large enough, then $(1/m)u\in {\cal
K}$ and therefore $u\in {\cal K}$ too.  It is easy to check that $u,v\in   {\cal K}\cap \mathbb S$ such that $u\partialr v$. By using item (i)  twice, we
conclude that  $\langle mAx-Ay,mx-y\rangle=\langle Ax+mAy,x+my\rangle,$ which after some algebraic transformations, bearing in mind that $A=A^T$, implies
  $Ax\partialr y$. We can prove item (iii) in a similar fashion.
  \end{proof}
\begin{corollary}\label{cr:stg}
	Let ${\cal K}\subset\mathbb R^n$ be a strongly superdual proper cone, ${\cal C}=\inte({\cal K})\cap \mathbb S$ and let $f:{\cal C}\to\mathbb R$ be defined by 
	$f(x)=\langle Ax,x\rangle$, where $A=A^T\in\mathbb R^{n\times n}$.  If $f$ is spherically convex, then $A$ is ${\cal K}$-Lyapunov-like.
\end{corollary}
\begin{proof}
	Let $x\in {\cal K}\cap \mathbb S$ and $y\in {\cal K}^* \cap \mathbb S\subset\inte({\cal K})\cap \mathbb S$ with $x\partialr y$. Then, item (ii) of Proposition
	\ref{r-l} implies $Ax\partialr y$  and the result follows from the definition of the ${\cal K}$-Lyapunov-like property.
\end{proof}
\begin{proposition}\label{p-c}
	Let ${\cal K}\subset\mathbb R^n$  be a superdual proper cone, ${\cal C}=\inte({\cal K})\cap \mathbb S$   and  $f:{\cal C}\to\mathbb R$ be defined by  $f(x)=\langle Ax,x\rangle$, where $A=A^T\in\mathbb R^{n\times n}$. If $A$ is ${\cal K}$-copositive and $f$ is spherically convex, then $A$ is positive 
	semidefinite.
\end{proposition}
\begin{proof}
Since $A$ is ${\cal K}$-copositive  we have $\langle Ax ,x\rangle\ge0$ for all  $x\in ( {\cal K^*}\cup -{\cal K}^*) \cap   \mathbb S  \subset (  {\cal  K}\cup -  {\cal K}) \cap   \mathbb S $.   Assume that  $x\in \mathbb S \setminus({\cal K}^*\cup -{\cal K}^*)$.  We claim that, there exists $y\in  {\cal K}\cap \mathbb S$ such that $y\partialerp x$. We proceed to prove the claim. Suppose that there is no such $y$.  Then, we must have that either $\langle u,x\rangle<0$ for all $u\in {\cal K} \setminus\{0\}$, or $\langle u,x\rangle>0$ for all $u\in {\cal K} \setminus\{0\}$. If there exist $u\in {\cal K} \setminus\{0\}$ with $\langle u,x\rangle<0$ and a $v\in {\cal K} \setminus\{0\}$ with $\langle v,x\rangle\ge0$, then $\partialsi(0)<0$ and $\partialsi(1)\ge0$, where  the continuous function $\partialsi:\mathbb R\to\mathbb R$ is defined by $\partialsi(t)=\langle (1-t)u+tv,x\rangle$. Hence, there is an $s\in [0,1]$ such that $\partialsi(s)=0$. By	the convexity of ${\cal K} \setminus\{0\}$ (${\cal K} \setminus\{0\}$ is spherically convex because ${\cal K} $ is pointed), we conclude  that $(1-s)u+sv\in {\cal K} \setminus\{0\}$. Let $w=(1-s)u+sv$ and $y=w/\|w\|$. Clearly, $y\in {\cal K} \cap \mathbb S$ and $y\partialerp x$, which contradicts our assumptions. If $\langle u,x\rangle<0$ for all $u\in {\cal K} \setminus\{0\}$, then $x\in -{\cal K}^*$, which is a contradiction. If $\langle u,x\rangle>0$ for all $u\in {\cal K} \setminus\{0\}$, then $x\in {\cal K} ^*$, which is also a contradiction. Thus, the claim holds. Since $f$ is convex, Proposition~\ref{pr:CharMon} implies that $\langle Ax,x\rangle\ge \langle Ay,y\rangle$. Since $A$ is $K$-copositive, we have $\langle Ay,y\rangle\ge0$ and hence $\langle Ax,x\rangle\ge0$. Thus, $\langle Ax,x\rangle\ge0$ for all  $x\in \mathbb S$. In conclusion, $A$ is positive semidefinite.
\end{proof}
By using arguments similar to the ones used in  the proof of Proposition~\ref{p-c} we can also prove the following result.
\begin{proposition}
	Let ${\cal K}\subset\mathbb R^n$  be a  subdual proper cone, ${\cal C}=\inte({\cal K})\cap \mathbb S$   and  $f:{\cal C}\to\mathbb R$ be defined by  $f(x)=\langle Ax,x\rangle$, where $A=A^T\in\mathbb R^{n\times n}$. If $A$ is ${\cal K}^*$-copositive and $f$ is spherically convex, then $A$ is positive 
	semidefinite.
\end{proposition}

\section{Quadratic functions on  spherical positive orthant} \label{sec: CharQFPosiOth}

In  this section  we present a  condition characterizing  the  spherical  convexity of quadratic functions on  the spherical convex set associated to the positive orthant  cone.  

\begin{theorem} \label{eq:cpoth}
Let ${\cal C}=\mathbb S \cap \mathbb R^n_{++}$ and $f:{\cal C}\to\mathbb R$ be defined by $f(x)=\langle Ax,x\rangle$, where $A=A^T\in\mathbb R^{n\times n}$. Then,  $f$ is spherically convex if and only if   there exists $\lambda \in\mathbb R$  such that $A=\lambda I_{n}$. In this case,  $f$ is a constant function.
\end{theorem}
\begin{proof}
Assume that there exists $\lambda \in\mathbb R$  such that $A=\lambda I_{n}$. In this case,  $f(x)=\lambda$, for all $x\in {\cal C}$. Since   any constant function is spherically convex this implication is proved. For the  converse statement,  we  suppose that $f$ is spherically convex. From the equivalence of items (i) and (ii) of Proposition~\ref{pr:CharMon} we have 
	\begin{equation}\label{eq-char}
		\langle Ax,x\rangle\ge\langle Ay,y\rangle,
	\end{equation}
	for any $y\in  \mathbb R^n_{+}$ and any $x\partialr y$ with $x,y\in \mathbb S$. First take $x=e^i$ and $y=e^j$. Then, \eqref{eq-char} implies that
	$a_{jj}\ge a_{ii}$. Hence, by swapping $i$ and $j$, we conclude  that $a_{ii}=\lambda$ for any $i$, where $\lambda\in\mathbb R$ is a constant. Next take 
	$y=(1/\sqrt{2})(e^i+e^j)$ and 
	$x=(1/\sqrt2)(e^i-e^j)$. This leads to $a_{ij}\le0$, for any $i,j$. Hence, $A=B+\lambda I_{n}$, where $B$ is a Z-matrix with zero diagonal. It is 
	easy to see that inequality \eqref{eq-char} is equivalent to
	\begin{equation}\label{eq-char2}
		\langle Bx,x\rangle\ge\langle By,y\rangle,
	\end{equation}
for any $y\in  \mathbb R^n_{+}$ and any $x\partialr y$ with $x,y\in \mathbb S$. Let $i,j$ be arbitrary but different and $k$ different from both $i$ and $j$.  Let $y=e^k$ and $x=(1/\sqrt2)(e^i+e^j)$. Then,  \eqref{eq-char2} implies that $a_{ij}=b_{ij}\ge0$. Together with $a_{ij}\le0$ this gives $a_{ij}=b_{ij}=0$. Hence $A=\lambda I_{n}$ and therefore $f(x)=\lambda$, for any $x\in {\cal C}$, and the proof is concluded. 
\end{proof}

\section{Quadratic functions on Lorentz   spherical convex sets} \label{sec: CharQFPCircCone}

 In this section we present a    condition characterizing  the  spherical  convexity of quadratic functions on  spherical convex sets associated to the    Lorentz  cones.  We begin with the following definition: Let ${\cal L}\subset\mathbb R^n$  be  the {\it Lorentz cone} defined by 
\begin{equation} \label{eq:LorentzCone}
	{\cal L}:=\left\{x\in\mathbb R^n~:~x_1\geq\sqrt{x_2^2+\dots+x_n^2}\right\}.
\end{equation}
  \begin{lemma}\label{lem:CharLor}
	Let  ${\cal L}$ be  the Lorentz cone,   $x:=(x_1,{\tilde x})$ and $y:=(y_1,{\tilde y})$ in $\mathbb S$. Then the following statements 
	hold:
	\begin{enumerate}
		\item[(i)] $ y \in   - {\cal L} \cup {\cal L}$  if and only if   $y_1^2\ge1/2$.  Moreover,   $y_1^2\ge1/2$ if and only if  $\|{\tilde y}\|^2\le1/2$; 
		\item[(ii)] $ y \in -\inte({\cal L}) \cup \inte({\cal L})$  if and only if     $y_1^2>1/2$. Moreover,  $y_1^2>1/2$ if and only if  $\|{\tilde y}\|^2<1/2$;
		\item[(iii)] $ x \nablaotin -\inte({\cal L}) \cup \inte({\cal L})$ if and only if     $ x_1^2\le1/2$. Moreover, $ x_1^2\le1/2$ if, and only if,  $\|{\tilde x}\|^2\ge1/2$;
		\item[(iv)]  If $ y\in  - {\cal L} \cup {\cal L} $ and $x \partialerp y$ then $ x\nablaotin -\inte({\cal L}) \cap \inte({\cal L})$.  Moreover,   $ x\nablaotin -\inte({\cal L}) \cap \inte({\cal L})$ if, and only if $ x_1^2\le1/2$. Furthermore,  $ x_1^2\le1/2$ if and only if  $\|{\tilde x}\|^2\ge1/2$.
	\end{enumerate}
\end{lemma}
\begin{proof}
	Items (i)-(iii) follow easily from the definitions of $\mathbb S$ and ${ \cal L}$. Item (iv) follows from Lemma \ref{p-l} and item (iii).
\end{proof}
 \begin{remark} \label{eq:othcha}
Let $\tilde{Q}\in \mathbb R^{(n-1)\times (n-1)}$ be  orthogonal. Then,  $Q= \diag(1, \tilde{Q})$ is also ortogonal and  $ Q {\cal L}={\cal L}$. Hence,  from Remark~\ref{re:isom} we conclude that  $f: {\cal L} \cap \mathbb S\to\mathbb R$ is spherically convex if,   and only if,    $g:= f\circ Q ={\cal L}\cap \mathbb S \to\mathbb R$ is spherically convex. 
\end{remark}
\begin{theorem}\label{th:ccflc}
Let ${\cal C}=\inte( {\cal L} )\cap \mathbb S$ and  $f:{\cal C}\to\mathbb R$ be  defined by $f(x)=\langle Ax,x\rangle$, where $A=A^T\in\mathbb R^{n\times n}$. Then  $f$ is spherically convex  if and only if  there exist $a,\lambda \in\mathbb R$ with $\lambda \geq a$ such that $A=\diag(a, \lambda I_{n-1})$.
\end{theorem}
\begin{proof}
Assume that $f$ is spherically convex. Let  $ x, y \in {\cal L}\cap \mathbb S$  with   $x\partialerp y$  be  defined by
$$
x=\fracrac{1}{\sqrt{2}}e^{1}+ \fracrac{1}{\sqrt{2}}e^{i},  \qquad y=\fracrac{1}{\sqrt{2}}e^{1}- \fracrac{1}{\sqrt{2}}e^{i},  \qquad i\in \{ 2, \ldots, n\}.
$$
Hence  the item (i) of Proposition \ref{r-l} implies that $\langle Ax,x\rangle=\langle Ay,y\rangle$. Hence, after computing these inner products, we obtain 
$$
\fracrac{1}{2}( a_{11}+a_{1i})+ \fracrac{1}{2}( a_{i1}+a_{ii})= \fracrac{1}{2}( a_{11}-a_{1i})- \fracrac{1}{2}( a_{i1}-a_{ii}),  \qquad i\in \{ 2, \ldots, n\}.
$$
Since $A$ is a symmetric matrix, the last equality implies that  $a_{1i}=0$, for all  $i\in \{ 2, \ldots, n\}$. Thus, by letting $a= a_{11}$, we
have $A=\diag(a, \tilde{A})$ with $\tilde{A}\in \mathbb R^{(n-1)\times (n-1)}$ a symmetric matrix.  Let $\tilde{Q}\in \mathbb R^{(n-1)\times (n-1)}$ be an
orthogonal matrix such that $ \tilde{Q}^T \tilde{A} \tilde{Q}=\Lambda$, where $\Lambda =\diag(\lambda_2, \ldots, \lambda_n)$ and $\lambda_i$  is
an eigenvalue   of  $\tilde{A}$,  for all $i\in \{ 2, \ldots, n\}$. Thus, Remark~\ref{eq:othcha} implies  that   $f:\mathcal L\cap\mathbb S\to\mathbb R$ is spherically convex 
if, and  only if,   $g(x)= \langle \diag(a_{11}, \Lambda)x , x \rangle $ is spherically convex.    On the other hand,  using
Proposition~\ref{pr:CharMon}   we conclude that  $g(x)= \langle \diag(a_{11}, \Lambda)x , x \rangle $ is spherically convex if and only if  
$$
h(x)= \langle [\diag(a_{11}, \Lambda)-a_{11}I_{n}]x,x\rangle= \langle [\Lambda -a_{11}{I_{n-1}}] \tilde{x}, \tilde{x}\rangle,
$$
where $\textrm{ }x:=(x_1, \tilde{x})\in \mathbb R\times \mathbb R^{n-1}$, is spherically convex. Since $h$  is spherically convex, from 
Proposition~\ref{pr:CharMon} we have 
\begin{equation} \label{eq:ccthflor}
h(x)-h(y)=\langle  [\Lambda -a_{11}{I_{n-1}}] \tilde{x}, \tilde{x}\rangle-\langle   [\Lambda -a_{11}{I_{n-1}}] \tilde{y}, \tilde{y} \rangle \geq 0,  
\end{equation}
for all points $x=(x_1, \tilde{x})\in \mathbb S$, $y=(y_1, \tilde{y})\in {\cal L}\cap \mathbb S$  with $x\partialerp y$.  If we assume that $\lambda_2= \ldots =\lambda_n$, we have  $\Lambda=\lambda {I_{n-1}}$ and then $A=\diag(a, \lambda I_{n-1})$, where $a:=a_{11}$ and
$\lambda:=\lambda_2=\dots=\lambda_n$.  Thus  \eqref{eq:ccthflor} becomes $[ \lambda -a_{11}] [
\|\tilde{x}\|^2 -  \|\tilde{y}\|^2] \geq 0$.  Bearing in mind that  ${\cal L}={\cal L}^*$, Lemma~\ref{lem:CharLor} implies  $\|\tilde{x}\|^2 -
\|\tilde{y}\|^2 \geq  0$, and then   we  have from the previous two  inequalities  that  $ a=a_{11}\leq \lambda$. Therefore, for concluding the proof of this  implication  it remains  to prove that  $ a_{11}\leq \lambda_2= \ldots =\lambda_n$.  Without loss of generality we can assume that $n\geq 3$.  Let  $ x\in \mathbb S$ and  $y\in {\cal
L}\cap \mathbb S$  with   $x\partialerp y$  be  defined by
\begin{align} \label{eq:lcxy1}
x&=-\left(\frac1{\sqrt2}\cos\theta\right)e^1+\left(\frac12\cos\theta-\frac1{\sqrt2}\sin\theta\right)e^i +\left(\frac12\cos\theta+\frac1{\sqrt2}\sin\theta\right)e^j, \\
 y&=\frac1{\sqrt2}e^1+\frac12 e^i+\frac12 e^j,  \label{eq:lcxy2}
\end{align}
 where $\theta\in (0,\partiali)$. From \eqref{eq:lcxy1} and \eqref{eq:lcxy2}, it is straightforward to check that $x\in \mathbb S$, $y\in {\cal L}\cap \mathbb S$
 and  $x\partialerp y$. Hence, \eqref{eq:ccthflor} becomes  
	\[
	\left(\frac14\sin^2\theta-\frac1{\sqrt2}\cos\theta\sin\theta\right)\lambda_i+\left(\frac14\sin^2\theta+\frac1{\sqrt2}\cos\theta\sin\theta\right)\lambda_j
	\geq0,
	\]
	or, after dividing by $\sin\theta\nablae0$, that
	\begin{equation*}
		\left(\frac14\sin\theta-\frac1{\sqrt2}\cos\theta\right)\lambda_i+\left(\frac14\sin\theta+\frac1{\sqrt2}\cos\theta\right)\lambda_j\geq0.
	\end{equation*}
Letting $\theta$ goes to $0$ in the inequality above, we obtain  $\lambda_j\geq\lambda_i$. Hence,   by swapping $i$ and $j$ in
\eqref{eq:lcxy1} and \eqref{eq:lcxy2} we  can also prove that  $\lambda_{i} \geq \lambda_{j}$,  and then $\lambda_{i} = \lambda_{j}$,   for all
$i, j\nablaeq 1$.  Therefore,  $\lambda_2= \ldots =\lambda_n$ which concludes  the implication. Conversely, assume that $A=\diag(a, \lambda
I_{n-1})$ and $\lambda \geq a$. Then $f(x)= \langle [\diag(a, \lambda I_{n-1}]x,x\rangle$ and  Proposition~\ref{pr:CharMon}  implies that $f$ is
spherically convex if, and  only if,  
$$
h(x)= \langle [\diag(a, \lambda I_{n-1})-aI_{n}]x,x\rangle= \langle [\lambda -a]{I_{n-1}}\tilde{x}, \tilde{x}\rangle, 
$$
where $ x:=(x_1, \tilde{x})\in \mathbb R\times \mathbb R^{n-1} $, is spherically convex. Take  $x=(x_1, \tilde{x})\in \mathbb S$ and  $y=(y_1, \tilde{y})\in {\cal L}\cap \mathbb S$  with $x\partialerp y$. Thus,  from   Lemma~\ref{p-l} and \eqref{eq:LorentzCone} we have $\|\tilde{x}\|^2 \geq   \|\tilde{y}\|^2.$
Hence considering that    $a\leq \lambda$ we  conclude that   
$$
\langle [\lambda -a]{I_{n-1}}\tilde{x}, \tilde{x}\rangle-  \langle [\lambda -a]{I_{n-1}}\tilde{y}, \tilde{y}\rangle= [ \lambda -a] [ \|\tilde{x}\|^2 -  \|\tilde{y}\|^2] \geq 0.
$$ 
Therefore, Proposition~\ref{pr:CharMon}  implies   that $h$ is spherically convex and then  $f$ is also spherically convex.
\end{proof}

\begin{remark} 
	Assume  that $f$  in Theorem~\ref{th:ccflc}  is spherically convex  in $  {\cal L}\cap \mathbb S$. Hence  there exist $a,\lambda \in\mathbb R$ with
	$\lambda \geq a$ such that $A=\diag(a, \lambda I_{n-1})$ and then  $f(x)= ax_{1}^2+ \lambda \|\tilde{x}\|^2=\lambda-(\lambda-a)x_1^2$, where 
	$x:=(x_1,\tilde{x})\in\mathcal L\cap\mathbb S$. Hence, it is clear that the minimum of $f$ on $\mathcal L\cap\mathbb S$ is obtained when $x_1$ is
	maximal, that is, when $x_1=1$, which happens exactly when $x=e^1$. Similarly, the maximum of $f$ on $\mathcal L\cap\mathbb S$ is obtained when $x_1$ is
	minimal, that is, when $x_1=1/\sqrt2$ (see item (i) of Lemma \ref{lem:CharLor}), which happens exactly when $\|\tilde x\|=x_1=1/\sqrt2$.
	Hence, $\argmin \{ f (x) : x \in  {\cal L}\cap \mathbb S\}=e^1$, $\min \{f (x) : x \in  {\cal L}\cap \mathbb S\}=a$,  $\argmax \{ f (x) : x \in  {\cal L}\cap \mathbb S\}=\left\{\frac1{\sqrt2}(1,\tilde x)\in\mathbb R\times\mathbb R^{n-1}:\|\tilde x\|=1\right\}$ and $\max \{f (x) : x \in  {\cal L}\cap \mathbb S\}=(a+\lambda)/2$.
\end{remark}

\begin{remark}
	If $\lambda> a$ then Theorem~\ref{th:ccflc} implies that   $f(x)= \langle\diag(a, \lambda I_{n-1})x, x\rangle$ is  spherically convex.
	However,  in this case   $\diag(a,\lambda, \ldots, \lambda)$ does  not have the ${\cal L}$-Lyapunov-like property. Hence, 
	Corollary~\ref{cr:stg} is not true if we only require  that the cone is superdual proper.  Indeed, the Lorentz cone ${\cal L}$ is 
	self-dual proper, i.e., ${\cal L}^*={\cal L}$ and consequently is superdual proper. Moreover,  letting   $ x, y \in {\cal L}\cap \mathbb S$  
	with   $x\partialerp y$  be  defined by
	$$
		x=\fracrac{1}{\sqrt{2}}e^{1}+ \fracrac{1}{\sqrt{2}}e^{i},  \qquad y=\fracrac{1}{\sqrt{2}}e^{1}- \fracrac{1}{\sqrt{2}}e^{i},  \qquad i\in \{ 2,
		\ldots, n\},
	$$
we have $\langle \diag(a, \lambda I_{n-1})x,y\rangle=(a-\lambda)/2<0$. Therefore, $\diag(a, \lambda I_{n-1})$ does not have the ${\cal L}$-Lyapunov-like
property, and the strong superduality of the cone   is necessary in  Corollary~\ref{cr:stg}. 
\end{remark}

\section{ Final remarks} \label{sec;FinalRemarks}
This paper is a continuation of   \cite{FerreiraIusemNemeth2013,FerreiraIusemNemeth2014}, where we studied some basic intrinsic properties of spherically convex functions on spherically convex sets of the sphere.  We expect that the results of this paper can  aid in the understanding of the behaviour of spherically convex functions on spherically convex sets of the sphere. In the future we will also study  spherically quasiconvex functions \cite{Nemeth1998} (see also  \cite{KaramardianSchaible1990} for the definition of quasiconvex functions) on spherically convex sets of the sphere.

\section*{Acknowledgments} The authors are grateful to Michal Ko\v cvara and Kay Magaard for many helpful conversations.

 

\end{document}