Why is force on moving charges in magnetic field perpendicular? (1)The magnetic field around a conductor where there's a current can easily be demonstrated using something like a compass needle. The magnetic field lines will be perpendicular to the direction of the current.
Now, charges will not be affected by a electromagnetic force unless they are moving. However, in my textbook they say when the velocity is perpendicular to some magnetic field they are in, a force will be perpendicular to the charges -  direction given by right-hand rule.
Obviously that can as well be demonstrated very easily through experiments. But is there a way to show this theoretically with magnetic field lines, i.e. why the force will be directed upwards in some cases for example? 
 A: The force on a current carry conductor is given by the equation to find magnitude as given below and its direction given by Flemings Left Hand Rule:
$$F=BIlsin(\theta)$$
This formula can be derived from the force on a moving charge $F=Bvqsin(\theta)$ or vice versa where $v$ is the velocity of charge. See, current in a wire acts like a moving charge and moving charges generate a circular magnetic field around them( details on their magnitude can be found using Biot-Savart law) so the resultant force due to field of moving charge or current becomes perpendicular to the direction of motion/flow of current. Below is an image showing the fields.

A: Given that there is an electric force ${\bf F}_e=q{\bf E}$, the existence of a magnetic force of the form ${\bf F}_m=q{\bf v}\times{\bf B}$ may be deduced by requiring Lorentz invariance.  
Both expressions come from a single relativistically covariant expression for the four-force, 
$f_\mu=q\dot x^\nu F_{\mu\nu}$, where $\dot x^\mu\equiv dx^\mu/d\tau$
is the four-velocity and $F_{\mu\nu}$ is the electromagnetic field strength, whose components can be found in basic electrodynamics textbooks.
In particular, the spatial components ($\mu=1,2,3$) give rise to the combined electric+magnetic force,
$F_i=q(E_i+\epsilon_{ijk}v_jB_k)$, or, in vector notation, 
${\bf F}=q({\bf E}+{\bf v}\times{\bf B})$.
In summary, in the relativistic notation it becomes clear that the electric and magnetic effects are not unrelated, but stem from one single electromagnetic interaction.
The division into electric vs magnetic forces is not Lorentz-covariant, namely, it depends on the particular frame of reference.
