The change in magnetic flux is changing your life every day and the major source of energy to the world. This article does not go into the details about the change in magnetic flux and how it causes current but it mainly focuses on the definition of magnetic flux. That is explained in details in Faraday's law. We determine the magnetic flux in the same way we determined electric flux.

Magnetic field is represented by magnetic field lines. If these lines pass through the surface area we call these lines the magnetic flux through the area. But the magnetic flux is the magnetic field lines passing through an area being perpendicular to the area. If the magnetic field lines make an angle with the area vector then the magnetic flux represents only the component of the magnetic field perpendicular to the area.

In Figure 1 magnetic field lines are passing through an area making an angle $\theta$ with the area vector $\vec A$. The component of magnetic field perpendicular to the area (parallel to $\vec A$) is $B\cos \theta$ and therefore the magnetic flux is

\[\Phi_{\text{B}} = AB\cos \theta\]

Note that the magnetic flux does not mean the magnetic field lines only. The above equation suggests that the magnetic flux is the product of area and perpendicular component of magnetic field through that area. So the area is always there in magnetic flux (otherwise we could just say magnetic field lines not flux).

If the area is not uniform (Figure 2), then we need to integrate through the whole area to determine the magnetic flux. In that case we determine the magnetic flux through infinitesimally small area $dA$ and determine the magnetic flux, that is

\[d\Phi_{\text{B}} = dAB\cos \theta \]

Then we integrate the above equation to find the total magnetic flux. So,

\[\Phi_\text{B} = \int dAB\cos \theta = \int \vec A \cdot \vec B\]

If you see the expression of magnetic flux, you already know it is the dot product of two vectors $\vec A$ and $\vec B$, so it is a scalar quantity (result of dot product is always a scalar quantity), that is magnetic flux does not have a particular direction. Note that dot product is commutative (learn more about dot product here).

The SI unit of magnetic field is Tesla T, so the SI unit of magnetic flux is $\text{T} \cdot \text{m}^2$. This unit is called **weber** denoted by $\text{Wb}$. So $1\,\text{Wb}$ = $\,1\text{T}\,\text{m}^2$. You know $1\, \text{T} = 1\,\text{N}/ \text{A}\cdot\text{m}$, and therefore $1\,\text{Wb} = 1\,\text{N} \cdot \text{m/A}$.

Do not confuse with the two possible directions of $\vec A$. We all know that an area vector can have two directions; one on one side of the plane and another on the other side. You can choose either direction as the positive direction and once you choose it, you must stick with it.

You'll see in Gauss's law for magnetism that the total magnetic flux through a closed surface is always zero, that is the magnetic field lines entering the surface is equal to the magnetic field lines leaving the surface, and therefore the net lines through the surface is zero and the flux is zero.