*This question was originally asked [on Math StackExchange](https://math.stackexchange.com/questions/3064470/projective-invariant-differential-operator).*


Suppose we want a differential operator $T$ acting on functions $\mathbb{R}^n \rightarrow \mathbb{R}^n$ such that


\begin{align\*}
&T(g) = 0 \Longleftrightarrow g \in G \\
&g \in G \Longrightarrow T(g \circ f) = T(f)
\end{align\*}


where $G = \text{Aff}(n, \mathbb{R})$ is the [affine group](https://en.wikipedia.org/wiki/Affine_group). Consider the operator


$$T(f) = (\nabla f)^{-1} \cdot \nabla \nabla f$$


where $\nabla f$ is the gradient of $f$ and $\nabla \nabla f$ is its [Hessian](https://en.wikipedia.org/wiki/Hessian_matrix#Generalizations_to_Riemannian_manifolds). This seems to satisfy the criteria since


$$\nabla \nabla f = 0 \Longleftrightarrow f(x) = A \cdot x + b$$


and


\begin{align\*}
T(A \cdot f + b)
&= (\nabla (A \cdot f + b))^{-1} \cdot \nabla \nabla (A \cdot f + b) \\
&= (\nabla A \cdot f)^{-1} \cdot \nabla \nabla A \cdot f \\
&= (A \cdot \nabla f)^{-1} \cdot \nabla A \cdot \nabla f \\
&= (\nabla f)^{-1} \cdot A^{-1} \cdot A \cdot \nabla \nabla f \\
&= (\nabla f)^{-1} \cdot \nabla \nabla f \\
&= T(f)
\end{align\*}


My question is this: Is there a similar operator that is invariant under the [projective group](https://en.wikipedia.org/wiki/Projective_group) $G = \text{PGL}(n, \mathbb{R})$? For $G = \text{PGL}(1,\mathbb{R})$, an example is the [Schwarzian derivative](https://en.wikipedia.org/wiki/Schwarzian_derivative)


$$S(f) = \frac{f'''}{f'} - \frac{3}{2} \left(\frac{f''}{f'}\right)^2$$


[*Projective differential geometry old and new*](http://www.math.psu.edu/tabachni/Books/BookPro.pdf) by Ovsienko and Tabachnikov states in chapter 1.3 page 10 that $S(g) = 0$ iff $g$ is a projective transformation and $S(g \circ f) = S(f)$ if $g$ is a projective transformation. They also give a multidimensional generalization of the Schwarzian derivative in equation 7.1.6 page 191:


$$L(f)\_{ij}^k = \sum\_\ell \frac{\partial^2 f^\ell}{\partial x^i \partial x^j} \frac{\partial x^k}{\partial f^\ell} - \frac{1}{n+1} \left(\delta\_j^k \frac{\partial}{\partial x^i} + \delta\_i^k \frac{\partial}{\partial x^j}\right) \log J\_f$$


where $J\_f = \det \frac{\partial f^i}{\partial x^j}$ is the Jacobian. However, [*Schwarps*](https://link.springer.com/article/10.1007/s11263-016-0882-9) by Pizarro et al. states in section 3.3 page 97 that this "cannot be used to ensure infinitesimally homographic warps as it also vanishes for other functions than homographies" (what are some examples?). Instead, they give a system of 2D Schwarzian equations that "vanish if and only if the warp is a homography" (page 94). These are given in section 4.2 equation 29 page 98:


\begin{align\*}
S\_1[\eta] &= \eta^x\_{uu} \eta^y\_u - \eta^y\_{uu} \eta^x\_u \\
S\_2[\eta] &= \eta^x\_{vv} \eta^y\_v - \eta^y\_{vv} \eta^x\_v \\
S\_3[\eta] &= (\eta^x\_{uu} \eta^y\_v - \eta^y\_{uu} \eta^x\_v) + 2(\eta^x\_{uv} \eta^y\_u - \eta^y\_{uv} \eta^x\_u) \\
S\_4[\eta] &= (\eta^x\_{vv} \eta^y\_u - \eta^y\_{vv} \eta^x\_u) + 2(\eta^x\_{uv} \eta^y\_v - \eta^y\_{uv} \eta^x\_v)
\end{align\*}


What is the geometric intuition behind these equations? Can they be stated more compactly/concisely? How can we normalize them so that $S\_i[\eta]$ is actually invariant (when nonzero) under projective transformations of $\eta$? Finally, is there a compact/closed-form expression for the $n$-dimensional generalization of this derivative?



Projective-invariant differential operator
There's a straightforward abstract answer that you may not like, but, because it clarifies your question and explains a uniform way to answer similar questions, I'll sketch it here.


First, consider a simpler problem of this kind: Suppose that one wants to describe the group of isometries of a Riemannian metric $\rho$ on a Riemannian $n$-manifold $M$. By definition, a mapping $f:M\to M$ is an isometry if and only if $f^\*(\rho)-\rho =0$. Thus, one defines the operator $T(f) = f^\*(\rho)-\rho$, which takes smooth maps $f:M\to M$ to sections of $S^2(T^\*M)$ and notes that $T(f)=0$ if and only if $f$ is an isometry. Moreover, if $g:M\to M$ is an isometry and $f:M\to M$ is any mapping, then
$$
T(g\circ f) = (g\circ f)^\*(\rho)-\rho = f^\*\bigl(g^\*(\rho)\bigr)-\rho = f^\*(\rho)-\rho = T(f).
$$
Thus, the differential operator $T$ satisfies the conditions that you want for detecting the group of isometries of $\rho$.


Now, consider the slightly more subtle case of affine transformations: Let $(M,\alpha)$ be a manifold endowed with a (torsion-free) affine connection $\alpha$. Now, torsion-free affine connections, unlike Riemannian metrics, are not given by specifying a section of a natural *vector* bundle over $M$. Instead, there is a natural *affine* bundle over $M$, call it $\mathsf{A}(M)$, that is modeled on the natural vector bundle $TM\otimes S^2(T^\*M)$ and whose sections define the torsion-free affine connections on $M$. (The bundle $\mathsf{A}(M)$ is natural in the sense that, if $f:M\_1\to M\_2$ is any diffeomorphism, there is canonically induced a bundle isomorphism $\mathsf{A}(f):\mathsf{A}(M\_2)\to \mathsf{A}(M\_1)$ such that, if $\alpha$ is a section of $\mathsf{A}(M\_2)$ (and hence a torsion-free affine structure on $M\_2$), then $\mathsf{A}(f)\circ\alpha$ is a section of $\mathsf{A}(M\_1)$ that represents the connection $\alpha$ pulled back via the diffeomorphism $f$. We also have $\mathsf{A}(g\circ f) = \mathsf{A}(f)\circ \mathsf{A}(g)$, as the canonical map is contravariant. Now, the answer to the problem of characterizing the symmetries of an affine structure $\alpha$ on $M$ has a reasonable answer: Simply set
$$
T(f) = \mathsf{A}(f)\circ\alpha - \alpha,
$$
and this will have all the properties that you want. Note that, because $\mathsf{A}(M)$ is modeled on the vector bundle $TM\otimes S^2(T^\*M)$, the nonlinear differential operator $T$ takes values in the *vector* bundle $TM\otimes S^2(T^\*M)$. When one unravels this for $M=\mathbb{R}^n$ and $\alpha = \alpha\_0$, the standard flat affine structure on $\mathbb{R}^n$, by writing everything in coordinates, one obtains the expression you wrote down above in local coordinates.


Finally, let's come to the case of a manifold of dimension $n>1$ (the case $n=1$ is different) with a (torsion-free) *projective* structure $(M,\pi)$, where, now, $\pi$ is a section of a certain natural affine bundle $\mathsf{P}(M)$ that is modeled on the the vector bundle $\mathsf{Q}(M)$ that fits into the natural exact sequence
$$
0\longrightarrow T^\*M\longrightarrow TM\otimes S^2(T^\*M)\longrightarrow \mathsf{Q}(M)\longrightarrow 0.
$$ 
(Note that $\mathsf{Q}(M)$ is a vector bundle of rank $\tfrac12n(n{-}1)(n{+}2)$. The fact that this rank is $0$ when $n=1$ is why the case $n=1$ is different. Indeed, in dimension $1$ every $2$-jet of a diffeomorphism is the $2$-jet of a projective transformation, so one has to go to $3$-jets to get an equation.) Again, if $f:M\to M$ is any diffeomorphism, there is a canonically induced bundle mapping $\mathsf{P}(f):\mathsf{P}(M)\to\mathsf{P}(M)$, and these bundle maps satisfy $\mathsf{P}(g\circ f) = \mathsf{P}(f)\circ \mathsf{P}(g)$.


Now, again, the solution to the problem of characterizing the diffeomorphisms $f:M\to M$ that preserve a given (torsion-free) projective structure $\pi$ is to define
$$
T(f) = \mathsf{P}(f)\circ\pi - \pi,
$$
and this operator $T$, taking a diffeomorphism $f:M\to M$ to a section of $\mathsf{Q}(M)$ (since the difference of two sections of $\mathsf{P}(M)$ lies in $\mathsf{Q}(M)$), has all the desired properties. When one writes this out in local coordinates, this gives the (second-order) partial differential equations that characterize projective transformations.


By the way, I imagine that you realize now that, in the $n=2$ case, the equations $S\_i[\eta]=0$ are not *individually* covariant expressions, but, instead are the components of a tensor (of rank 4, of course) that does have the required covariance properties: When $n=2$, $\mathsf{Q}(M)\simeq S^3(T^\*M)\otimes \Lambda^2(TM)$.
If you write $\eta = \bigl(u^1(x^1,x^2),u^2(x^1,x^2)\bigr)$, where, instead of $(x,y)$, I am writing $(x^1,x^2)$ and, instead of $(u,v)$, I am writing $(u^1,u^2)$, then the $S\_i$ are the four components of the tensor
$$
T(\eta) = \frac{\partial u^i}{\partial x^a\partial x^b} \frac{\partial u^j}{\partial x^c}
\ \mathrm{d}x^a{\circ}\mathrm{d} x^b{\circ}\mathrm{d}x^c
\otimes \left(\frac{\partial}{\partial u^i}\wedge \frac{\partial}{\partial u^j} \right).
$$
(sum over all repeated indicies is intended).


Essentially, this approach goes back to Sophus Lie in the 19th century, but it was considerably clarified by the work of Élie Cartan early in the 20th century, in his works on what we would now call Lie pseudo-groups of transformations. Indeed, Cartan described how one constructs all of these 'natural' bundles, $T^\*M$, $TM$, $\mathsf{A}(M)$, $\mathsf{P}(M)$, etc. as what he called 'prolongations' of the diffeomorphism group of $M$. In principle, one can compute all the prolongations of any desired order, but mostly one is interested in those of the first and second order. 


