Obtain Gauss’s law from the flux associated with a sphere of radius $\mathrm{'r'}$ and charge $\mathrm{'q'}$ at centre.
Let us consider the total flux through a sphere of radius $r$, which encloses a point charge $q$ at its centre.
Divide the sphere into small area elements, as shown in figure.
The flux through an area element $\Delta \overrightarrow{\mathrm{S}}$ is,
$\Delta \phi=\overrightarrow{\mathrm{E}} \cdot \Delta \overrightarrow{\mathrm{S}}=\overrightarrow{\mathrm{E}} \cdot \hat{r} \Delta \mathrm{S}$
where we have used Coulomb's law for the electric field due to a single charge $q$.
The unit vector $\hat{r}$ is along the radius vector from the centre to the area element.
The area element $\Delta \overrightarrow{\mathrm{S}}$ and $\hat{r}$ have the same direction,
$\therefore \Delta \phi=\frac{q}{4 \pi \varepsilon_{0} r^{2}} \Delta S=\frac{k q}{r^{2}} \Delta S\left(\because k=\frac{1}{4 \pi \varepsilon_{0}}\right)$
The total flux through the sphere is obtained by adding up flux through all the different area elements.
$\therefore \phi=\sum_{\Delta S} \frac{k q}{r^{2}} \cdot \Delta S$
$\therefore \phi=\frac{k q}{r^{2}} \sum_{\Delta S} \Delta S=\frac{q}{4 \pi \varepsilon_{0} r^{2}} S(\because \Sigma \Delta S=S)$
$\therefore \phi=\frac{q}{4 \pi \epsilon_{0} r^{2}} \times 4 \pi r^{2}=\frac{q}{\epsilon_{0}}$
$\left(\because S=4 \pi r^{2}\right. \text { for sphere) }$
Gauss's law : Electric flux through a closed surface $\mathrm{S}$,
$\phi=\Sigma \frac{q}{\varepsilon_{0}}$
$\Sigma q=$ total charge enclosed by $\mathrm{S}$.
"The electric flux associated with any closed surface is equal to the ratio of net charge enclosed by surface to $\epsilon_{0}$ ".
$Assertion\,(A):$ A charge $q$ is placed on a height $h / 4$ above the centre of a square of side b. The flux associated with the square is independent of side length.
$Reason\,(R):$ Gauss's law is independent of size of the Gaussian surface.
If $\oint_s \vec{E} \cdot \overrightarrow{d S}=0$ over a surface, then:
Gauss’s law states that
In figure $+Q$ charge is located at one of the edge of the cube, then electric flux through cube due to $+Q$ charge is
Electric flux through surface $s_1$