Gausss Law In Electrostatics
Concepts: Electric field due to a point charge:
 The electric field due to a point charge is given by the equation:
$$\overrightarrow{E}=\frac{1}{4\pi\epsilon_0}\frac{q}{r^2}\hat{r}$$ Where,
(\overrightarrow{E}) is the electric field vector.
(q) is the magnitude of the point charge.
(r) is the distance from the point charge to the observation location.
(\hat{r}) is the unit vector pointing from the point charge to the observation location.
Electric flux:
 Electric flux is a measure of the amount of electric field passing through a given surface. It is given by the equation: $$\Phi_E=\oint\overrightarrow{E}\cdot\hat{n}dA$$ Where (\Phi_E) is the electric flux (\overrightarrow{E}) is the electric field vector. (\hat{n}) is the normal unit vector perpendicular to the surface. (dA) is the differential area of the surface.
Gauss’s law:
 Gauss’s law states that the total electric flux through any closed surface is equal to the total charge enclosed by that surface. It is given by the equation: $$\oint\overrightarrow{E}\cdot\hat{n}dA=\frac{Q_{enc}}{\epsilon_0}$$ Where, $$\oint\overrightarrow{E}\cdot\hat{n}dA$$ represents the total electric flux through the closed surface. (Q_{enc}) is the total charge enclosed by the closed surface. (\epsilon_0) is permittivity of free space.
Applications of Gauss’s law:
Electric field of a uniformly charged sphere: For a uniformly charged sphere, the electric field at a distance (r) from the center of the sphere is given by:

Inside the sphere ((r<R)) $$\overrightarrow{E}=0$$

Outside the sphere ((r>R ))
$$\overrightarrow{E}=\frac{Q}{4\pi\epsilon_0 r^2}\hat{r}$$
Electric field of a uniformly charged infinite plane: For a uniformly charged infinite plane with surface charge density (\sigma), the electric field at a distance (d) from the plane is given by: $$\overrightarrow{E}=\frac{\sigma}{2\epsilon_0}\hat{n}$$ Where (\hat{n}) is the normal unit vector perpendicular to the plane.
Electric field of a charged conducting sphere: For a charged conducting sphere, the electric field at a distance (r) from the center of the sphere is given by:
 Inside the sphere (r<R):
$$\overrightarrow{E}=0$$
 Outside the sphere (r>R): $$\overrightarrow{E}=\frac{Q}{4\pi\epsilon r^2}\hat{r}$$