# charge density is a constant or a scalar-value function of position?

Since it is "density", I suppose that such values as charge density of a volume region $\rho_v$, charge density of a line $\rho_L$, and charge density of a surface $\rho_S$ is a constant but I sometimes see that people write $\sigma(r)$ to denote charge density and r is the position of that considered density in a space (ex:http://scienceworld.wolfram.com/physics/SurfaceChargeDensity.html) It implies that charge density is a scalar field. So I don't know which one is right. If charge density is a scalar field which means that its value varies as different position then what is the exact definition of density.

• Have you read the Wikipedia article? If no, please do that. If yes, please ask a more specific question about it. – ACuriousMind Feb 2 '15 at 20:22

Both the uses are correct. Charge density may be uniform or may vary depending on its position making it a function of $r$ and hence $\rho(r)$