Biot-Savart Law
A current element of length $\mathrm{d}\vec{l}$ carrying current $I$ produces a magnetic field at point P,
\begin{align}
\mathrm{d}\vec{B}=\frac{\mu_0}{4\pi}\frac{I\;\mathrm{d}\vec{l}\times\hat{r}}{r^2},
\end{align}
where $\vec{r}$ is the position vector of P from the current element.
Problems from IIT JEE