4. Let $A_{1}, A_{2}, \cdots, A_{n}$ be any $n$ points in the plane. Find the locus of a moving point $P$ such that the sum of the squares of the distances from $P$ to the points $A_{k}$ $(k=1,2, \cdots, n)$ is a constant.
4. Let the complex numbers corresponding to the points be $z_{k}(k=1,2, \cdots, n)$. Establish a complex plane with the centroid of these points as the origin, then $\sum_{k=1}^{n} z_{k}=0$, $\sum_{k=1}^{\prime \prime} \overline{z_{k}}=0$. Let the complex number corresponding to point $P$ be $z$, then the constant $l=\sum_{k=1}^{n}\left|z-z_{k}\right|^{2}=n|z|^{2}+\sum_{k=1}^{n}\left|z_{k}\right|^{2}$, which means $|z|^{2}=\frac{1}{n}(l - \sum_{k=1}^{n}\left|z_{k}\right|^{2})$. Therefore, when $l>\sum_{k=1}^{n}\left|z_{k}\right|^{2}$, the trajectory is a circle with the centroid as the center; when $l=\sum_{k=1}^{n}\left|z_{k}\right|^{2}$, there is only one point, which is the centroid; when $l<\sum_{k=1}^{n}\left|z_{k}\right|^{2}$, there is no trajectory.