What is form invariance of physical laws and how does it relate to tensors?

Studying general relativity, I often hear the statement that

In physics, the principle of relativity is the requirement that the equations describing the laws of physics have the same form in all admissible frames of reference.

Could anyone clarify what it means for an equation to "have the same form", ideally with examples? What is considered an "admissible" frame frame of reference? For instance, does the appearance of fictitious forces when transforming to a non-inertial frame of reference in Newtonian mechanics constitute a change of form?

Moreover, why does this principle necessitate the formulation of laws using tensors and 4-vectors in SR and GR? What is it about these mathematical objects that makes them useful in SR and GR; why are they not necessary in other physical theories (where the relativity principle presumably still holds?)

(Please note that the answer here is related, but in my opinion, my question is more general.)

Let's take Maxwell's equations as an example. I will focus on special relativity, because it's better to understand how this works in special relativity before moving to GR.

Let's suppose we start in the Alice's frame of reference. We can write Maxwell's equation in 3-vector notation (I'm going to use Gaussian units with $$k=c=1$$) $$\begin{eqnarray} \nabla \cdot \vec{E} &=& 4\pi \rho \\ \nabla \cdot \vec{B} &=& 0 \\ \nabla \times \vec{E} &=& -\frac{\partial \vec{B}}{\partial t} \\ \nabla \times \vec{B} &=& 4\pi \vec{J} + \frac{\partial \vec{E}}{\partial t} \end{eqnarray}$$ We can also write Maxwell's equations in Alice's frame of reference in 4-vector notation $$\begin{eqnarray} \partial_\mu F^{\mu\nu} &=& J^\nu \\ \partial_{[\lambda} F_{\mu\nu]} &=& 0 \end{eqnarray}$$ First, at a somewhat superficial level, note the equations in the relativistic form are more compact, with is nice.

Now suppose Bob is moving at velocity $$\vec{v}=v \hat{e}_z$$ relative to Alice (ie Bob's speed is $$|v|$$ and his velocity is purely in the $$z$$ direction). Let's do a Lorentz transformation to Bob's frame, corresponding to a boost in the $$z$$ direction. We can write the Lorentz transformation matrix $$\Lambda^{\mu}_{\ \ \nu}$$ as $$$$\Lambda = \begin{pmatrix} \gamma & 0 & 0 & -\gamma v \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ -\gamma v & 0 & 0 & \gamma \end{pmatrix}$$$$ where $$\gamma \equiv (1-v^2)^{-1/2}$$.

We would like to know what the electromagnetic field and sources looks like in Bob's frame.

First let's look at the 3-vector quantities. We will denote quantities in Bob's frame by primes, so $$\vec{E}'$$ is the electric field 3-vector $$\vec{B}'$$ is the magnetic field 3-vector in Bob's frame. The transformation from $$\vec{E},\vec{B}$$ to $$\vec{E}',\vec{B}'$$ is quite complicated. The $$z$$ components do not change, $$E_z'=E_z$$, $$B_z'=B_z$$. Meanwhile the $$x$$ and $$y$$ components satisfy $$\begin{eqnarray} E_a' &=& \gamma(\vec{E} + \vec{v} \times \vec{B}) \cdot\hat{e}_a \\ B_a' &=& \gamma(\vec{B} - \vec{v} \times \vec{E}) \cdot\hat{e}_a \end{eqnarray}$$ where $$a=\{x,y\}$$, and $$\hat{e}_a$$ is a unit vector (in Alice's frame) in the $$a$$ direction. Meanwhile, the charge and currents also transform $$\begin{eqnarray} \rho' &=& \gamma(\rho - \vec{J} \cdot \vec{v}) \\ \vec{J}' &=& \vec{J} - \gamma \rho \vec{v} - \frac{\gamma-1}{v^2} (\vec{J} \cdot \vec{v})\vec{v} \end{eqnarray}$$ The coordinates also transform. While $$x'=x$$ and $$y'=y$$, we have that $$\begin{eqnarray} t' &=& \gamma(t-\gamma v z) \\ z' &=& \gamma(z-\gamma v t) \end{eqnarray}$$

On the other hand, the transformation laws for the 4-vector quantities $$F^{\mu\nu}$$, $$J^\mu$$, and $$x^\mu$$ can be written in a much more compact form $$\begin{eqnarray} F^{\mu'\nu'} &=& \Lambda^{\mu'}_{\ \ \mu} \Lambda^{\nu'}_{\ \ \nu} F^{\mu\nu} \\ J^{\mu'} &=& \Lambda^{\mu'}_{\ \ \mu} J^{\mu} \\ x^{\mu'} &=& \Lambda^{\mu'}_{\ \ \mu} x^{\mu} \end{eqnarray}$$

Now we are in a position to see how Maxwell's laws look in Bob's frame. If you plug the transformation laws into the equations, you will find in 3-vector form that $$\begin{eqnarray} \nabla' \cdot \vec{E}' &=& 4\pi \rho' \\ \nabla' \cdot \vec{B}' &=& 0 \\ \nabla' \times \vec{E}' &=& -\frac{\partial \vec{B}'}{\partial t'} \\ \nabla' \times \vec{B}' &=& 4\pi \vec{J'} + \frac{\partial \vec{E}'}{\partial t'} \end{eqnarray}$$ It takes a very long and complicated calculation calculation to actually show this, because you need to track 2 scalar and 2 vector equations, and the transformation laws are so complicated. However, some clever people noticed that Maxwell's equations had this symmetry, which is how Lorentz transformations were discovered originally.

If you work with 4-vectors, you will find that $$\begin{eqnarray} \partial_{\mu'} F^{\mu' \nu'} &=& J^{\nu'} \\ \partial_{[\lambda'} F_{\mu' \nu']} &=& 0 \end{eqnarray}$$ This calculation is essentially trivial. Since the equation relates 4-vectors and 4-tensors, it manifestly will hold in any 2 frames related by a Lorentz transformation.

If we now imagine Christine, who is accelerating relative to Alice, and we worked out the transformation laws to Christine's frame and we computed what Maxwell's equations looked like after applying these transformation laws, in the end we would find that Maxwell's equations did not have the same form. We would find additional terms in Maxwell's equations, proportional to the acceleration.

It's not too enlightening to explicitly write out the equations in this form. But as an example to show what goes wrong: computing the transformation of Maxwell's equations involves dealing with terms like this $$$$\frac{\partial}{\partial t}[T(t) B]$$$$ where $$T(t)$$ is a transformation acting on $$B$$. For a Lorentz transformation, $$T(t)=\Lambda$$, which is time-independent, and so can be pulled outside of the time derivative. However, for an accelerating frame of reference, $$T(t)$$ will be time-dependent. Roughly speaking, $$T$$ will be like $$\Lambda$$ with a time dependent velocity. So the transformation of this term will pick up a time derivative of the transformation $$T$$, which will then appear as an extra term in Maxwell's equations. This extra term will involve time derivatives of the velocity, aka the acceleration.

So what are the lessons learned?

• "Invariance under Lorentz transformations" means that after applying the transformation from the Alice (unprimed) to Bob (primed) frame, the equations using primed variables are exactly the same as the equations with the unprimed variables.
• The equations fail to be the same in Christine's frame, which is accelerating relative to Alice's.
• We are not forced to use 4-vectors. The physics is that Maxwell's equations are invariant under Lorentz transformation. This physics can be expressed using 3-vectors, or 4-vectors, or any other set of variables.
• However, using 4-vectors and 4-tensors are very useful for making Lorentz invariance manifest -- they make both the transformation rules, and the fact that Maxwell's equations are invariant under Lorentz transformations -- essentially trivial. On the other hand, in 3-vector notation, the transformations are very complicated and the invariance is highly non obvious and difficult to check.
• Having said that, when doing a calculation related to a particular system, it might be that it is not so important to make the Lorentz invariance manifest. For example, to compute the electric field around a point charge, it might be that all you need is the electric field in the frame of the point charge. Then it may make sense to use 3-vector notation, since the electric and magnetic fields as 3-vectors are closer to what can actually be measured in a lab.
• tl;dr: What formalism you use depends on what problem you want to solve. You should choose the formalism that makes your problem the easiest to solve, or which gives the most insight into the underlying physics. But this arbitrary choice cannot affect the physics, and all formalisms must give the same results for observable quantities.