The scientist Ampere has empirically discovered the interaction force for two parallel wires, dependent on the force being reversely perpendicular to the distance between them.
Magnetic force law can be formulated for a fragment of current and states: Fm=I[dl,dB], value of magnetic force is Fm=I * dl * dB * sinα. In this formula Fm is a magnetic force, affecting the fragment of current, directed with the α angle to the fragment of current. Total magnetic force, affecting the conductor, can be determined by the sum of magnetic forces of current fragments. For example, magnetic force between two parallel conductors is
where R is a distance between wires, I1 and I2 are currents of conductors. For equally directed conductors this is force of attraction, for reverse directed wires this is force of repulsion.
Magnetic field affects not only currents, but charged particles. And magnetic parts of the force affecting moving particles is called Lorentz force F = q * [v,B] where v is the velocity of a charged particle, α is the angle between v and B. The direction of Lorentz force can be found by the ‘lefthanded rule’. Lorentz force can also be found as a result of Ampere force division to the quantity of current fragments in a considered wire.