Biot-Savart Law:
Biot-Savart law was discovered in 1820 by two physicist Jeans-Baptiste Biot and Felix Savart. According to this law:

The magnetic field is directly proportional to the current element.$dB \propto dl \qquad (1)$

The magnetic field is directly proportional to the current flowing in the conductor.$dB \propto i \qquad (2)$

The magnetic field is inversely proportional to the square of the distance between current element and point $'P'$ (This is that point where magnetic field has to calculate).

$dB \propto \frac{1}{r^{2}} \qquad (3)$

The magnetic field is directly proportional to the angle of sine. This angle is the angle between the current element and the line joining to the current element & point $'P'$.$dB \propto sin\theta \qquad (4)$

Magnetic field due to current carrying conductor

From equation $(1)$,$(2)$,$(3)$,$(4)$, these equation can be written as:

$\qquad dB \propto \frac{i dl sin\theta}{r^{2}}$

Now replace the proportional sign with the constant i.e. $\frac{\mu_{0}}{4 \pi}$. So above equation can be written as

$ dB = \frac{\mu_{0}}{4 \pi} \frac{i dl sin\theta}{r^{2}}$

The magnetic field at point $P$ due to entire conductor:-

$ B =\frac{\mu_{0}}{4 \pi} \int \frac{i dl sin\theta}{r^{2}}$

Case$(1)$:If $\theta=0^{\circ}$ then the magnetic field will be zero from above equation i.e.

$B=0$

Case$(2)$:If $\theta=90^{\circ}$ then the magnetic field will be maximum from the above equation i.e.