Electric charge in compact space Why in a compact space in the presence of an electric charge there must be the same charge with the opposite sign?
 A: I think you perhaps meant to say "closed manifold", not compact.
Gauss's law states
$$
\oint_S E \cdot dS = Q_{inside}
$$
where "inside" refers to the region of space inside the closed surface $S$.
Now, on a closed manifold, there is no "inside" or "outside" (Is the northern hemisphere "inside" the equator?). In case, Gauss's law can be applied to either side of $S$. Consequently, the total charge on one side of any closed surface $S$ must equal to the negative of the total charge on the other side. The extra negative sign is because I need to change the orientation of $S$. Thus,
$$
Q_{"inside"} = - Q_{"outside"} \quad \implies Q_{tot} = Q_{"inside"} + Q_{"outside"} = 0 . 
$$
In other words, the total charge in a closed space must be zero!
Another way to prove this result is to start with Gauss' law in differential form, $\nabla \cdot E = \rho$. Integrating both sides over the closed manifold $M$ and using Stoke's theorem, we find
$$
Q_{tot} = \oint_{\partial M} n \cdot E 
$$
However, since $M$ is closed, $\partial M = 0$ so we have $Q_{tot} = 0$.
A: A compact space contains its limit points. That is, if a series of points converges to a limit point, that limit point is in the space. This includes series of points that "converge" at infinity.
You can make a space like $R^3$ be compact by adding a point at infinity. If you do this, infinity is no longer unreachable, no longer the point that you haven't reached yet no matter how far you go. You can draw a line to infinity and beyond. Infinity is still the point farthest away from you. If you draw beyond infinity, you get closer. The space is now topologically like a sphere. The point at infinity is like the point opposite you.
If you define a metric on such a space, you have to define it on every point, including the point at infinity. You have to say how far it is from you to the point at infinity, and "an infinite distance" is no longer a good answer. All continuous functions on a compact space are bounded. You have to say a real number.
So you can see that a compact space is different in some ways $R^3$. You cannot have an inverse square law where charges can be separated so far that the force between them approaches $0$.
A solid sphere of radius $1$ is an example of a compact space. There is nothing outside the sphere. Not vacuum. There are no further points. Space stops at r = $1$. Suppose nature in that space behaves the same as in our universe.
Physics is a set of mathematical laws that describe the behavior of the compact space. You can't define displacement as a vector space in such a space. The sum of any two vectors must be an element of the vector space. You could use a subset of a vector space.
Suppose we had such a space filled with metal. Suppose we added some extra electrons. The electrons would spread you as far as possible. They would evenly distribute themselves on the surface. The electric field in the interior would be $0$.
Each electron would feel the sum of forces from the other electrons. This adds up to a force away from the center, in a direction where nothing exists. So $F = ma$ doesn't work at the surface.
Similarly you would have a hard time applying Gauss' law there. But I don't see anything that forces you to have the total charge be $0$.
