Is it possible to generalize the Maxwell equations to higher dimensions? The usual Maxwell equations are for 3 spatial dimensions, right?
Is it possible to generalize them to 2 spatial dimensions or 4 spatial dimensions?
 A: You can generalize Maxwell's equations to an arbitrary number of dimensions by using either the tensor or differential form version, as the vector formalism does not help too much (For instance, in two dimensions, the magnetic field is a (pseudo) scalar field, not a vector field). The equations are then : 
$\partial_\alpha F^{\alpha\beta} = \mu_0 J^\beta$
or 
$d\star F = \mu_0 J$
A: Maxwell's equation can be given in the form
$$\text dF = 0$$
$$\text d\star F + J = 0$$
where $F$ is a 2-form and $J$ an $n-1$-form (a current density) which in principle can be generalised to any manifold (for physical reasons one might want to consider pseudo-Riemannian manifolds with signature $(+,-,\cdots,-)$). In the four dimensional theory one usually sets $G:=\star F$, which is also a 2-form and has a clear physical interpretation in terms of electric and magnetic field. In higher or lower dimensions it becomes an $(n-2)$-form and as far as I know there is no clear interpretation of the many "components" of $G$ in these other cases.
Regarding the solutions, if any, the behaviour they exhibit should depend strongly on the number of dimensions (as the classical example of the Laplace's equation in different dimensions shows).
