I'm curious to learn how people discovered that electric and magnetic fields could be nicely put into one simple tensor.
It's clear that the tensor provides many beautiful simplifications to the original theory, by applying the abstract theory of tensors to this particular problem. For example, the strange formulas for the transformation of electric and magnetic fields in different reference frames can be explained as the transformation laws of a 2-tensor. The interdependence of the two fields in this transformation, and the fact that electric and magnetic fields are in some ways the same thing in the classical theory, can be explained by this two tensor. The various ad-hoc formulas that make up Maxwell's equations, some of them with curls, some with divergence, can be explained in one beautiful formula by declaring the exterior derivative of the tensor to be 0. The cross product can also be explained as an operation on anti-symmetric tensors.
So, it's clear once someone shows you the tensor formulation that it beautifully weaves together all the parts of the "elementary" (i.e. non-tensorial) theory. My question is, how did people discover this formulation in the first place? What was the motivation, and what is the history?
Some thoughts: It's true that the elementary theory provides some hints to the tensor formulation (such as some of the things I list above), but these small hints are not quite enough to motivate all the intricacies of the tensor formula, especially if one has not seen tensors before. Was the theory of tensors already floating around in the time that the field tensor was discovered, and hence did tensor experts simply notice that electromagnetism smelled like a 2-tensor? If this is the case, how did people initially realize that tensors were important in physics? Otherwise, what did happen? Why were people motivated to do it? And, wasn't the original formulation good enough, albeit not quite as mathematically elegant?
Another related question, did people know the transformation laws for electric and magnetic fields before Einstein came along? Today, you can usually only find those in books on special relativity, or in the very last chapter of a book on electromagnetism, usually a chapter on special relativity. Therefore, if you were reading a book on electromagnetism, then before you got to the chapter on relativity, you would have thought that force vectors and hence electric fields are invariant under change of reference frame, just like forces in Newtonian mechanics.