\section{Introduction.}
A well-known example in symplectic geometry says that, when $f:M\to (N,g)$ is an immersion of a manifold
into a Riemannian manifold $(N,g)$,
its normal bundle $TM^\perp\to TN$ is a Lagrangian immersion when $TN$ is equipped with its canonical symplectic
structure. Moreover, the unit sphere bundle $UN\subset TN$ has a contact structure and the unit normal bundle of $M$ provides
a Legendrian immersion
$\mu:UM^\perp\to UN$. This map is sometimes called the \emph{spherical Gauss map}.
The Reeb vector field for this contact structure is the geodesic flow. When this flow is generated by a one-parameter
group action (for example, when every geodesic is closed and has the same length, as is the case with compact rank one
symmetric spaces) the quotient by this action is the manifold of oriented geodesics in $N$, which we will denote by
$\mathcal{Q}$. For example, when $N=S^n$ this manifold of geodesics is isomorphic to the Grassmanian $\mathrm{Gr}(2,n+1)$ of oriented
$2$-planes in $\mathbb{R}^{n+1}$. Taking this quotient is an example of symplectic reduction of $TN$, and the Legendrian immersion
$\mu$ projects to a Lagrangian immersion $\gamma:UM^\perp\to\mathcal{Q}$. We will call $\gamma$ the \emph{geodesic Gauss map} for
$f:M\to N$. We will always assume $f(M)$ is orientable, in which case its geodesic Gauss map assigns to each unit normal
vector the oriented geodesic it generates. When $N=S^n$ and $M$ is a hypersurface, this is just the usual Gauss map
for a codimension two submanifold of $\mathbb{R}^{n+1}$.

Now it is interesting to ask what the relationship is between the Riemannian properties of
$f:M\to N$ and $\gamma:UM^\perp\to \mathcal{Q}$ as isometric immersions. For this one needs a metric on $\mathcal{Q}$.
In this article we examine the most natural case, where
$N=S^n$ (with the metric of constant curvature $1$) and $TS^n$ is given the Sasaki metric. In this case geodesic flow
preserves the metric, which descends to the
standard K\"{a}hler-Einstein metric on $\mathcal{Q}\simeq\mathrm{Gr}(2,n+1)$. These correspondences are most easily understood using
homogeneous geometry, since $S^n$, $US^n$ and $\mathcal{Q}$ are all reductive homogeneous spaces of $SO(n+1)$ and the metric for
each is just the normal metric determined by a choice of adjoint-invariant bilinear form on $\mathfrak{so}(n+1)$. Given this, we
derive expressions for the mean curvature vectors $H_\mu$ and $H_\gamma$ of $\mu$ and $\gamma$
in terms of the second fundamental form $\mathrm{I\! I}_f$ of $f$.
In fact, we first show that $H_\gamma = (\pi_\mathcal{Q})_*H_\mu$ for the projection $\pi_\mathcal{Q}:US^n\to\mathcal{Q}$, so
that we need only do calculations for $\mu$.
When $M$ is a hypersurface the resulting expression for $H_\gamma$ gives another way of looking at
Palmer's formula \cite{Pal97} for $H_\gamma$, which he wrote in terms of the principal curvatures of $f$.

The relationship between $H_\mu$ and $\mathrm{I\! I}_f$ is mediated by the normal bundle
projection $\pi^\perp:UM^\perp\to M$, and it is only when this is conformal that one obtains
a direct relationship between $H_\mu$ and $H_f = \operatorname{tr}_g\mathrm{I\! I}_f$. In fact $\pi^\perp$ is conformal if and only if $f$ has
\emph{conformal shape form}, by which we mean that its shape operator $A_f:TM^\perp\to\operatorname{End}(TM)$ satisfies $A_f(\xi)^2 =
r(\xi)^2I$ for every $\xi\in UM^\perp$ and some smooth function $r:UM^\perp\to\mathbb{R}$ (cf.\ \cite{GudM}, where they refer to
this property by the name \emph{conformal second fundamental form}). Under this condition we prove (Theorem \ref{thm:main}
below) that:
\begin{enumerate}
\item when $M$ has codimension two or more, $\gamma$ is minimal Lagrangian if and only if $f$ is minimal,
\item when $M$ is a hypersurface, $\gamma$ is minimal Lagrangian if and only if $f$ has constant (possibly zero) mean
curvature.
\end{enumerate}
The condition that $f$ have conformal shape form is somewhat restrictive, but still allows large families of examples. It
is easy to see that every minimal surface has conformal shape form, so these produce extensive families of
minimal Lagrangian submanifolds in $\mathcal{Q}$ for $n\geq 2$: when $n=2$ this had already been observed by Palmer
\cite{Pal94} (see also \cite{CasU}).
Palmer's more general formula \cite{Pal97} already makes it clear that any isoparametric hypersurface
of $S^n$ provides a minimal Lagrangian submanifold of $\mathrm{Gr}(2,n+1)$.
For hypersurfaces of dimension three or more, the combined conditions of conformal shape form and constant
mean curvature force the hypersurface to be isoparametric with at most two
distinct principal curvatures, so our correspondence provides no new examples for hypersurfaces.

In the final section we discuss Lagrangian and Hamiltonian deformations of the geodesic Gauss map.
We prove two results using
simple circle bundle arguments which exploit the fact that the pullback $\gamma^{-1}US^n$ is a flat circle bundle for
which $\mu$ is a horizontal section.
Any deformation of $f$ which preserves the diffeomorphism class of the unit normal bundle corresponds
to a (not necessarily unique) deformation of $\gamma$ through Lagrangian immersions,
and we prove that these are always Hamiltonian deformations. For hypersurfaces this was proved in \cite{MaO09}, where the
converse (that short term Hamiltonian deformations arise from deformations of the hypersurface) was also proved.
This converse cannot be expected to hold for higher codimension immersions $f$ and we explain why.
We also prove that the mean curvature variation $H_\gamma$ is always a
Hamiltonian variation (for hypersurfaces Palmer \cite{Pal97} deduced this directly from his formula for $H_\gamma$).
This means it is reasonable
to ask when the Lagrangian mean curvature flow of $\gamma$ will keep it inside the class of geodesic Gauss maps of
immersions of $M$. At present we have no answer to this question.

\medskip\noindent
\textit{Notation.} Throughout this article we will set $G=SO(n+1)$, with Lie algebra $\mathfrak{g}=\mathfrak{so}(n+1)$, and equip the latter with the
$\operatorname{Ad}_G$-invariant inner product $\g{\eta}{\zeta} = -\tfrac12 \operatorname{tr}(\eta\zeta)$. For any closed Lie subgroup $K\subset G$,
the quotient $G/K$ is a reductive homogeneous space with reductive decomposition $\mathfrak{g} = \mathfrak{k}+\mathfrak{m}$ (where $\mathfrak{k}$ the
Lie algebra of $K$ and $\mathfrak{m}=\mathfrak{k}^\perp$).  If $\mathfrak{v}\subset\mathfrak{g}$ is a $K$-invariant
subspace for the adjoint action of $K$, we will denote by $[\mathfrak{v}]_K$ the subbundle
\[
[\mathfrak{v}]_K =\{(gK,\operatorname{Ad} g\cdot\eta):\eta\in\mathfrak{v}\}\subset G/K\times \mathfrak{g}.
\]
In particular, the tangent space $T(G/K)$ is canonically isomorphic to $[\mathfrak{m}]_K$ via
\[
\beta_K: T(G/K)\to [\mathfrak{m}]_K;\quad \beta_K(X_p) = (p,\xi),\ X_p = \frac{d}{dt}(e^{t\xi}\cdot p)_0.
\]

\section{The geometry of $US^n$.}

By fixing the base point $o=(0,\ldots,0,1)\in S^n\subset\mathbb{R}^{n+1}$ we view $S^n$ as the orbit of $o$ by the standard action
of $G$. This fixes an isomorphism $S^n\simeq G/K$, with isotropy group $K\simeq SO(n)$.
The inner product induces the round metric $g$ on $S^n$ of sectional curvature $1$.
Therefore $US^n\simeq [\mathfrak{um}]_K$ where $\mathfrak{um}$ is the unit sphere in $\mathfrak{m}$.

Clearly, $K$ acts transitively on $\mathfrak{um}$ (this is true for any compact rank one symmetric space) and therefore $G$ acts
transitively on $US^n\simeq[\mathfrak{um}]_K$ by \begin{equation}\label{eq:Gaction}
G\times [\mathfrak{um}]_K\to[\mathfrak{um}]_K;\quad g\cdot(aK,\eta) = (gaK,\operatorname{Ad} g\cdot\eta).
\end{equation}
We fix a base point $(o,\nu_0)$ for this action by taking
\[
\nu_0 = \begin{pmatrix} 0 & \ldots & 0 & 0\\ \vdots & & & \vdots\\ 0&\ldots &0 & 1\\  0&\ldots & -1 & 0\end{pmatrix}\in\mathfrak{um}.
\]
The isotropy group is therefore
\[
H = \{g\in K:\operatorname{Ad}\cdot\nu_0 = \nu_0\}\simeq SO(n-1).
\]
This fixes an isomorphism $US^n\simeq G/H$. We write the corresponding reductive decomposition as
$\mathfrak{g} = \mathfrak{h} + \mathfrak{p}$ for $\mathfrak{p}=\mathfrak{h}^\perp$, so that $\beta_H:TUS^n\to [\mathfrak{p}]_H$ is the canonical isomorphism.
We will equip $G/H$ with the $G$-invariant normal metric $h$ induced by the inner product $\g{\ }{\ }$.
It follows that $\pi:(US^n,h)\to (S^n,g)$ is a $G$-equivariant Riemannian submersion with totally geodesic fibres.
In fact we will show below that $h$ is the restriction of the Sasaki metric on $TS^n$ to $US^n$. We will denote the horizontal
and vertical decomposition of $TUS^n$ with respect to $\pi:US^n\to S^n$ by $TUS^n=\mathcal{H}+\mathcal{V}$. It follows that $\beta_H$
produces isomorphisms $\mathcal{H}\simeq [\mathfrak{m}]_H$, $\mathcal{V}\simeq [\mathfrak{n}]_H$, where $\mathfrak{n} = \mathfrak{m}^\perp\cap\mathfrak{p} = \mathfrak{k}\cap\mathfrak{p}$.

The unit sphere bundle $US^n$ is also a contact manifold, and this structure is one of its most important features for
our purposes. Recall that for any Riemannian manifold $(N,g)$ the tangent bundle carries a canonical $1$-form $\theta$,
which can be defined by
\[
\theta(Z) = g(d\pi(Z),\pi_{TN}(Z)),
\]
where $\pi_{TN}:T(TN)\to TN$ is the double tangent bundle's projection.  It is well-known (see, for example \cite[Ex.\
3.44]{McDS}) that when $\theta$ is restricted to $UN$ it becomes a contact form, and the corresponding Reeb vector field
$\mathcal{Z}$ generates geodesic flow along $UN$. When $N=S^n$ (or indeed any CROSS) geodesic flow provides a circle action,
since every geodesic has the same length. In the homogeneous geometry this circle action is the right action of the
circle subgroup $S = \{\exp(t\nu_0):t\in\mathbb{R}\}$ on $G/H$, which is well-defined since the right actions of $H$ and $S$
commute. Thus $US^n$ has a well-defined quotient by geodesic flow, which
we will denote by $\mathcal{Q}$, and which is isomorphic to the Grassmanian of oriented $2$-planes in $\mathbb{R}^{n+1}$:
\[
\mathcal{Q} = US^n/S \simeq G/(H\times S)\simeq SO(n+1)/(SO(n-1)\times SO(2))\simeq \mathrm{Gr}(2,n+1).
\]
We can think of $\mathcal{Q}$ as the manifold which parameterises oriented geodesics for $S^n$.
If we set $L=H\times S\subset G$ then the reductive decomposition for $G/L$ is
\[
\mathfrak{g} = \mathfrak{l} + \mathfrak{q},\quad \mathfrak{l} = \mathfrak{h}+\mathfrak{s},\quad \mathfrak{q}  =\mathfrak{l}^\perp=\mathfrak{p}\cap\mathfrak{s}^\perp,
\]
where $\mathfrak{s} = \mathbb{R}.\nu_0$. Thus $T\mathcal{Q}\simeq [\mathfrak{q}]_L$ and when we equip $\mathcal{Q}$ with the normal metric $h_\mathcal{Q}$ compatible with
$\g{\ }{\ }$ the quotient map $\pi_\mathcal{Q}:US^n\to \mathcal{Q} $ is a Riemannian submersion with
geodesic fibres.  With this metric $\mathcal{Q}\simeq \mathrm{Gr}(2,n+1)$ is a symmetric space, with
$[\mathfrak{q},\mathfrak{q}]\subset \mathfrak{l}$, and this implies the following bracket relations which we will make use of later:
\begin{equation}\label{eq:brackets}
[\mathfrak{n},\mathfrak{n}]\subset\mathfrak{h},\quad [\mathfrak{n},\mathfrak{m}_0]\subset \mathfrak{s},\quad [\mathfrak{m}_0,\mathfrak{m}_0]\subset \mathfrak{h}.
\end{equation}
Here $\mathfrak{m}_0 = \mathfrak{m}\cap\mathfrak{q} = \mathfrak{m}\cap\mathfrak{s}^\perp$, and we have also used the symmetric space relations for $\mathfrak{g}=\mathfrak{k}+\mathfrak{m}$.
\begin{rem}\label{rem:spheres}
Of course, the first bracket is implicit in the statement that $S^{n-1}\simeq K/H$ is a symmetric space.
The last bracket, together with $[\mathfrak{h},\mathfrak{m}_0]\subset\mathfrak{m}_0$ from $[\mathfrak{k},\mathfrak{m}]\subset\mathfrak{m}$, implies that $\bar\mathfrak{k} = \mathfrak{h}+\mathfrak{m}_0$
is also a Lie subalgebra. In fact $\mathfrak{k}\simeq\bar \mathfrak{k}$, so for the Lie subgroup $\bar K$ we also have $S^n\simeq G/\bar K$
and $S^{n-1}\simeq\bar K/H$. This gives us two homogeneous projections
\[
\pi:G/H\to G/K,\quad \bar\pi:G/H\to G/\bar K.
\]
The vertical distribution for $\pi$ is $\mathcal{V}$, while that for $\bar\pi$ is $\mathcal{H}_0=[\mathfrak{m}_0]_H=\mathcal{H}\cap\mathcal{C}$.
Thus each of these distributions is integrable, and each gives a foliation by totally geodesic $(n-1)$-spheres.
The fibres of $\bar\pi$ are just the horizontal lifts of totally geodesic $(n-1)$-spheres in $G/K$.
Since each of these foliations is $\pi_\mathcal{Q}$-horizontal they descend to $\mathcal{Q}$, where their leaves are totally geodesic
Lagrangian $(n-1)$-spheres.  If we view $US^n$ as $\{(p,v)\in S^n\times S^n:p\cdot v=0\}$ these fibrations are
\[
\pi,\bar\pi:US^n\to S^n,\quad \pi(p,v)=p,\quad \bar\pi(p,v) = v.
\]
They map into each other under the automorphism $(p,v)\mapsto (v,-p)$, which corresponds to
rotation through $\pi/2$ under the geodesic flow.
\end{rem}

Whenever it is possible, taking the quotient by geodesic flow is an example of symplectic reduction:
geodesic flow is the Hamiltonian
flow corresponding to the squared-length function $\ell:TN\to \mathbb{R}$, $\ell(X) = |X|^2$, and $UN/S = \ell^{-1}(1)/S$
carries the symplectic $2$-form $\lambda_\mathcal{Q}$ which descends from $\lambda = -d\theta$. For $S^n$
we will show below that $\theta = h(\mathcal{Z},\cdot)$ and therefore the contact distribution $\mathcal{C} = \ker\theta$ is also the
horizontal distribution $\mathcal{Z}^\perp$ for $\pi_\mathcal{Q}$. Moreover the metric and symplectic structures which descend from $US^n$
are compatible and give the unique (up to scale) $G$-invariant K\"{a}hler-Einstein structure on $\mathrm{Gr}(2,n+1)$.

The following lemma summarizes what we need to know about the projection $\pi_\mathcal{Q}:US^n\to\mathcal{Q}$ using homogeneous geometry.
\begin{lem}
On $US^n\simeq G/H$, the canonical $1$-form $\theta$ is the $G$-invariant $1$-form corresponding to the
$\operatorname{Ad}_H$-invariant linear form $\theta_0:\mathfrak{p}\to\mathbb{R}$ defined by $\theta_0(\xi) = \g{\nu_0}{\xi}$. Consequently,
$\mathcal{C}\simeq [\mathfrak{q}]_H\subset [\mathfrak{p}]_H$. The $Ad_L$-invariant linear map
\[
J_0:\mathfrak{p}\to\mathfrak{p};\quad \eta\mapsto [\nu_0,\eta],
\]
corresponds to an endomorphism $J \in\operatorname{End}(TUS^n)$ with $J\mathcal{Z}=0$ and which induces an almost complex structure in
$\mathcal{C}$. Finally, $\lambda=-d\theta$ is the $G$-invariant $2$-form corresponding to the $\operatorname{Ad}_L$-invariant skew bilinear form
$\lambda_0:\mathfrak{p}\times\mathfrak{p}\to\mathbb{R}$ defined by
\begin{equation}\label{eq:lambda0}
\lambda_0(\xi,\eta) = \g{\nu_0}{[\xi,\eta]}=\g{J_0\xi}{\eta}.
\end{equation}
The pair $(\lambda,J)$ therefore both descend to $\mathcal{Q}\simeq G/L$, where they give the unique $G$-invariant
KE structure $(\lambda_\mathcal{Q},J_\mathcal{Q})$ (i.e., the Hermitian symmetric space structure) compatible with
the normal metric $h_\mathcal{Q}$.
\end{lem}
Our main point here is to make explicit the relationship between the structures $\theta,J,\lambda$ on $US^n$ and
$J_\mathcal{Q},\lambda_\mathcal{Q}$ on $\mathcal{Q}$.
\begin{proof}
First, $\theta$ is clearly $G$-invariant since the metric $g$ is and the projections $\pi$ and $\pi_{TN}$ are
$G$-equivariant. Now about any $X\in US^n$ we may choose a local frame $\Phi$ of $G\to G/H$, so that
$\beta_K(X) = \operatorname{Ad}\Phi\cdot\nu_0$. For $Y \in T_XUS^n$ we have
\begin{align*}
\theta_X(Y) &= \g{\beta_K(X)}{\beta_K(d\pi(Y))}\\
& = \g{\operatorname{Ad}\Phi\cdot\nu_0}{\operatorname{Ad} \Phi\cdot\phi_\mathfrak{m}(Y)}\\
& = \g{\nu_0}{\phi_\mathfrak{p}}
\end{align*}
for $\phi = \Phi^{-1}d\Phi$, using the fact that for $\xi\in\mathfrak{m}$ and $\eta\in\mathfrak{p}$, $\g{\xi}{\eta_\mathfrak{m}}= \g{\xi}{\eta}$.
This yields the expression for $\theta_0$ above. To obtain the expression for $\lambda$ we note that
$\theta = \g{\nu_0}{\phi}$, since $[\nu_0,\mathfrak{h}]=0$, and therefore
\[
d\theta = \g{\nu_0}{d\phi} = \g{\nu_0}{-\tfrac12[\phi\wedge\phi]},
\]
by the Maurer-Cartan equations. Thus, writing $\eta=\phi(Y)$ and $\zeta=\phi(Z)$, we have
\begin{align*}
\lambda(Y,Z) &= \g{\nu_0}{[\eta,\zeta]}\\
&=\g{\nu_0}{[\eta_\mathfrak{h},\zeta_\mathfrak{h}]+[\eta_\mathfrak{h},\zeta_\mathfrak{p}]+ [\eta_\mathfrak{p},\zeta_\mathfrak{h}] + [\eta_\mathfrak{p},\zeta_\mathfrak{p}]}\\
&= \g{\nu_0}{[\eta_\mathfrak{p},\zeta_\mathfrak{p}]}
\end{align*}
where we have used the adjoint invariance of the inner product to eliminate terms. One can check directly
that $\operatorname{ad}^2\nu_0=-I$ on $\mathfrak{q}$, but the geometric reason is that
$S^n$ has constant curvature $1$, since the curvature on any symmetric
space $G/K$ comes from the $\operatorname{Ad}_K$-invariant tri-linear map
\begin{equation}\label{eq:R}
R_0:\mathfrak{m}\times\mathfrak{m}\times\mathfrak{m} \to\mathfrak{m},\quad R_0(\xi,\eta)\zeta = -[[\xi,\eta],\zeta].
\end{equation}
In constant curvature $1$, this gives, for $\eta\in\mathfrak{m}_0 = \mathfrak{m}\cap\mathfrak{s}^\perp$,
\[
-\operatorname{ad}^2\nu_0\cdot\eta = R_0(\eta,\nu_0)\nu_0 = \g{\nu_0}{\nu_0}\eta - \g{\eta}{\nu_0}\nu_0 = \eta
\]
Now $\operatorname{ad}\nu_0:\mathfrak{m}_0\to\mathfrak{n}$ is an isomorphism, since it is injective and $\dim\mathfrak{m}_0=n-1=\dim\mathfrak{n}$, so the same
conclusion holds on $\mathfrak{n}$. As a consequence, if we set $\mathcal{H}_0=\mathcal{H}\cap\mathcal{C}$, then
\begin{equation}\label{eq:J}
J:\mathcal{V} \to \mathcal{H}_0,\quad J:\mathcal{H}_0\to\mathcal{V},
\end{equation}
are both isomorphisms. The rest of the lemma follows since $(h_\mathcal{Q},J_\mathcal{Q})$ is plainly the standard Hermitian
symmetric space structure on
$G/L\simeq \mathrm{Gr}(2,n+1)$ corresponding to the centre $S$ of its isotropy subgroup $L$.
\end{proof}
We finish this section with some facts about $US^n$ which we will need in the next section. The first describes
the geometric meaning of the vertical projection $TUS^n\to\mathcal{V}$ along $\mathcal{H}$.
\begin{lem}\label{lem:vertZ}
Let $Z\in T_\xi US^n$ be non-vertical, with vertical component $Z^\mathcal{V}$. Then
\begin{equation}\label{eq:vertZ}
d\pi(JZ^\mathcal{V}) = -\nabla_{\bar Z} Y
\end{equation}
where $\bar Z = d\pi(Z)$ and $Y(t)$ is any curve in $US^n$ satisfying $Y(0)=\xi$, $\dot{Y}(0) = Z$.
Hence $Z$ is horizontal whenever $Y(t)$ is parallel along $\pi(Y(t))$.
\end{lem}
\begin{proof}
Let $Y(t)$ be any curve in $G/H$ satisfying $Y(0)=\xi$, $\dot{Y}(0) = Z$ and frame it by a curve $g(t)$ in $G$, i.e,
$Y(t) = g(t)H$ and therefore $\beta_K(Y)= \operatorname{Ad} g\cdot \nu_0$. Set $\eta = (g^{-1}\dot{g})(0)$, so that
\[
\beta_H(Z)=\beta_H(\dot{Y}(0)) = \operatorname{Ad} g(0)\cdot\eta_\mathfrak{p},
\]
and therefore $\beta_H(Z^\mathcal{V}) = \operatorname{Ad} g(0)\cdot\eta_\mathfrak{n}$. On the other hand
$\bar Z = (d\pi\circ Y/dt)(0)$ and therefore
\begin{align*}
\beta_K(\nabla_{\bar Z} Y)& = \operatorname{Ad} g(0)\cdot\{\frac{d}{dt}\nu_0 + [\eta,\nu_0]\}_\mathfrak{m}\\
&= \operatorname{Ad} g(0)\cdot [\eta_\mathfrak{n},\nu_0]\\
& = -\beta_K(d\pi(JZ^\mathcal{V})),
\end{align*}
since $[\eta,\nu_0]_\mathfrak{m} = [\eta_\mathfrak{n},\nu_0]$ by \eqref{eq:brackets}.
\end{proof}
It follows from this that the metric $h$ agrees with the Sasaki metric $h_s$, since, in the notation of the previous
lemma,
\[
h_s(Z,Z) = g(Z^\mathcal{H},Z^\mathcal{H}) + g(\nabla_{\bar Z}Y,\nabla_{\bar Z}Y) = h(Z^\mathcal{H},Z^\mathcal{H}) + h(JZ^\mathcal{V},JZ^\mathcal{V}).
\]
and $J$ is an isometry within $\mathcal{C}\supset\mathcal{V}$.

In the previous proof we used the expression for the Levi-Civita connexion
$\nabla$ of $(G/K,g)$ in a local frame. Similarly, we note for later use that in a local frame $\Phi:V\to G$ for $G/H$
the Levi-Civita connexion $\nabla^h$ for $(US^n,h)$ takes the form
\begin{equation}\label{eq:LC}
\beta_H(\nabla^h_ZW)  = \operatorname{Ad}\Phi\cdot\{Z\phi_\mathfrak{p}(W) + [\phi_\mathfrak{h}(Z),\phi_\mathfrak{p}(W)]+[\phi_\mathfrak{p}(Z),\phi_\mathfrak{p}(W)]_\mathfrak{p}\},
\end{equation}
for $Z,W\in\Gamma(TUS^n)$ and $\phi = \Phi^{-1}d\Phi$.

\section{The spherical and geodesic Gauss maps.}

Let $f:M\to S^n$ be a smooth immersion of an $m$-dimensional oriented manifold $M$, which we equip with the induced metric.
The normal bundle $TM^\perp$ is the orthogonal complement to $TM\subset f^{-1}TS^n$ and we will write
$\pi^\perp:UM^\perp\to M$ for the unit normal bundle. Then we have an induced immersion $\mu:UM^\perp\to US^n$. Following
\cite{JenR} we will call this the \emph{spherical Gauss map} (not to be confused with Obata's Gauss map \cite{Oba}, which is
sometimes referred to by this name). This is
a Legendrian immersion for the contact structure $\mathcal{C}$ on $US^n$ \cite[Ex.\ 3.44]{McDS}, and therefore it is horizontal for the
projection $\pi_\mathcal{Q}:US^n\to\mathcal{Q}$. The composite $\gamma:UM^\perp\to\mathcal{Q}$ assigns to each normal vector the oriented geodesic
it generates, and therefore we will call this the \emph{geodesic Gauss map}. This is a Lagrangian immersion, since $\mu$ is
Legendrian. Since $\pi_\mathcal{Q}$ is a Riemannian submersion, the metric on $UM^\perp$ induced by $\mu$ agrees with that induced by
$\gamma$, and this will be the metric we equip $UM^\perp$ with. The following diagram summarizes the relation between maps
(cf.\ \cite{MaO11}, where $\mathcal{Q}$ is treated as the complex hyperquadric):
\begin{equation}\label{eq:gammaf}
\begin{array}{ccccc}
UM^\perp & \stackrel{\mu}{\longrightarrow} & US^n & & \\
\pi^\perp\downarrow\quad  & &\quad \downarrow\pi&\stackrel{\pi_\mathcal{Q}}{\searrow} & \\
M & \stackrel{f}{\longrightarrow} & S^n & &\mathcal{Q}
\end{array}
\end{equation}

We will denote the induced connexion, shape operator and second fundamental form of $f$ by $\nabla^f$, $A_f$ and $\mathrm{I\! I}_f$
(and similarly for $\mu$ and
$\gamma$), and take its mean curvature to be $H_f=\operatorname{tr}_g\mathrm{I\! I}_f$. Our aim is to describe the relationship between the mean
curvatures $H_f$, $H_\mu$ and $H_\gamma$. For the last two the relationship is straighforward and follows from the next
lemma regarding the behaviour of tension fields.
\begin{lem}\label{lem:tension}
Let $U,P,Q$ be Riemannian manifolds.
Suppose $\varphi:U\to P$ is a smooth immersion and $\psi:P\to Q$ is a Riemannian submersion.
If $\varphi$ is horizontal then its tension field $\tau(\varphi)$ is also horizontal and
$\tau(\psi\circ\varphi)=\psi_*\tau(\varphi)$. Hence $\varphi$ is harmonic if and only if
$\psi\circ\varphi$ is harmonic. Further, if $\varphi$ is isometric then so is $\psi\circ\varphi$,
therefore $H_{\psi\circ\varphi} = \psi_*H_\varphi$, and $\varphi$ is minimal if and only if $\psi\circ\varphi$ is minimal.
\end{lem}
\begin{proof}
Set $\gamma = \psi\circ\varphi$, then we can think of $\varphi$ as its horizontal lift. Notice
that $\gamma$ is an immersion since $\varphi$ is a horizontal immersion.
First we show that $\psi_*\tau(\varphi) = \tau(\gamma)$.
Let $E_i$ be a locally orthonormal frame for $U$. Then (using summation convention)
\begin{eqnarray*}
\psi_*\tau(\varphi) & = & \psi_*(\nabla^P_{d\varphi(E_j)}\varphi_*E_j -
d\varphi(\nabla^U_{E_j}E_j))\\
&=& \nabla^Q_{d\gamma(E_j)}\gamma_*E_j - d\gamma(\nabla^U_{E_j}E_j)\\
&=& \tau(\gamma).
\end{eqnarray*}
Here we used \cite[Lemmas 2,3]{ONe} to deduce that for $X,Y\in\Gamma(TU)$, since $\varphi_*Y$ is
the horizontal lift of $\gamma_*Y$,
\[
\psi_*(\nabla^P_{d\varphi(X)}\varphi_*Y)=\nabla^Q_{d\gamma(X)}\gamma_*Y.
\]
Now the vertical component of $\tau(\varphi)$ is the vertical component of
$\nabla^P_{d\varphi(E_j)}\varphi_*E_j$.
But by \cite[Lemma 3]{ONe} $\nabla^P_XX$ is horizontal whenever $X$ is a horizontal lift.
Hence $\tau(\varphi)$ is horizontal. The final statement is obvious since $\psi$ is a Riemannian
submersion.
\end{proof}
Since $\mu$ and $\gamma$ are isometric immersions we have $H_\mu=\tau(\mu)$ and $H_\gamma=\tau(\gamma)$. The conditions of
the lemma apply to our situation, and therefore $H_\mu$ lies in $\mathcal{C}$ and $H_\gamma= (\pi_\mathcal{Q})_*H_\mu$.

To be able to compare $H_\mu$ with $H_f$ we need to understand how the bundle map $\pi^\perp:UM^\perp\to M$ relates the
induced metrics $\mu^*h$ and $f^*g$. Some of what we want to
know has already been established by Gudmundsson \& Mo \cite{GudM} in their study of unit normal bundles as harmonic
morphisms. First we need a preliminary observation. Let $T(UM^\perp) = \mathcal{H}_M+\mathcal{V}_M$ denote the decomposition into
$\pi^\perp$-horizontal and vertical subbundles. Although $\mathcal{V}_M\subset \mu^{-1}\mathcal{V}$, it is almost never true that $\mathcal{H}_M\subset
\mu^{-1}\mathcal{H}$. In fact this is only true when $f$ is a totally geodesic immersion, for the following reason.
\begin{lem}\label{lem:vertJZ}
Let $Z\in T_\xi(UM^\perp)$ be $\pi^\perp$-horizontal, and write it as $Z = Z^\mathcal{H}+Z^\mathcal{V}$ for the splitting
$\mu^{-1}\mathcal{H}+\mu^{-1}\mathcal{V}$ and notice that $Z^\mathcal{H}\in\mathcal{H}\cap\mathcal{C}$. Then
\[
d\pi(JZ^\mathcal{V}) = A_f(\xi)\bar Z,
\]
where $\bar Z=d\pi(\mathcal{Z}^\mathcal{H})$ we think of $J$ as an almost complex structure in $\mathcal{C}=[\mathfrak{q}]_H$.
Hence $\pi^\perp$ is a Riemannian submersion if and only if $A_f=0$, i.e., $f$ is
totally geodesic.
\end{lem}
For the proof we need to set up some frame conventions which we will use thoughout the rest of the section. About each
$\xi\in UM^\perp$ we can choose a local frame $\Phi:V\to G$ for $\mu$, and provided we choose $V$ carefully, so that it is
both simply connected and its image $U=\pi(V)\subset M$ is open, there will be a local frame $F:U\to G$ for $f$ related
by $\Phi = (F\circ\pi)\Psi$ for some $\Psi:V\to K$. Set $\phi = \Phi^{-1}d\Phi$, $\alpha = F^{-1}dF$. Then
\[
\phi = \operatorname{Ad}\Psi^{-1}\cdot(\alpha\circ d\pi) + \psi,\quad \psi = \Psi^{-1}d\Psi.
\]
Since $\psi$ takes values in $\mathfrak{k}$, this means
\begin{equation}\label{eq:phim}
\phi_\mathfrak{k} = \operatorname{Ad}\Psi^{-1}\cdot(\alpha\circ d\pi)_\mathfrak{k} + \psi,\quad \phi_\mathfrak{m} = \operatorname{Ad}\Psi^{-1}\cdot(\alpha\circ d\pi)_\mathfrak{m}.
\end{equation}
In particular, $\operatorname{Ad}\Phi\cdot\phi_\mathfrak{m}(Z)= \operatorname{Ad} F\cdot\alpha_\mathfrak{m}(d\pi(Z))$. We also note that whenever $Z\in\mathcal{C}$
\begin{equation}\label{eq:Jphi}
\phi_\mathfrak{p}(JZ) = J_0\phi_\mathfrak{p}(Z)\implies \phi_\mathfrak{n}(JZ) = J_0\phi_\mathfrak{m}(Z),\ \phi_\mathfrak{m}(JZ) = J_0\phi_\mathfrak{n}(Z).
\end{equation}
\begin{proof}
Using Lemma \ref{lem:vertZ}, we have
\[
\phi_\mathfrak{m}(JZ^\mathcal{V}) = J_0\phi_\mathfrak{n}(Z^\mathcal{V}) = [\nu_0,\phi_\mathfrak{n}(Z^\mathcal{V})] = -\phi_\mathfrak{m}(\nabla_{\bar Z}\xi),
\]
where $\xi$ follows any curve tangent to $Z$. Now since $Z\in(\mathcal{H}_M)_\xi$ we have, for all $W\in(\mathcal{V}_M)_\xi$,
\begin{align*}
0= h(Z,W) & = h(Z^\mathcal{V},W) \\
& = \g{J_0\phi_\mathfrak{n}(Z)}{J_0\phi_\mathfrak{n}(W)}\\
&= \g{\phi_\mathfrak{m}(\nabla_{\bar Z}\xi)}{\phi_\mathfrak{m}(JW)}\\
& = g(\nabla_{\bar Z}\xi,\bar W).
\end{align*}
Now for every $\xi\in UM^\perp$, $TM^\perp = d\pi(J(\mathcal{V}_M)_\xi)+\mathbb{R}.\xi$, and
$g(\nabla_{\bar Z}\xi,\xi)=0$. Therefore $(\nabla_{\bar Z}\xi)^\perp=0$.  Hence $\nabla_{\bar Z}\xi = -A_f(\xi)\bar Z$.
\end{proof}
Therefore we can write every $\pi^\perp$-horizontal vector $Z\in T_\xi(UM^\perp)$ as
\[
Z = \bar Z - JA_f(\xi)\bar Z,
\]
if we identify $\bar Z=d\pi(Z)$ with its $\pi$-horizontal lift to $T_\xi US^n$. Consequently in $\mathcal{H}_M$ the induced metric
has the form
\begin{equation}\label{eq:hHM}
h(Z,W) = g(\bar Z,\bar W) + g(A_f(\xi)\bar Z,A_f(\xi)\bar W),\quad Z,W\in\mathcal{H}_M.
\end{equation}
Indeed, this holds for any unit normal bundle equipped with the metric induced by the Sasaki metric \cite{GudM}.
This prompts the following definition.
\begin{defn}
For an isometric immersion $f:M\to N$ into a Riemannian manifold $(N,g)$, we will define its \emph{shape form}
to be the operator
\[
a_f:TM^\perp\to S^2TM^*,\quad  a_f(\xi)(X,Y) = g(A_f(\xi)X,A_f(\xi)Y),
\]
for $\xi\in T_pM^\perp$, $X,Y\in T_pM$.
We will say $f$ has \emph{(weakly) conformal shape form} when there exists a smooth function $r:UM^\perp\to\mathbb{R}$ for which
$a_f(\xi) = r(\xi)^2 g$ for all $\xi\in UM^\perp$. This is equivalent to the condition that
$A_f(\xi)^2 = r(\xi)^2I$ for all $\xi\in UM^\perp$, and therefore $r(\xi)^2 = \tfrac{1}{m}\|A_f(\xi)\|^2$.
\end{defn}
Notice that $a_f(\xi)$ is positive semi-definite for all $\xi\neq 0$, since $A_f$ is symmetric.

Gudmundsson \& Mo \cite{GudM,Mo} use the terminology \emph{conformal second fundamental form} to refer to the condition
defined above. But that phrase was used much earlier by Jensen \& Rigoli \cite{JenR} to refer to a very different condition,
and so we have chosen to avoid confusion by providing a different name.

Given the expression \eqref{eq:hHM} we deduce immediately:
\begin{lem}[\cite{GudM} Prop.\ 4.2]\label{lem:horizconf}
The submersion $\pi^\perp:UM^\perp\to M$ is horizontally conformal if and only if
$f$ has conformal shape form. The conformal factor is $1/(1+r(\xi)^2)$. In particular, every minimal surface has conformal
shape form.
\end{lem}
The last statement is easy to see: $f$ is minimal if and only if  $\operatorname{tr} A_f(\xi)=0$ for every unit normal vector $\xi$.
In dimension two this means $A_f(\xi)^2 = -\det(A_f(\xi)) I$ and $\det(A_f(\xi))<0$.
We can now state our main result.
\begin{thm}\label{thm:main}
Suppose $f:M\to S^n$ has conformal shape form. Then at $\xi\in UM^\perp$, for $Z,W\in T_\xi(UM^\perp)$ with $Z$
$\pi^\perp$-horizontal and $W$ vertical,
\begin{align}
\lambda(H_\mu,Z) & = \tfrac{1}{1+r(\xi)^2} g(\nabla^\perp_{\bar Z}H_f,\xi),\label{eq:HZ}\\
\lambda(H_\mu,W) & = - \tfrac{1}{1+r(\xi)^2} g(H_f,\bar{W}),\label{eq:HW}
\end{align}
where $r(\xi)^2 = \tfrac{1}{m}\operatorname{tr}_gA_f(\xi)^2$, $\bar{Z}=d\pi(Z)$ and $\bar{W}=d\pi(JW)$.
For hypersurfaces the second equation is vacuous.
Thus for $m<n-1$, $\mu$ is minimal (equally, $\gamma$ is minimal
Lagrangian) if and only if $f$ is minimal. For hypersurfaces $\mu$ is minimal if and only if $f$ has constant mean
curvature.
\end{thm}
We can be a little more precise about what happens in dimension $m\geq 3$ given the condition of conformal shape form.
For $f$ to be minimal and have conformal shape form it must have both $\operatorname{tr} A_f(\xi)=0$ and
$A_f(\xi)^2 = r(\xi)^2I$ for all $\xi$. By considering the eigenvalues of $A_f(\xi)$ it is easy to see that
when $m$ is odd this forces $r(\xi)=0$, so $f$ must be be totally geodesic. This, and some other implications of conformal
shape form, can be found \cite{Mo}.  It is also quite restrictive when $M$ is a constant mean curvature
hypersurface for $m\geq 3$: we discuss this in Example \ref{exam:hyper} below.

Before we give the proof of this theorem, we consider some examples and how these fit in with the literature.
\begin{exam}\label{exam:totgeod}
The simplest examples arise when $M$ is a totally geodesic $m$-sphere. As we have mentioned, this is the
only case for which $\pi^\perp$ is a Riemannian submersion. We can represent $M$ as $V\cap S^n$, where
$V\subset\mathbb{R}^{n+1}$ is a linear subspace of dimension $m+1$, and then it is easy to see that
\[
UM^\perp = (V\times V^\perp)\cap (S^n\times S^n) \subset US^n\subset S^n\times S^n.
\]
So $UM^\perp\simeq S^m\times S^{n-m-1}$. For each $m$ these are isometric to each other, and are homogeneous
submanifolds for a subgroup of $G$ isomorphic to $SO(m+1)\times SO(n-m)$. These are totally geodesic in both $US^n$
and $\mathcal{Q}$. In particular, when $m=1$ and $n\geq 3$ these give the only examples, since $M$ must be a geodesic.
The two foliations of $\mathcal{Q}$ described in Remark \ref{rem:spheres} fit into this class of examples: they represent the
cases of $m=n-1$ and $m=0$.
\end{exam}
\begin{exam}\label{exam:surfaces}
By Lemma \ref{lem:horizconf} and the theorem, for every minimal surface in $S^n$ its unit normal bundle is minimal
Legendrian in $US^n$. By projection into $\mathcal{Q}$ we obtain minimal Lagrangian submanifolds each
of which is an $S^{n-3}$-bundle over a surface, and where each fibre is totally geodesic.
This provides a vast supply of compact minimal Lagrangian submanifolds in $\mathcal{Q}$, since there is a
very rich theory of compact minimal surfaces in spheres: in $S^3$ from Lawson's examples \cite{Law} and
Hitchin's construction of all minimal tori \cite{Hit}; in $S^4$, from Bryant's superminimal surfaces \cite{Bry} and the
non-superminimal tori of \cite{FerPPS}; in higher dimensions from Riemannian twistor theory
and integrable systems constructions. For surfaces in $S^3$ the geodesic Gauss map agrees with the usual Gauss
map (for a surface in $\mathbb{R}^4$). Palmer \cite{Pal94} seems to have been the first to point out that minimal
surfaces in $S^3$ have minimal Lagrangian Gauss maps; see also \cite{CasU}.
\end{exam}
\begin{exam}\label{exam:hyper}
When $M$ is a hypersurface we may as well restrict our attention to one connected component of $UM^\perp$ and identify
this with $M$. The geodesic Gauss map is then just the usual one, considering $M\subset\mathbb{R}^{n+1}$. Palmer
\cite{Pal97} gave a formula for $H_\gamma$ which applies in all cases, not just with the assumption of conformal
shape form (see Remark \ref{rem:hypersurf} below). From this formula he deduced that the Gauss map would be minimal
Lagrangian whenever $M$ is isoparametric, i.e., has constant principal curvatures. Palmer's formula has been the basis for
subsequent constructions of minimal Lagrangian submanifolds: from isoparametric hypersurfaces
\cite{MaO09,Ohn} and from rotationally symmetric (non-isoparametric) hypersurfaces \cite{LiMW}. The previous theorem
yields nothing beyond this for hypersurfaces of dimension $3$ or more, because the condition that $f$ be CMC and have
conformal shape form forces
$f$ to be isoparametric. To see why, we compare $H_\gamma$, which is the tension field for $\gamma:(M,\mu^*h)\to\mathcal{Q}$,
with the tension field $\tau(\bar\gamma)$ for $\bar\gamma:(M,f^*g)\to \mathcal{Q}$ (the same map with a different metric on $M$).
We can write
$\gamma = \bar\gamma\circ\pi^\perp$, and then the
composition formula for tension fields \cite[2.20]{EelL} says that
\[
H_\gamma = d\bar\gamma(\tau(\pi^\perp)) + \operatorname{tr}_{h_\mathcal{Q}}\nabla d\bar\gamma(d\pi^\perp,d\pi^\perp).
\]
When $f$ has conformal shape form, with $A_f^2(\xi) = r(\xi)^2I$, the last term is
$\tfrac{1}{1+r^2}\tau(\bar\gamma)$. When $f$ is additionally CMC, $H_\gamma=0$ by the previous theorem and
$\tau(\bar\gamma)=0$ by the Ruh-Vilms theorem \cite{RuhV}. Therefore $\pi^\perp$ is conformal and harmonic, and therefore a
harmonic morphism (with zero dimensional fibres). When $m\geq 3$ this
implies that $\pi^\perp$ is a homothety \cite[Thm 2]{Gud}, so $r(\xi)$ is constant.
\end{exam}
To prove Theorem \ref{thm:main} we establish the general expressions for $H_\mu$ without the assumption of conformal shape form.
We first set up an adapted orthonormal frame about each
point $\xi\in UM^\perp$. Since $UM^\perp$ is Legendrian, about each point $\xi\in UM^\perp$
we can choose a frame for $UM^\perp$ by taking local orthonormal
frames $\{E_i:I=1,\ldots,m\}$ for $\mathcal{H}_M$ and $\{E_\beta:\beta = m+1,\ldots,n-1\}$ for $\mathcal{V}_M$. Then
\[
\{E_i,E_\beta,JE_i,JE_\beta: 1\leq i\leq m,\ m+1\leq \beta \leq n-1\},
\]
frames $\mu^{-1}\mathcal{C}$ orthonormally about $\xi$.
From now on we will use the index conventions $1\leq A,B\leq n-1$, $1\leq i,j\leq m$ and $m+1\leq\beta\leq n-1$.
As before we define $\bar E_i = d\pi(E_i)$ and $\bar E_\beta = d\pi(JE_\beta)$ (note that $JE_\beta\in\mathcal{H}_\xi$).
Then $TM = \operatorname{Sp}\{\bar E_i\}$ and $TM^\perp = \operatorname{Sp}\{\bar E_\beta,\xi\}$.
\begin{prop}
At $\xi\in UM^\perp$, with the adapted frame above and $p=\pi(\xi)$,
\begin{align}
h_\xi(H_\mu, JE_i) & =  -g_p(\sum_j[\nabla\mathrm{I\! I}_f](\bar E_i,\bar E_j,\bar E_j),\xi),\label{eq:Hi}\\
h_\xi(H_\mu, JE_\beta) & = g_p(\sum_j \mathrm{I\! I}_f(\bar E_j,\bar E_j),\bar E_\beta).\label{eq:Hbeta}
\end{align}
\end{prop}
Theorem \ref{thm:main} is now a direct consequence of these expressions in the case when $f$ has conformal shape form,
since $\|\bar E_i\|^2 = 1/(1+r(\xi)^2)$ at $\xi$ in that case (and of course
$\operatorname{tr}_g\nabla\mathrm{I\! I}_f = \nabla^\perp \operatorname{tr}_g\mathrm{I\! I}_f$).
\begin{proof}
By Lemma \ref{lem:tension} the mean curvature $H_\mu$ lies in $\mu^{-1}\mathcal{C}$ so we need only calculate
\[
h(H_\mu,JE_B)= \sum_Ah(\mathrm{I\! I}_\mu(E_A,E_A),JE_B) = \sum_{A} h(\nabla^h_{E_A}\mu_*E_A,JE_B).
\]
For simplicity, set $H_\mu^i = h(H_\mu,JE_i)$ and $H_\mu^\beta = h(H_\mu,JE_\beta)$.
Using the expression \eqref{eq:LC} we have
\[
\beta_H(\nabla^\mu_{E_A}E_A) = \operatorname{Ad}\Phi\cdot (E_A\phi_\mathfrak{p}(E_A) + [\phi_\mathfrak{h}(E_A),\phi_\mathfrak{p}(E_A)]).
\]
Since each $E_\beta$ is vertical it has $\phi_\mathfrak{m}(E_\beta)=0=\phi_\mathfrak{n}(JE_\beta)$, so that
\begin{align}\label{eq:Hi1}
H_\mu^i & = \sum_A\g{E_A\phi_\mathfrak{p}(E_A) + [\phi_\mathfrak{h}(E_A),\phi_\mathfrak{p}(E_A)]}{\phi_\mathfrak{p}(JE_i)}\notag\\
&= \sum_j \g{E_j\phi_\mathfrak{p}(E_j) + [\phi_\mathfrak{h}(E_j),\phi_\mathfrak{p}(E_j)]}{\phi_\mathfrak{p}(JE_i)}\notag\\
&+ \sum_\beta \g{E_\beta\phi_\mathfrak{n}(E_\beta) + [\phi_\mathfrak{h}(E_\beta),\phi_\mathfrak{n}(E_\beta)]}{\phi_\mathfrak{n}(JE_i)},
\end{align}
and
\begin{equation}\label{eq:Hbeta1}
H_\mu^\beta  = \g{\sum_jE_j\phi_\mathfrak{m}(E_j) + [\phi_\mathfrak{h}(E_j),\phi_\mathfrak{m}(E_j)]}{\phi_\mathfrak{m}(JE_\beta)}.
\end{equation}
The second summand in \eqref{eq:Hi1} vanishes because the fibre $U_pM^\perp$ is totally geodesic.
Each $E_\beta$ is tangent to this fibre, and the Levi-Civita connexion along this fibre is the restriction of
\eqref{eq:LC} to the case where $\phi_\mathfrak{m}(Z)=0=\phi_\mathfrak{m}(W)$.

Therefore
\begin{align}\label{eq:Hi2}
H_\mu^i & = \sum_j \g{E_j\phi_\mathfrak{m}(E_j) + [\phi_\mathfrak{h}(E_j),\phi_\mathfrak{m}(E_j)]}{\phi_\mathfrak{m}(JE_i)}\notag\\
&+ \sum_j \g{E_j\phi_\mathfrak{n}(E_j) + [\phi_\mathfrak{h}(E_j),\phi_\mathfrak{n}(E_j)]}{\phi_\mathfrak{n}(JE_i)}.
\end{align}
To simplify this define, for $X,Y$ local vector fields on $UM^\perp$,
\[
D_X\phi_\mathfrak{p}(Y) = X\phi_\mathfrak{p}(Y) + [\phi_\mathfrak{h}(X),\phi_\mathfrak{p}(Y)].
\]
This represents the (pullback to $UM^\perp$ of the) canonical connexion of $G/H$ in the local frame $\Phi$. We recall
that $\phi_\mathfrak{p}(JX) = J_0\phi_\mathfrak{p}(X)$ and observe that $D_X\phi_p(JX) = J_0D_X\phi_p(X)$ since $J_0$ is $\operatorname{Ad}_H$-invariant.
We claim that whenever $X\in(\mathcal{H}_M)_\xi$ and $Y,Z$ are local sections of $\mathcal{C}$ about $\xi$, we have
\begin{equation}\label{eq:D_X}
\g{D_X\phi_\mathfrak{m}(Y)}{\phi_\mathfrak{m}(Z)} = g(\nabla_{\bar X}\bar Y,\bar Z).
\end{equation}
To see this, we use $\phi_\mathfrak{h} = \phi_\mathfrak{k}-\phi_\mathfrak{n}$ to write the left hand side as
\[
 \g{X\phi_\mathfrak{m}(Y) + [\phi_\mathfrak{k}(X),\phi_\mathfrak{m}(Y)]}{\phi_\mathfrak{m}(Z)} - \g{[\phi_\mathfrak{n}(X),\phi_\mathfrak{m}(Y)]}{\phi_\mathfrak{m}(Z)}.
\]
Now we observe that, from Lemma \ref{lem:vertJZ}, since $X\in\mathcal{H}_M$,
\begin{equation}\label{eq:phiX}
\phi_\mathfrak{n}(X) = -J_0\phi_\mathfrak{m}(A_f(\xi)\bar X),\quad
\phi_\mathfrak{m}(JX)  = J_0\phi_\mathfrak{n}(X) = \phi_\mathfrak{m}(A_f(\xi)\bar X),\quad
\end{equation}
and $\phi_\mathfrak{n}(JX)  = J_0\phi_\mathfrak{m}(\bar X)$. We also note that \eqref{eq:phim} implies
\begin{align*}
& \operatorname{Ad}\Phi\cdot(X\phi_\mathfrak{m}(Y) +[\phi_\mathfrak{k}(X),\phi_\mathfrak{m}(Y)])\\
 = & \operatorname{Ad}(F\circ\pi_N)\cdot
(\sum_{j=1}^m \bar X\alpha_\mathfrak{m}(\bar Y) +[\alpha_\mathfrak{k}(\bar X),\alpha_\mathfrak{m}(\bar Y)]).
\end{align*}
Therefore the left hand side of \eqref{eq:D_X} becomes
\begin{align*}
& \g{\bar X\alpha_\mathfrak{m}(\bar Y) + [\alpha_\mathfrak{k}(\bar X),\alpha_\mathfrak{m}(\bar Y)]}{\alpha_\mathfrak{m}(\bar Z)}
+ \g{[[\nu_0,\phi_\mathfrak{m}(A_f(\xi)\bar X)],\phi_\mathfrak{m}(Y)]}{\phi_\mathfrak{m}(Z)},\\
 & = g(\nabla_{\bar X}\bar Y,\bar Z) - g(R(\xi,A_f(\xi)\bar X)\bar Y,\bar Z),
\end{align*}
using the curvature expression \eqref{eq:R} and \eqref{eq:phim}, together with the fact that
at the point $\xi$ itself, $\beta_K(\xi) = \operatorname{Ad}\Phi\cdot\nu_0$ since $\Phi$ is a frame for $\mu$.
But in $S^n$ this curvature term equals
\[
g(\xi,\bar Z)g(A(\xi)\bar X,\bar Y)-g(\xi,\bar Y)g(A(\xi)\bar X,\bar Z)=0,
\]
since $d\pi(\mathcal{C}_\xi)\perp\xi$. This establishes \eqref{eq:D_X}.

Now using \eqref{eq:D_X} and \eqref{eq:phiX} we compute the terms in \eqref{eq:Hi2}:
\begin{align*}
\g{ D_{E_j}\phi_\mathfrak{m}(E_j)}{\phi_\mathfrak{m}(JE_i)} & = g(\nabla_{\bar E_j}\bar E_j,A_f(\xi)\bar E_i)
  = g(A_f(\xi)\nabla^f_{\bar E_j}\bar E_j,\bar E_i),\\
\g{ D_{E_j}\phi_\mathfrak{n}(E_j)}{\phi_\mathfrak{n}(JE_i)} & = -\g{D_{E_j}\phi_\mathfrak{m}(JE_j)}{\phi_\mathfrak{m}(E_i)}
= -g(\nabla^f_{\bar E_j}[A_f(\xi)\bar E_j],\bar E_i),
\end{align*}
where we have also used that fact that $A_f(\xi)$ is self-adjoint and $J_0$ is an isometry. In this second term $\xi$
moves along the integral curve of $E_j$. Now $(\nabla_{\bar E_j}\xi)^\perp=0$, so the sum of the two expressions
can be simplified as follows:
\begin{align*}
g(A_f(\xi)\nabla^f_{\bar E_j}\bar E_j,\bar E_i)- g(\nabla^f_{\bar E_j}[A_f(\xi)\bar E_j],\bar E_i)
& = -g([\nabla A_f](\bar E_j,\xi)\bar E_j,\bar E_i)\\
& = -g( [\nabla  \mathrm{I\! I}_f](\bar E_j,\bar E_j,\bar E_i),\xi)\\
& =-g([\nabla  \mathrm{I\! I}_f](\bar E_i,\bar E_j,\bar E_j),\xi).
\end{align*}
The last equality holds
since $\nabla\mathrm{I\! I}_f$ is totally symmetric in spaces of constant sectional curvature (see, e.g., \cite[Cor.\ 4.4]{KobNII}).
This proves \eqref{eq:Hi}.

Finally, we obtain \eqref{eq:Hbeta} directly from \eqref{eq:Hbeta1} using \eqref{eq:D_X}:
\[
H_\mu^\beta  = g(\sum_j\nabla^f_{\bar E_j}\bar E_j,d\pi(JE_\beta))   = g(\sum_j \mathrm{I\! I}_f(\bar E_j,\bar E_j),\bar E_\beta).
\]
\end{proof}
\begin{rem}\label{rem:hypersurf}
The calculations in the previous proof lead quickly to Palmer's formula \cite[Prop.\ 3.4]{Pal97} for $H_\gamma$ when
$f:M\to S^n$ is a hypersurface. We fix a unit normal field $\xi$ and work only with the connected
component of $UM^\perp$ it determines, so that $\mu:M\to US^n$, $\mu(p)=\xi_p$.  In this case the adapted local frame for
$\mu^{-1}\mathcal{C}$ consists only of $\{E_i,JE_i:i=1,\ldots,n-1\}$. We can choose these so that about $p$ the frame $\{\bar
E_i\}$ for $T_pM$ is principal, i.e, it diagonalises the shape operator. We write $\mathcal{A}_f\bar E_i = \kappa_i \bar E_i$,
and therefore
\[
E_i = \bar E_i-\kappa_i J\bar E_i,
\]
where we are identifying $\bar E_i$ with its horizontal lift in $\mathcal{H}_\xi$. Thus $\|\bar E_i\|^2 = 1/(1+\kappa_i^2)$.
The calculations in the previous proof show that
\begin{align*}
h(H_\mu, JE_i) & = -\sum_j g([\nabla^f_{\bar E_i}A_f]\bar E_j,\bar E_j)\\
& =- \sum_j g(d\kappa_j(E_i)\bar E_j,\bar E_j)\\
& =- \sum_j\frac{1}{1+\kappa_j^2} d\kappa_j(E_i).
\end{align*}
This means that the mean curvature $1$-form $\sigma_{H_\gamma} = \lambda_\mathcal{Q}(H_\gamma,\cdot)$ of $\gamma$ can be written as
\begin{equation}\label{eq:sigmaH}
\sigma_{H_\gamma} = \sum_j\frac{1}{1+\kappa_j^2} d\kappa_j.
\end{equation}
\end{rem}

\section{Hamiltonian variations.}

We now consider smooth deformations $f_t:M\times I \to S^n$ of an immersion $f_0:M\to S^n$ of a compact manifold $M$
(without boundary).  Here $I\subset\mathbb{R}$ is an open interval
about $0$ and we assume that, for each $t$, $f_t$ is an immersion whose normal bundle is diffeomorphic to $TM^\perp$ (i.e.,
the normal bundle of $f_0$).
As a consequence of the Covering Homotopy Theorem (specifically, \cite[Thm 11.4]{Ste}) there exists a
compatible smooth deformation $\mu_t:UM^\perp\times I\to US^n$ of
the spherical Gauss map $\mu_0$ of $f_0$, i.e., $\pi\circ\mu_t = f_t\circ\pi^\perp$ at each $t$. This
will only be uniquely determined when $M$ is a hypersurface. Otherwise any two such deformations differ by a
smooth family of bundle
isomorphisms of $UM^\perp$, each covering the identity on $M$ (and equal to the identity on $UM^\perp$ at $t=0$).
In any case, $\gamma_t = \pi_\mathcal{Q}\circ\mu_t$ is a deformation of the geodesic Gauss map $\gamma_0$ of
$f_0$, through Lagrangian submanifolds.  Let $V_t\in \Gamma(\gamma_t^{-1}T\mathcal{Q})$ be
the variational vector field corresponding to this, and let
\[
\sigma_{V_t} = \lambda_\mathcal{Q}(V_t,d\gamma_t)\in\Gamma(T^*(UM^\perp)),
\]
be the $1$-form corresponding to it.  Since $V_t$ is a Lagrangian variation, $\sigma_{V_t}$ is closed.
Recall that $\gamma_t$ is called a \emph{Hamiltonian} deformation when $\sigma_{V_t}$ is also exact.
We will prove two results about Lagrangian variations of $\gamma$. Each relies on the following facts about $US^n$
as a circle bundle over $\mathcal{Q}$.

For simplicity we will denote $US^n$ as a circle bundle by $\pi_\mathcal{Q}:\mathcal{S}\to\mathcal{Q}$. The contact distribution
$\mathcal{C}$ provides a principal bundle connexion, with connexion $1$-form $i\theta$ and curvature $-i\lambda$. Its
first Chern class $c_1(\mathcal{S})$  is therefore the cohomology class of $\tfrac{1}{2\pi}\lambda_\mathcal{Q}$. Consequently, the
pullback of $\mathcal{S}$ to any Lagrangian immersion is a flat bundle.
Let $\mathcal{L}\to\mathcal{Q}$ be the tautological $2$-plane bundle of $\mathrm{Gr}(2,n+1)$ and identify $T\mathcal{Q}$ with $\operatorname{Hom}(\mathcal{L},\mathcal{L}^\perp)$.
The complex structure $J_\mathcal{Q}$ coincides with giving $\mathcal{L}$ the Hermitian line bundle structure which identifies
its unit circle bundle with $\mathcal{S}^{-1}$ (this is because geodesic flow is a \emph{right} action by $S$).
There is an isomorphism of Hermitian connected lines bundles $\mathcal{L}^{n-1}\simeq K_\mathcal{Q}$, where the latter is
the canonical bundle.
The curvatures are related via the K\"{a}hler-Einstein equation $i\rho_\mathcal{Q} = (n-1)i\lambda_\mathcal{Q}$, where $\rho_\mathcal{Q}$ is
the Ricci curvature of $\mathcal{Q}$.
\begin{prop}
For every smooth deformation $f_t$ of $f_0$ preserving the diffeomorphism class of the unit normal bundle, every compatible
deformation $\gamma_t$ of $\gamma_0$ is Hamiltonian.
\end{prop}
For hypersurfaces this was proved by Ma \& Ohnita \cite{MaO09}, where they also proved the converse for short term
deformations of $\gamma_t$. We will explain below why this converse will not generally hold for immmersions
$f:M\to S^n$ which have codimension at least two.
\begin{proof}
By \cite[Thm.\ 1.1]{MaO09}, for any Lagrangian variation $V$ of a Lagrangian
immersion $\gamma_0:UM^\perp\to\mathcal{Q}$, $\sigma_{V_t}$ measures the variation in holonomy of the flat bundle
$\mathcal{S}=\gamma_0^{-1}US^n$, in
the following sense. Each flat bundle $\mathcal{S}_t=\gamma_t^{-1}US^n$ determines a curve in the moduli space $H^1(U,S^1)$ of flat
bundles, whose tangent at $\mathcal{S}_t$ is the cohomology class of $-i\sigma_{V_t}$. In particular, the family $\mathcal{S}_t$ admits
a smooth family of horizontal sections $\mu_t$ if and only if $\sigma_{V_t}$ is exact.
So if $\gamma_t$ arises from a deformation $f_t$ each $\mathcal{S}_t$ has a horizontal section given by the spherical Gauss map
$\mu_t$, and therefore $\sigma_{V_t}$ is exact.
\end{proof}
In \cite{Pal97}, Palmer deduced from \eqref{eq:sigmaH} that the mean curvature $1$-form $\sigma_{H_\gamma}$ of
$\gamma$ is exact when $f$ is a hypersurface, so that mean curvature variation is Hamiltonian. We can prove this
for the geodesic Gauss map of any
immersion $f:M\to S^n$ using another simple circle bundle argument.
\begin{prop}
For any immersion $f:M\to S^n$ with geodesic Gauss map $\gamma:UM^\perp\to\mathcal{Q}$,
the mean curvature vector field $H_\gamma$ is a Hamiltonian variation.
\end{prop}
An immediate corollary is that being Hamiltonian stationary and being Lagrangian stationary mean the same thing for
geodesic Gauss maps.
This also makes it reasonable to ask under what circumstances $H_\gamma$ arises from a deformation of $f$, for
it would be interesting to know when Lagrangian mean curvature flow of $\gamma$ keeps it inside the class of
geodesic Gauss maps of immersions of $M$.
\begin{proof}
By \cite[Prop.\ 2.2]{Oh94}, $i\sigma_{H_\gamma}$ is the connexion $1$-form for the bundle $\gamma^{-1}K_\mathcal{Q}$, the
pull-back of the canonical bundle over $\mathcal{Q}$ (and by Dazord's fomula $d\sigma_{H_\gamma} = \gamma^*\rho_\mathcal{Q}=0$).
Now $K_\mathcal{Q}\simeq\mathcal{L}^{n-1}$ as Hermitian connected line bundles
and $\gamma^{-1}\mathcal{L}$ is trivial (it has horizontal section $\mu$). Thus $\gamma^{-1}K_\mathcal{Q}$ is also trivial and
thus $\sigma_{H_\gamma}$ must be exact.
\end{proof}
\begin{rem}
If $f:M\to S^n$ is an immersion of codimension at least two, one cannot expect every Hamiltonian variation of its
geodesic Gauss map $\gamma$ to provide a deformation of $f$, even for a short time. There are immersions $f$
which admit smooth Lagrangian deformations $\gamma_t:UM^\perp\to\mathcal{Q}$, $\gamma_0=\gamma$, for which $\gamma_t$ for $t\neq
0$ is the geodesic Gauss map of an immersion of $UM^\perp$ as a hypersurface in $S^n$. Such families are easy to
construct for $n=3$, by taking a family of immersions $f_t:S^1\times S^1\to S^3$ for which $d\mu_t$ is transverse to the
vertical distribution $\mathcal{V}$ except at $t=0$, where one of the $S^1$ factors becomes vertical and thus $\mu_0$ is the
unit normal bundle for a closed curve $f_0$ in $S^3$. For example, such a family arises by considering the pre-image
under the Hopf fibration $S^3\to S^2$ of the intersection of a plane $V\subset\mathbb{R}^3$ with $S^2$. By tilting the plane
appropriately one can obtain a family of circles in $S^2$ which degenerate to a point at $t=0$.
Lying over this on $S^3$ we have a a family of tori which degenerates to a geodesic at $t=0$.

When $f$ is a hypersurface it is the stability of the transversal intersection $T(UM^\perp)\cap\mathcal{V}\subset\mathcal{C}$
which prevents degeneration from happening at least for short term deformations. Indeed, we expect that for \emph{every}
immersion $f:M\to S^n$ of codimension at least two, there is a Hamiltonian deformation
$\gamma_t:UM^\perp\to\mathcal{Q}$ of its geodesic Gauss map for which $\pi\circ\mu_t:UM^\perp\to S^n$ is an immersion except
at $t=0$. Of course, the
lifts $\mu_t:UM^\perp\to US^n$ always exist because the bundles $\gamma_t^{-1}\mathcal{S}$ admit horizontal sections for
Hamiltonian deformations.
\end{rem}


\section{Introduction}
Thermoelectrics (TE) are materials used in thermal-electrical energy conversion. An important physical quantity that controls the performance of a TE is the dimensionless figure of merit $ZT=\sigma S^2 T/\kappa$, where $\sigma$ is the electrical conductivity, $S$ is the Seebeck coefficient (thermopower) and $\kappa=\kappa_{el}+\kappa_{latt}$ is the thermal conductivity which is the sum of thermal conductivity of electrons ($\kappa_{el}$) and phonons ($\kappa_{latt}$). The efficiency of a TE system increases nonlinearly with ZT and approaches the Carnot efficiency as $ZT\rightarrow\infty$. An important goal of thermoelectric study is to achieve as large value of $ZT$ as possible. This can be achieved by increasing  $\sigma S^2$ (called the power factor) through the engineering of electronic structure\cite{pei_band_engin.2012} and/or manipulating the energy dependence of electron scattering rate, and arresting phonon transport (reducing $\kappa_{latt}$ that usually dominates $\kappa_{el}$ in high performance TEs which are doped semiconductors) by introducing defects of different length scales (point defects, nanoparticles, grain boundaries {etc}\onedot\xspace) and taking advantage of intrinsic lattice anharmonicity\cite{Snyder2008.complex.thermo}.

Since good thermoelectrics are narrow band gap semi\-con\-ductors\cite{sofo_mahan94} their electronic transport properties have to be optimized by carefully controlling the types of defects and their concentrations. This optimization is necessary because the two electronic transport quantities controlling the power factor are contra-indicatory \ie increasing $\sigma$ reduces $S$ or vice versa, the well-known Pizarenko relation\cite{ioffe57}. Thus it is important to investigate what types of defects can be inserted into a host semiconductor, what are their formation energies and how they affect the electronic structure of the host and ultimately charge and energy transport. The ideal case is when the defect acts as a simple dopant without altering the band structure of the host, the so called rigid band approximation. In many cases this approximation fails and one has to be careful in analyzing experimental results.\cite{malsoon12}

In this paper we address the question of defects in a promising thermoelectric compound, Cu$_3$SbSe$_4$ (Se4). Cu$_3$SbSe$_4$ has the Famatinite\cite{datahandbook} crystal structure (sometimes referred as 3-1-4 materials) which belongs to the tetrahedrally coordinated (diamond-like) class of compounds whose common characteristics are the average of four valence electrons per atom and tetrahedral coordination of all the atoms. This class of materials covers a wide range of semiconductors including the well-known group IV elements, III-V (such as GaAs and AlAs), II-VI (\eg ZnS, ZnSe), 1-1-2 (such as CuInS$_2$, CuInSe$_2$, AgGaSe$_2$) and 2-1-3 (such as Cu$_2$Ge$S_3$, Cu$_2$SnSe$_3$, Ag$_2$GeSe$_3$) compounds \cite{datahandbook}.
However, only a limited number of these compounds have attracted attention for thermoelectric applications; Cu$_3$SbSe$_4$ and its isostructural analogs are among them. One of the rationale to investigate this and similar compounds is that they do not contain Pb (poisonous) and Te (volatile and expensive) as in well-known thermoelectrics such as PbTe, (GeTe)
$_{0.85}$(AgSbTe$_2$)$_{0.15}$ (commonly known as TAGS) with large $ZT$ values\cite{Snyder2008.complex.thermo}.

In a recent study Skoug \textit{et al}\onedot\xspace\cite{Skoug.doping.2011} have shown that Se4 as synthesized is a $p$-type TE with rather large $S$ values ($>400\ \mu$V/K at T~300K). In a later work\cite{skoug11.solidsolution} they also showed that by optimizing carrier concentration through partial substitution of Sb by Ge and making solid solution of Se4 and its isostructural analog Cu$_3$SbS$_4$ to reduce the lattice thermal conductivity, they could improve the $ZT$ values. They found that in Cu$_3$Sb$_{0.97}$Ge$_{0.03}$Se$_{2.8}$S$_{1.2}$, $ZT\sim1$ could be achieved at $T\sim700K$, comparable to the well-known optimized PbTe\cite{Snyder2008.complex.thermo}. If one can reduce the thermal conductivity of Se4 further through nanoparticle insertion (as is done in PbTe-SrTe\cite{biswas_high-performance_2012}) one can get larger $ZT$ values. As regards $n$-type Se4, it turns out to be extremely difficult to dope Se4 $n$-type.\cite{skoug_thesis_2011}

Our previous work on Se4\cite{do_cusbse.2012} has shown that, in spite of the simple diamond-like crystal structure, the electronic structure of Cu$_3$SbSe$_4$ near the band gap region is rather subtle. From a simple valence count (Cu$^{1+}$, Se$^{2-}$) one expects Sb to be 5+ in this compound. In contrast, we found that Sb is in nearly 3+ configuration with its 5$s$ states (lone pair) fully occupied. However the 5$s^2$ lone-pair electrons of Sb strongly hybridize with the $p$ states of Se and split one band out of the twelve Se $p$ bands (per formula unit). This split-off hybridized band becomes the lowest conduction band. Our calculations predict that Se4 when doped can be a good $p$-type TE with large $S$, in agreement with experiment.\cite{do_cusbse.2012} We found that $n$-doped Se4 has values of $S$ in acceptable range for TE application provided $n$-type compounds can be synthesized. We also showed that the band gap of Se4 can be tuned by using complete isovalent substitutions\cite{do_bond_band2014}.

 Despite the fact that Se4 has the potential to be a promising TE there are very few experimental studies on these compounds \cite{Skoug.doping.2011,skoug11.solidsolution,li_Bi_Sb.2013,wei_Cu_deficiency.2014,wei_Sn_Sb.2014} and, to the best of our knowledge, no theoretical work on defects in this system is available in the literature. In the present work we address this deficiency by calculating the formation energies of a large number of neutral dopants (isovalent and non-isovalent) using first principles electronic structure calculations. In addition we  investigate the effect of defects on the electronic structure and potential thermoelectric properties.

The arrangement of the paper is as follows: in Sec.~\ref{comput}, we describe the method we have used to calculate the formation energies of defects and then discuss briefly the computational methods used. We present our results and discussion in Sec.~\ref{result}. The summary and the highlights of our work are given in Sec.~\ref{sec.sum}.
\section{\label{comput}Method to calculate formation energy and computational details}
The defect system is modeled by creating a defect in a periodic supercell. Most of the calculations have been done starting from a 64 atom (24 Cu, 12 Sb and 32 Se) supercell of Se4. In some cases, a 128 atom supercell was used to see what happens to the physical properties for lower concentrations of defects. To study the energetics of defects, we follow the work of Zhang and Northrup\cite{zhang_northrup.91} where the formation energy $\Delta{}E_f(X)$ of a defect $X$ of charge $q$ is given by:
\begin{align}
	\Delta E_f (X)&=E_{tot} (X)-E_{tot} (0)+\sum_An_A E_A+n_X E_X+q\epsilon_{VBM}\notag\\
	&+\sum_An_A\mu_A+n\mu_X+q\epsilon_F,\label{eqn.eform}
\end{align}
where $E_{tot} (X)$ and $E_{tot} (0)$ are the total energies of the system with and without the defect $X$ respectively, $E_A$ and $E_X$ are the ground state energies (per atom) of the solid state of the host atom $A$ ($A$= Cu, Sb, or Se) and the impurity $X$ accordingly. $n$ is the number of atoms transferred from the reservoir (pure solid) into the host system; $n>0$ if an atom is transferred from the host material to the reservoir and $n<0$ for the reverse situation. $\epsilon_{VBM}$ is the valence band maximum energy of the host and $\epsilon_F$ is the Fermi energy  referenced to $\epsilon_{VBM}$. $\mu_A$ and $\mu_X$ are the chemical potentials of $A$ and $X$ respectively (as measured from the atomic chemical potential of the elemental solid at $T=0K$) . One can see that the defect formation energy depends not only on the atomic energies (in the solid state) but also on the atomic chemical potentials which are determined by the experimental conditions. For example one can control the chemical potential by growing samples under Cu rich or poor conditions.  Under equilibrium growth conditions, the range of chemical potentials is however bounded by thermodynamic conditions which require\cite{zhang_northrup.91}
\begin{align}
	\mu_A&\le0,\mu_X\le0\\
	3\mu_{Cu}+\mu_{Sb}+4\mu_{Se}&=\Delta{}E_f (Cu_3 SbSe_4)\\
	m\mu_A+l\mu_X&<\Delta{}E_f (A_mX_l )
\end{align}
In this study, only neutral defects ($q$=0) are considered and the atomic chemical potentials are assumed to be 0. Thus, Eq.~\ref{eqn.eform} reduces to:
\begin{equation}
	\Delta{}E_f (X)=E_{tot} (X)-E_{tot} (0)+\sum_An_A E_A+n_X E_X
\end{equation}
For example, the formation energy of a Cu vacancy is given by
\begin{equation}
\Delta{}E_f (vac_{Cu} )=E_{tot} (vac_{Cu} )-E_{tot} (0)+E_{Cu},
\end{equation}
and the formation energy of a Ni substituting a Cu is given by
\begin{equation}
\Delta{}E_f (Ni_{Cu} )=E_{tot} (Ni_{Cu} )-E_{tot} (0)+E_{Cu}-E_{Ni}
\end{equation}
Value of $\Delta{}E_f$ determines how likely it is to create a defect in the host material. Positive formation energy means it costs energy while negative means creating defects releases energy.
\begin{figure*}
\centering
\includegraphics[width=.8\textwidth]{defect_form}
\caption{\label{fig.formen}Formation energy of substitution defects for each component in Cu$_3$SbSe$_4$}
\end{figure*}

Total energy calculations are performed using pseudo-poten\-tial, projector augmented wave (PAW) method\cite{bloch94,kresse99} within the generalized gradient approximation (GGA) with Perdew-Burke-Ernzerhoff (PBE) exchange-correlation potential\cite{pbe} as implemented in Vienna Atomic Simulation Package (VASP) \cite{vasp1,vasp2,vasp3}. Energetics within GGA are known to be reliable, however, it usually underestimates the band gap of semiconductors and insulators (some cases even predicted to be metal in GGA)\cite{martin_book}. In fact, in earlier studies\cite{do_cusbse.2012,do_bond_band2014} we found that GGA gives a negative band gap in Se4 and the observed semiconducting gap  could be obtained either after incorporating non-local exchange partially (through HSE06 model\cite{hse06:1,hse06:2,hse06:3} or by introducing a large effective value of the Coulomb repulsion ($U$) among the Cu $d$ electrons within the GGA+$U$ model\cite{dudarev98}. If one is interested in knowing the formation energies of charged defects ($q\neq0$ in Eq.~\ref{eqn.eform}), then a correct value of the band gap (hence the Fermi energy $\epsilon_F$) is essential. For neutral defects, however, GGA is reasonably good and we have used this approximation to calculate the formation energies. In the total energy calculations, the energy cutoff and convergence criteria are set to 400 eV and 1E-4 eV respectively and the Brillouin zone are sampled using Monkhorst-Pack scheme\cite{monkhorst76}. In all the calculations, the atomic structures were allowed to relax.

In addition to the calculations of the formation energies we have also looked at the changes in the host electronic structure brought about by the defects using the supercell model\cite{defects}. In this case however one has to have the correct band gap. Since computing electronic structure for the defective systems (supercells with 64 or 128 atoms) using nonlocal approximations (HSE06) is extremely time-consuming and computationally expensive, we have used the GGA+$U$ model (local) to calculate the band structure and the band gap. Since the $d$ bands  of Cu are full and affect the band structure near the band gap (associated with p states of Se and s states of Sb) indirectly through hybridization one can tune this hybridization by controlling the position of Cu d bands though U.  In our previous study of the pure compound we had to use a rather large effective value of $U$ ($\sim$15 eV instead of the usual 3-4 eV) to get the correct band gap\cite{do_cusbse.2012,do_bond_band2014}. This value of $U$ is certainly unphysical and should be used carefully in defect calculations. This procedure of using a large parametric value of $U$ to get the correct band gap is somewhat equivalent to the phenomenological approaches suggested earlier by Christensen in the context of LMTO calculations \cite{chistensen_correction.1984} and Segev \textit{et al}\onedot\xspace in the context of pseudo potential calculations\cite{segev_self_corrections.2007} to obtain correct band gaps and band structures of binary semiconductors GaAs, GaN, and InN. In these calculations by introducing additional parameters in the potential (pseudo potential) one adjusts the band gap without affecting the structural parameters by more than a few percent. In a similar vain, in our GGA+ effective U calculation which gave the correct band gap, the structural parameters differed by less than 1\% from the GGA values.

\section{\label{result}Results and discussions}
\subsection{\label{result.formationen}Formation energy of defects}
\begin{figure*}
\centering
\includegraphics[width=.7\textwidth]{sc_band}
\caption{\label{fig.scband}Band structures of Cu$_3$SbSe$_4$ in (a) body center tetragonal primitive unit cell (8 atoms/cell), (b) $1\times1\times1$ simple tetragonal cell (16 atoms/cell) and (c) $2\times2\times1$ simple tetragonal cell (64 atoms/cell)}
\end{figure*}

The results of formation energies are given in Fig.~\ref{fig.formen} for vacancies and different types of substitutional defects. Let us discuss the vacancies first. As we see, the formation energies of vacancies are all positive increasing from Cu (0.65~eV) to Se (0.94~eV) to Sb (2.13 eV); it costs energy to form vacancies at all the atomic sites. Clearly Sb is the most strongly bonded whereas Cu is the least strongly bonded. One can use a simple local (nearest neighbor) bond energy picture to understand this ordering. Since Sb and Cu are bonded to four Se atoms each, using the formation energies of these two atoms we can estimate Sb-Se bond energy as 0.53 eV and Cu-Se bond energy as 0.16 eV. Since Se is bonded to three Cu and one Sb we can estimate its formation energy as $3\times0.16+0.53 = 1.01$ eV. The actual GGA value is 0.94 eV, suggesting that a local bond energy picture caputures the basic physics. Also stronger Sb-Se bond can be understood in terms of additional bonding between Sb 5$s$ (lone pair) and a properly symmetrized linear combination of $p$-orbitals of the four nearest-neighbor Se atoms. In fact, the corresponding anti-bonding combination leads to one out of twelve Se $p$-bands to split off from the rest eleven bands resulting in the opening of a band gap in Se4\cite{do_cusbse.2012}. These results are consistent with experimental observations where Se and Cu vacancies are likely to form in synthesizing process and were attributed to the observed $p$-type behavior of as synthesized Cu$_3$SbSe$_4$ in ref.\cite{Skoug.doping.2011} and ref. \cite{wei_Cu_deficiency.2014} respectively. However, as we will show later when discussing the electronic structure that only Cu vacancy acts as an acceptor whereas Se vacancy does not appear to contribute charge carriers.

As regards substitutional defects, for each site, we study selective isovalent elements, nominally $n$- and $p$-doping $s$-$p$ elements (to the right and the left of Cu, Sb, Se in the periodic table) and also several transition metal atoms (Ti, V, Cr, Mn {etc}\onedot\xspace). The reason for studying transition metal substitutions is to choose $s^md^n$ instead of $s^mp^n$. By doing that we investigate how different types of atomic orbital affect the materials' electronic structure. As we will show, the changes in the band structure brought about by the defects are fundamentally different between these two types. When we substitute at the Se (anion) site the formation energies are all positive. In contrast, when we substitute at the cation sites we find that formation energies can be both negative (in the range 0,$-2.0$ eV) and positive (in the range 0, 3.5 eV). Substitutions of Na, Mg, and Zn at the Cu site and Ge, Sn, Pb (all $s^2p^2$), Ti ($s^2d^2$), and V ($s^2d^3$) at Sb site give negative formation energies, meaning it is easy to use these atoms as dopants on the respective sites. In experiments, however, only $p$-type doping using group IV substitutions at the Sb site has been reported.\cite{Skoug.doping.2011,wei_Sn_Sb.2014}

\subsection{\label{result.elect_struct}Defect induced electronic structure}

The formation energy analysis discussed above shows how likely a defect can be created in a system. However it cannot confirm whether a defect dopes the system or changes the host band structures. To address this, one has to look at the change in the band structure brought about by the defects. Even though our formation energy calculations shows that there are only a handful number of potential dopants, for completeness, we have considered vacancies and a wide variety of isovalent and non-isovalent defects both at cation (Cu and Sb) and at anion (Se) sites.

Since all the calculations have been done within a supercell model, we must first understand how the band structure of pure Se4 looks like for the supercell. In Fig.~\ref{fig.scband}, we give the band structures of Se4 obtained in 3 different unit cells, body centered tetragonal (bct with 8 atoms/uc), simple $1\times1\times1$ tetragonal (16 atoms/uc) and $2\times2\times1$ tetragonal (64 atoms/uc) -- the last one is what we have used for defect calculations. The band structures look different due to band folding as the first Brillouin zone becomes smaller in larger unit cells. Also the Brillouin Zone changes, if one focuses on the lowest conduction band (LCB) in the bct unit cell, there is only one band, the split-off Se $p$-Sb $s$ band discussed earlier. When one doubles the unit cell ($1\times1\times1$ tetragonal) the LCB consists of two bands and when we use a $2\times2\times1$ tetragonal cell, LCB contains eight bands. On the other hand, the highest valence band (HVB) remains three-fold degenerate. Band structures of systems with defects should be compared with Fig.~\ref{fig.scband}c.

Before discussing different defects individually one can make several general observations. (1) Some of the defects preserve the semiconducting gap whereas others either destroy the gap or give rise to localized trap states in the gap; (2) Some of the non-isovalent defects which preserve the band gap and do not modify the band dispersion near the band edges can be treated in a rigid band approximation where as others can not.

\begin{figure}
\centering
\includegraphics[width=.7\columnwidth]{cu_vac_band}
\caption{\label{fig.cuvac}Band structure of Cu$_{23}$Sb$_8$Se$_{32}$ (one copper vacancy in the $2\times2\times1$ supercell)}
\end{figure}

\begin{figure*}
\centering
\includegraphics[width=.7\textwidth]{cu_band}
\caption{\label{fig.cu.band}Band structures of Cu$_3$SbSe$_4$ with Cu substituted with isovalent atoms: (a) Ag$_{Cu}$ and (b) Na$_{Cu}$, divalent atoms: (c) Mg$_{Cu}$ and (d) Zn$_{Cu}$ and nominal $p$-type dopants: (e) Ni$_{Cu}$ and (b) Pd$_{Cu}$; the values of effective $U$ for Ni and Pd defects were chosen to be same as that for Cu.}
\end{figure*}

\subsubsection{\label{result.cu_defect}Defects at the Cu site}

As we have discussed earlier, at the Cu site, substitution of Na, Mg, and Zn have negative formation energies whereas vacancy, substitutions of Ag, Cd, Ni, and Pd have positive formation energies. The band structures for different defects are given in Fig.~\ref{fig.cuvac} (vacancy), and Fig.~\ref{fig.cu.band} (substitution).

As one sees in Fig.~\ref{fig.cuvac}, one Cu vacancy in the unit cell of volume 1.478E-21 cm$^3$ does not change the band structure much. States near the HVB are hardly affected and there is a small splitting of the LCB. Since there is 1 hole/u.c. the carrier concentration is 6.77E+20 cm$^{-3}$, an order of magnitude larger than seen in experiment (Skoug \textit{et al}\onedot\xspace\cite{Skoug.doping.2011}). For the experimental hole concentration we expect a rigid band picture to be reasonable.  This result suggests that the often observed $p$-type behavior of as prepared Cu$_3$SbSe$_4$ can be ascribed to native Cu vacancies. This has been confirmed in experiment by Wei \textit{et al}\onedot\xspace\cite{wei_Cu_deficiency.2014} in which they control the hole concentration by controlling the Cu deficiency.

As seen in Fig.~\ref{fig.cu.band}a,b despite belonging to different groups, isovalent impurities (Na, Ag) at the Cu site do not change the band structure or dope the system. This is consistent with our previous work\cite{do_bond_band2014} where we showed that the compound Na$_3$SbSe$_4$ has the same physical origin of the band gap as in Se4. Ag substitution has slightly weaker effect than Na substitution as the latter splits the band degeneracy and ordering of the conduction bands as seen in Fig.~\ref{fig.cu.band}b. This suggest that isovalent substitutions on Cu can be used to reduce thermal conductivity (due to phonon scattering and mass fluctuation) without sacrificing the power factor, which indeed has been done for  the related compound Cu$_3$SbS$_4$\cite{suzumura_s4_2014} where 3\% of Ag$_{Cu}$ was used to further decrease lattice thermal conductivity beside doping on Sb site.

The alkali earth atoms (Mg, Zn, Cd) are divalent impurities and because of the negative formation energies of Mg, Zn these two appear to be excellent $n$-dopants. The band structure corresponding to one extra electron/uc is given in Fig.~\ref{fig.cu.band}c,d. As we can see the HVB and the LCB are hardly affected, just the Fermi energy moves into the conduction band. Again, for these two defects a rigid band picture is quite good. However, as far as we know Mg- and Zn-doped Cu$_3$SbSe$_4$ have not been reported experimentally.

The band structures for Ni and Pd defects are shown in Fig.~\ref{fig.cu.band}e,f. Since we are using the GGA+ effective $U$ model to obtain the band structure we have to choose appropriate effective $U$ values for the Ni and Pd impurities.  Since Ni is in the same row as Cu (3$d$) we can use the same $U$ value (15 eV). For Pd which is in the next row (4$d$) the real $U$ should be smaller by $\sim$2eV compared to Cu. However, in Fig.\ref{fig.cu.band}f, we have used $U$=15 eV, same as in Cu, for Pd as well. From Fig.\ref{fig.cu.band}e,f we see that the states near the valence band top are not affected by the defects, only the band gap changes a little. So we can treat Ni and Pd as good hole-dopants where a rigid band picture is good if one can create a proper synthesizing condition to overcome the positive formation energies.
\subsubsection{\label{result.Sb_defect}Defects at the Sb site}

\begin{figure}
\centering
\includegraphics[width=.7\columnwidth]{sb_vac_band}
\caption{\label{fig.sbvac.band}Band structure of Cu$_{24}$Sb$_7$Se$_{32}$ (one Sb vacancy in the $2\times2\times1$ supercell)}
\end{figure}

When we introduce a vacancy at the Sb site, its effect on the band structure is quite dramatic. The number of conduction bands in the u.c. goes from 8 to 7 (Fig.~\ref{fig.sbvac.band}). This is caused by the absence of Sb 5$s^2$ lone pair at the vacancy site. The $p$-state associated with the Se atoms surrounding the vacancy does not have a Sb lone pair to hybridize with and its energy drops to the valence band region. As a result there is an increase in the number of Se $p$-valence bands by one. Also the loss of one Sb which was contributing three electrons to the valence band results in a $p$-type doping. Unfortunately the perturbation introduced by Sb vacancy is so strong that the band gap vanishes and the resulting system is not expected to be a good thermoelectric. Calculations using a larger supercell ($2\times2\times2$ containing 128 atoms) show that even a smaller Sb vacancy concentration still destroys the band gap. On the other hand, because of the large positive formation energy, it may be difficult to synthesize a system with Sb vacancy.

\begin{table*}
\caption{\label{tab.sb_nearest}Nearest neighbor distance of the the substitutional defect on Sb}
\centering
\begin{tabular}{lrrrrrrrrr}
\hline\hline
Defect&Pure&P&As&Bi&Te&Sn&Ti&V&Cr\\
\hline
$d$(X-Se) (\AA)&2.56&2.28&2.41&2.68&2.64&2.58&2.42&2.32&2.26\\
\hline\hline
\end{tabular}
\end{table*}

\begin{figure}
\centering
\includegraphics[width=1\columnwidth]{sb_iso_band}
\caption{\label{fig.sb_iso.band}Band structure of Cu$_3$SbSe$_4$ with isovalent substitutions on Sb site: (a) P$_{Sb}$, (b) As$_{Sb}$, (c) Bi$_{Sb}$, and (d) V$_{Sb}$. The symbols present the orbital characters of the bands.}
\end{figure}

For isovalent impurities (P, As, Bi), the valence bands are not affected much, but the LCB are strongly perturbed. Arsenic changes the conduction band structure the least, removing some degeneracies at the $\Gamma$ point. In contrast, in P one out of the eight lowest conduction bands gets pushed up whereas in Bi one band gets pushed down. In Fig.~\ref{fig.sb_iso.band} we give the band strucutres of iso-valent substitutions on Sb together with the fat-band characters showing that the changes in conduction bands are due to the defect atoms.  This difference can be understood by looking at the energies of the LP states for P, As, Bi ($ns^2$ , $n=3,4,6$ with energies $-19.22$, $-18.92$, $-15.19$ eV) and the differences in the distance between the defect and the neighboring Se atoms for the three defects (Table~\ref{tab.sb_nearest}). The net result is the difference in the strength of the hybridization between the LP and the Se $p$ orbitals. This result is consistent with our earlier calculations in Cu$_3$MSe$_4$, M=P,As,Bi where local (GGA+ effective $U$) and non-local exchange (HSE06) opened up a gap between the topmost valence band and the lowest conduction band in P and As but not in Bi.\cite{do_bond_band2014} The distance between Sb and M and neighboring Se atoms played an essential role in the band structures of Cu$_3$Sb(X)Se$_4$. In the impurity systems local relaxation around the defect controls this distance and also plays an important role in determining the energy spectrum near the Fermi energy. As shown in Table~\ref{tab.sb_nearest}, the distance between defect atoms and the neighboring Se increases when one going from P to Bi, the same trend as shown our previous work\cite{do_bond_band2014}. Our result for Bi is in agreement with experiment on effects of bismuth doping done by Li \textit{et al}\onedot\xspace\cite{li_Bi_Sb.2013} where they found a dramatic decrease of activation gap in resistivity measurement.

In addition to the iso-valent impurities belonging to the same column as Sb we also investigated the change in band structure when Sb (valence configuration $s^2p^3$) is replaced by V(valence configuration $s^2d^3$). In case of V we expect its $s$-state to be empty (no lone pair at the V site) and $d$-states to contribute new states near the gap. The band structure of V substituting Sb is shown in Fig.~\ref{fig.sb_iso.band}d. V does perturb the top of the valence band much more than P, As, and Bi. It introduces two more potential hole pockets by bringing the maxima at R and M points closer in energy to that at the $\Gamma$ point. The highest valence band shifts from $\Gamma$ to the M point. In addition, one of the eight Se $p$ conduction bands drops down in energy and merges in the valence band and V gives two $d$-bands (e$_g$ symmetry, as shown in Fig.~\ref{fig.sb_iso.band}) to the group of lowest conduction bands (there are nine bands now instead of eight). The five valence electrons of V are just enough to fill all the valence band states, thus preserving the semiconducting behavior. We will discuss later how Cr ($s^2d^4$) instead of V modifies this picture and whether it dopes $n$-type?

\begin{figure}
\centering
\includegraphics[width=\columnwidth]{sb_band}
\caption{\label{fig.sb.band}Band structure of point defects at Sb site with nominal $n$-type dopants: (a) Te$_{Sb}$ and (b) Cr$_{Sb}$ and $p$-type dopants: (c) Sn$_{Sb}$ and (d) Ti$_{Sb}$. The symbols present the orbital characters of the bands.}
\end{figure}

In order to see whether one can substitute an $n$-type dopant at the Sb site we tried replacing it by Se and Te. We also looked at Cr since it is to the right of V in the periodic table which as we found acted like an isovalent impurity \ie it did not introduce any charge carrier.  The band structures for Te and Cr substituted compounds are shown in Fig.~\ref{fig.sb.band}a,b. Results for Se are similar to Te and are not given.

We find that instead of acting as an $n$-type, Te acts like a $p$-type dopant. This can be understood by looking at the band structure given in Fig.\ref{fig.sb.band}a where we have also shown the orbital characters of different bands. The three Te $p$-states are shown in green and lie high in energy. However the Se-$p$ states which hybridize with Te LP states ($5s^2$) form the band shown in red and this band splits off from the seven other conduction bands which arise from hybridization of Se-$p$ with the Sb LP states. This can be understood by looking at the difference in the energies of Sb LP ($-16.03$ eV) and Te LP ($-19.12$ eV), the latter hybridizing weakly with Se-$p$ states (energy -10.68 eV). Further more the nearest neighbor (nn) distance between Te and Se is nearly the same as that between Bi and Se in the case of Bi$_{Sb}$ defect (Table~\ref{tab.sb_nearest}), making the physics of the Te substitution similar to that of Bi substitution. The split-off lowest conduction band is indeed half filled but its density of states is such that it acts like a $p$-doped system. This is an example of a defect which is nominally $n$-type but changes the band structure dramatically such that one sees a $p$-type behavior.
The Cr defect behaves as expected. The effects of Cr defect on the band structure are similar to that of V. However, with one extra d electron than V, Cr moves the Fermi level to the bottom of the conduction band making the system $n$-type. With the two flat $e_g$ bands of Cr acting as resonant states, one should expect a large thermopower, similar to thallium impurity in PbTe\cite{Heremans_distorted_dos.2008}.

Finally we will discuss what happens to the band structure when we replace Sb by a $p$-type dopant ($s^2p^2$ configuration) such as Sn (or Ge, Pb) or by Ti ($s^2d^2$ configuration). The band structures of Sn (Ge and Pb have similar band structures) and Ti defects are shown in Fig.~\ref{fig.sb.band}c,d. We find that Sn is a perfect $p$-type dopant, its LP orbitals ($5s^2$) act just like Sb LP orbitals, the eight conduction band states are slightly perturbed (due to lowering of symmetry) and the top most valence bands are hardly affected. The absence of one valence electron (compared to Sb) leads to a perfect hole-doped system. In fact, Skoug \textit{et al}\onedot\xspace\cite{Skoug.doping.2011} and Wei \textit{et al}\onedot\xspace\cite{wei_Sn_Sb.2014}  obtained their best thermoelectric performance for the Sn doped samples. In contrast to Sn, Ti doping changes both the valence band structure (near the top) and the conduction band structure (seven instead of eight bands due to the absence of LP for Ti). The two $s$ electrons of Ti are used in filling the extra Se $p$ valence band that drops down from the group of eight). Thus the hole count for Ti is same as Sn. It is, however, noteworthy that Ti defect introduces hole pockets at R and M points of the Brilloun Zone in addition to the one at $\Gamma$. Thus one should expect larger thermopower in Ti-doped system compared to the Sn-doped system.

\subsubsection{\label{result.Se_defect}Defects at the Se site}
\begin{figure}
\centering
\includegraphics[width=.7\columnwidth]{se_vac_band}
\caption{\label{fig.sevac.band}Band structure of Cu$_{24}$Sb$_8$Se$_{31}$ (one Se vacancy in the $2\times2\times1$ supercell)}
\end{figure}

\begin{figure*}
\centering
\includegraphics[width=.7\textwidth]{se_band}
\caption{\label{fig.se.band}Band structure system with point defects at Se site: (a) S$_{Se}$ and (b) Cr$_{Se}$, (c) I$_{Se}$,(d) Mn$_{Se}$, (e) Sb$_{Se}$ and (f) V$_{Se}$}
\end{figure*}

The band structure for a Se vacancy (Cu$_{24}$Sb$_{8}$Se$_{31}$) is shown in Fig.~\ref{fig.sevac.band}. In order to understand why a Se vacancy also behaves like a semiconductor we have to do a Se $p$ band count. In Cu$_{24}$Sb$_{8}$Se$_{32}$, there are 96 Se $p$ orbitals which split off into 8 lowest conduction bands and 88 $p$-valence bands. The 88 $p$-valence bands are filled up with 176 electrons (128 from Se, 24 from Cu and 24 from Sb). When we remove one Se atom, we take away 3 $p$ states. This removes 1 band from the 8 conduction bands and 2 bands from the $p$-valence bands, leaving 86 $p$-valence bands, which need 172 electrons to fill completely. Removal of one Se also removes 4 valence $p$ electrons giving exactly 172 valence electrons. One may ask what happen when we have more than one Se vacancies? Should the physics still be the same? Our calculations for two Se-vacancies interestingly reveal that they prefer different (SbSe$_4$) tetrahedrals, which means that our explanation above is still valid, at least for non-saturated concentration of Se-vacancies. In case of high concentration of Se-vacancies when there is chance of having two vacancies on the same (SbSe$_4$) tetrahedral, it will dope the system $n$-type rather than $p$-type. The explanation is similar to the case of one Se-vacancy, when removing the second Se, we remove three $p$ bands, but now all from valence bands, corresponding to six electrons, however, each Se have only four $p$ electrons that means there are two leftover electrons which will occupy the lowest of conduction bands and make the system $n$-type. Thus Se vacancy does not appear to be the source of $p$-type behavior of nominally pure Se4 as speculated by Skoug \textit{et al}\onedot\xspace\cite{Skoug.doping.2011}. We think the observed $p$-type behavior is most likely due to Cu vacancy as we have discussed earlier.

Replacing Se by S does not do much to the band structure because they belong to the same column whereas replacing Se ($s^2p^4$) by Cr ($s^2d^4$) completely alters the band structure (Fig.~\ref{fig.se.band}a,b). The semiconductor band structure is completely gone. One can take advantage of the electronic structure results for S by making solid solutions like Cu$_3$Sb$_{1-y}$Sn$_y$Se$_{1-x}$S$_x$ to reduce lattice thermal conductivity without affecting the optimized electronic transport properties. (see Skoug \textit{et al}\onedot\xspace\cite{skoug11.solidsolution})

To $n$-dope Cu$_3$SbSe$_4$ by substituting at the Se site we tried I ($s^2p^5$) and Mn ($s^2d^5$). Mn, like other transition metal atoms containing $d$ states changes the band structure dramatically and the system does not behave like a doped semiconductor (Fig.~\ref{fig.se.band}c). On the other hand, I appears to be good $n$-type dopant (Fig.~\ref{fig.se.band}c). However, as we discussed previously, due to the large positive formation energies, it is very difficult to dope Se4 on the Se site.

To test whether Cu$_3$SbSe$_4$ can be doped $p$-type by Se site substitution we tried Sb ($s^2p^3$) and V($s^2d^3$) substitution at the Se site (Fig.~\ref{fig.se.band}e,f). V, containing $d$ orbitals, destroys the semiconducting character and is not good. Sb$_{Se}$ also does not appear to be a good dopant.

\begin{figure}
\centering
\includegraphics[width=\columnwidth]{Cr_Se_local_bonds}
\caption{\label{fig.cr_se_local_bond} Local bonds around Cr$_{Se}$ defect are distorted dramatically}
\end{figure}

It is noteworthy that while transition metals seem to do a good job in doping on the Sb site they perform poorly on the Se site. When substituting Se, transition metals change the electronic structure dramatically by introducing states in a wide range of energy, filling up the gap (Fig.~\ref{fig.se.band}). It turns out, the transition metals dramatically distort the local bondings, for example,  Fig.~\ref{fig.cr_se_local_bond} shows how Cr$_{Se}$ alters the local crystal structure. While a normal Se in Cu$_3$SbSe$_4$ coordinates to three Cu and one Sb, Cr$_{Se}$ moves away from the nn Sb and pulls closer to Se, totally opposite to the case of $Cr_{Sb}$ where the tetrahedral coordination is preserved. The difference between Sb and Se defect is the symmetry; Sb is at the center of a perfect tetrahedron of Se, on the other hand, Se is in a distorted tetrahedron of three Cu and on Sb. Such a change in local coordinations of transition metal defects on Se site also explains why their formation energies are large (Fig.~\ref{fig.formen}).

\section{\label{sec.sum}Summary and Conclusion}
Our work provides a systematic guide to search for good dopants in Cu$_3$SbSe$_4$. A combination of analyses of formation energy and band structure suggests that doping on Se site is not favorable (large positive formation energy), whereas it is easy to make $p$-type materials by substituting Sb with group $IV$ elements such as Sn, Ge, Pb and Ti, of which Ti defect may give better thermoelectric properties due to multiple hole pockets. There are just a few possible $n$-type dopants which include Mg and Zn substitution on the Cu site. The results also show that a possible cause for the observed $p$-type behavior of nominally pure Cu$_3$SbSe$_4$ is the presence of Cu vacancy rather than Se vacancy.
\section*{Acknowledgements}
This work was supported by the Center for Revolutionary Materials for Solid State Energy Conversion, an Energy Frontier Research Center funded by the U.S. Department of Energy, Office of Science, Office of Basic Energy Sciences under Award Number DE-SC0001054.

The calculations were done using computational resource provided by National Energy Research Scientific Computing Center(NERSC) and Michigan State University (MSU), Institution for Cyber Enabled Research (ICER), and High Performance Computer Center (HPCC).

\bibliographystyle{elsarticle-num}