Maxwell's equations invariant under all linear transformations? Maxwell's equations in tensor notation read:
\begin{align}
\partial_\mu F^{\mu\nu} &= J^\nu \\
\partial_{[\lambda}F_{\mu\nu]} &= 0
\end{align}
Consider doing a general coordinate transformation $x^\mu \rightarrow x^{\mu'}$ on the first equation. (NB: everything that follows applies also to the second equation.) Writing the equation in primed coordinates and then expanding in terms of unprimed coordinates, we find that the equation transforms to:
\begin{equation}
\frac{\partial x^\lambda}{\partial x^{\mu '}} \frac{\partial^2 x^{\mu '}}{\partial x^\lambda \partial x^\mu} \frac{\partial x^{\nu '}}{\partial x^\nu} F^{\mu\nu} + \frac{\partial x^\lambda}{\partial x^{\mu '}} \frac{\partial x^{\mu '}}{\partial x^\mu} \frac{\partial^2 x^{\nu '}}{\partial x^\lambda \partial x^\nu} F^{\mu\nu} + \frac{\partial x^\lambda}{\partial x^{\mu '}}\frac{\partial x^{\mu '}}{\partial x^{\mu }}\frac{\partial x^{\nu '}}{\partial x^{\nu }} \frac{\partial}{\partial x^\lambda} F^{\mu\nu} = \frac{\partial x^{\nu '}}{\partial x^{\nu }} J^{\nu }
\end{equation}
A sufficient condition for the equation to be invariant under this transformation is that the first two terms on the left hand side vanish, and a sufficient condition for that to happen is that:
\begin{equation}
 \frac{\partial^2 x^{\mu '}}{\partial x^\lambda \partial x^\mu} = 0
\end{equation}
Integrating this equation, we find that this Maxwell equation will be invariant under a linear coordinate transformation:
\begin{equation}
x^{\mu '} = M{^{\mu'}_{\ \ \mu}} x^\mu + a^{\mu'}
\end{equation}
Here, $M{^{\mu'}_{\ \ \mu}}$ is a constant matrix and $a^{\mu'}$ is a constant vector.
Formally, this is true for all linear transformations, not just Lorentz transformations. Of course, one can appeal to the existence of a Minkowski metric field to restrict $M{^{\mu'}_{\ \ \mu}}$ to be a Lorentz matrix. However, this does not change the fact that this equation seems to be formally invariant under all linear transformations. And I didn't think it was meant to be true that Maxwell's equations were invariant under all linear transformations!
So: can someone sort me out here? Are the two equations above actually invariant under all linear transformations, or have I made an error here?
 A: There is an additional condition coming from the third term on the left hand side of your transformed equation, where you have used what seemed to be the chain rule
$$
\frac{\partial x^\lambda}{\partial x^{\mu'}}\frac{\partial x^{\mu'}}{\partial x^\mu}=\delta^\lambda_\mu
$$
In reality however, the nontrivial positioning of the covariant and contra variant vector components makes this equation contain more than just the chain rule, and in face is what restricts $M^\mu_\nu$ to be a lorentz transformation.
Without lowering and raising, this gives us the known fact that the jacobian matrix is orthogonal. Taking the index positioning into account this gives us the condition
$$
M^T \eta M = \mathbb{1}
$$
Otherwise all scalar products in general relativity will be invariant under a general linear coordinate transformation rather than a lorentz transformation, when you require the transformation to be global.
A: *

*Let us first replace the Minkowski metric tensor
$$\eta~=~\eta_{\mu\nu}~\mathrm{d}x^{\mu}\odot \mathrm{d}x^{\nu}$$ 
with a more general constant metric tensor
$$g~=~g_{\mu\nu}~\mathrm{d}x^{\mu}\odot \mathrm{d}x^{\nu}.$$

*Note that the raised EM tensor $$F^{\mu\nu}~:=~g^{\mu\lambda} F_{\lambda\kappa}g^{\kappa\nu}$$ depends on the (inverse) metric. The Maxwell equations are covariant under rigid $GL(4)$ transformations if we remember to transform the (inverse) metric $g^{\mu\nu}$ accordingly.

*On the other hand, if the metric components $g_{\mu\nu}$ are always supposed to be equal to the Minkowski metric $\eta_{\mu\nu}={\rm diag}(\pm 1,\mp 1,\mp 1,\mp 1)$, then the rigid transformations $$\Lambda^{\mu}{}_{\nu}=\frac{\partial x^{\prime \mu}}{\partial x^{\nu}}$$ must be Lorentz matrices.

*Finally, let us mention that it is possible to write Maxwell equations in a general curved spacetime, so that they are general covariant.
