Deep Dive: The Field's Direction
A straight current does not make a magnetic field that points toward or away from the wire. It makes a field that wraps around the wire. This page is about turning that fact into a usable direction rule, not just memorizing a picture.
The reason is the Lorentz force: $\vec{F} = q\vec{v}\times\vec{B}$. To find the magnetic force on moving charge, you need both the charge velocity $\vec{v}$ and the local magnetic field $\vec{B}$. When $\vec{B}$ circles around the source wire, the force on a nearby current-carrying wire points sideways, not along the current.
Use the right-hand rule as a direction tool: point your thumb along the current, and your fingers curl in the direction of $\vec{B}$. The field direction is tangent to the circular path at each point.
Compass Check
A compass near a current-carrying wire turns until its needle lies tangent to the local magnetic-field path. As you move around the wire, the compass direction changes because the tangent direction changes. In the simulator below, the gray arrowheads follow those circular paths, and the vectors at the right wire show the local $\vec{v}$, $\vec{B}$, and resulting $\vec{F}$.
The Paradox of Attraction
The two-wire result can feel surprising: if the magnetic field circles around a wire, how can two straight wires attract or repel each other?
Focus on one wire as the source. It creates a circular $\vec{B}$ field. At the position of the second wire, the second wire samples just the local value of that circular field: into the screen on one side, out of the screen on the other.
Now apply $\vec{F} = q\vec{v}\times\vec{B}$ to the moving charges in the second wire. The velocity is along the wire, while $\vec{B}$ points into or out of the screen, so the force is sideways. For same-direction currents, that sideways force points inward, so the wires attract. Reverse one current, and the cross product reverses, so the wires repel.
Direction chain: source current $\rightarrow$ circular $\vec{B}$ direction; moving charges in the second wire $\rightarrow$ $\vec{v}$; cross product $\vec{v}\times\vec{B}$ $\rightarrow$ sideways force.