This is a misconception. A magnetic field is not just an electric field with relativity applied, i.e. an electric field viewed from the wrong reference frame. In reality, a magnetic field is a fundamental field which can exist in a certain reference frame without needing any help from an electric field. More generally, both electric fields and magnetic fields are part of one fundamental, unified entity: the electromagnetic field.
Electric and magnetic fields obey a set of physical laws called Maxwell’s equations. Einstein’s theory of Special Relativity describes how space and time change depending on the choice of inertial reference frame. It turns out that Special Relativity is automatically contained in Maxwell’s equations. In fact, Einstein discovered Special Relativity by closely scrutinizing and understanding Maxwell’s equations. Therefore, using Maxwell’s equations in relativistic form, we can figure out how to mathematically transform electric and magnetic fields from one reference frame to another. In other words, if I measure and map out the electric and magnetic fields in a room while I am standing motionless on the ground, then by applying the relativistic frame transformations to these field expressions I know what the fields will look like to an observer that is coasting through the room on roller skates. These electromagnetic relativistic frame transformation equations have been experimentally found to be correct.
If you start in a reference frame that has only an electric field and no magnetic field, then when you make a relativistic transformation to a new reference frame, you find that there is both an electric field and a magnetic field present, as observed in this new frame. This fact seems to imply that a magnetic field is only an electric field as viewed from the wrong reference frame. In other words, this fact seems to imply that a magnetic field is really just a non-fundamental relativistic version of the electric field. However, a closer scrutiny of the fields shows this conclusion to be incorrect.
First of all, Special Relativity teaches us that all inertial reference frames are equally valid and equally fundamental. If two marbles roll past each other, then from the red marble’s point of view the red marble is motionless and the blue marble is moving. From the blue marble’s point of view the blue marble is motionless and the red marble is moving. Both viewpoints are equally correct and equally fundamental. The fact that the two marbles see the situation differently does not indicate that there is a paradox, that physics is broken, or that one viewpoint is ultimately more right than the other. It just means that the situation is being measured in two different reference frames. There are no “wrong” reference frames or less-fundamental reference frames in the universe. Therefore, a magnetic field cannot be only an electric field as viewed from the wrong reference frame because there are no wrong reference frames. Since there exists an inertial reference frame in which a magnetic field exists without an electric field being present, and since every inertial frame is real and fundamental, this means that a magnetic field is real, is fundamental, and is not necessarily caused by an electric field.
Secondly, using the electromagnetic relativistic frame transformation equations, you can show that there is no way to start with a purely electric field (no magnetic field present) and transform into a reference frame where there is a purely magnetic field (no electric field present). This means that if a magnetic field were only an electric field as viewed from the wrong reference frame, then purely magnetic fields would not exist. However, purely magnetic fields do exist. Therefore, magnetic fields are more than just relativistic electric fields.
The correct statement is that electric fields and magnetic fields are both fundamental, both are real, and both are part of one unified entity: the electromagnetic field. Depending on what reference frame you are in, a particular electromagnetic field will look more electric and less magnetic, or more magnetic and less electric. However, this does not change the fact that they are both fundamental and both part of the same unified entity. A purely electric field as viewed in one inertial frame is part electric and part magnetic in all other reference frames. Similarly, a purely magnetic field as viewed in one inertial frame is part electric and part magnetic in all other reference frames. The magnetic field is not just a relativistic version of the electric field, and the electric field is not just a relativistic version of the magnetic field. Rather, the unified electromagnetic field is innately and self-consistently relativistic.
Note that for the sake of the discussion, I have ignored quantum effects. The most accurate description of electromagnetic fields is currently not the original Maxwell’s equations, but the quantum form of Maxwell’s equations, which is called quantum electrodynamics. However, since quantum electrodynamics simply extends Maxwell’s equations rather than replaces them, all of the concepts in this article are still valid.
Also note that I have used the word “inertial” a lot in this article. This means that we are only considering reference frames that have a flat spacetime, i.e. reference frames that are not accelerating and do not have large amounts of gravity. In order to describe non-inertial reference frames, you have to use Einstein’s theory of General Relativity, which is more complicated than Special Relativity. However, since the conclusion is the same (the electromagnetic field is unified and fundamental), I have described this article in the context of inertial frames for the sake of simplicity.