Example 12. Let $P$ be a point inside $\triangle A B C$, for what position of $P$ is $P A^{2}+P B^{2}+P C^{2}$ minimized?
Let the $x$-axis, with $B C$ as the focal points and $OC$ as the unit length, establish a Cartesian coordinate system. Thus, the coordinates of points $B$ and $C$ are $(-1, 0)$ and $(1, 0)$, respectively. The coordinates of points $A$ and $P$ are $(r, q)$ and $(x, y)$, respectively. Therefore, we have
$$
\begin{array}{c}
P A=(x-r)^{2}+(y-q)^{2}, \\
P B^{2}=(x+1)^{2}+y^{2}, P C^{2}=(x-1)^{2}+y^{2} .
\end{array}
$$

Adding the three equations, we get
$$
\begin{array}{l}
P A^{2}+P B^{2}+P C^{2} \\
=(x-r)^{2}+(x+1)^{2}+(x-1)^{2} \\
+(y-q)^{2}+2 y^{2} \\
=3\left(x-\frac{r}{3}\right)^{2}+\frac{2 r^{2}}{3}+2 \\
+3\left(y-\frac{q}{3}\right)^{2}+\frac{2 q^{2}}{3}
\end{array}
$$

It is evident that when and only when $x=\frac{r}{3}, y=\frac{q}{3}$, i.e., when point $P$ is at the centroid, $P A^{2}+P B^{2}+P C^{2}$ attains its minimum value.