Example 1 Find the minimum value of the function
$$
f(x)=|x-1|+|x-2|+\cdots+|x-10|
$$

. ${ }^{[1]}$
【Analysis】By the geometric meaning of absolute value, $\sum_{i=1}^{n}\left|x-a_{i}\right|$ represents the sum of distances from the point corresponding to $x$ on the number line to the points corresponding to $a_{i}(i=1,2, \cdots, n)$. It is easy to know that when the point corresponding to $x$ is in the middle of the points corresponding to $a_{i}$ (when $n=2 k+1$ $(k \in \mathbf{N})$) or between the middle two points (when $n=2 k$ $\left(k \in \mathbf{Z}_{+}\right)$), the sum of distances is minimized.
When $x \in[5,6]$, $f(x)$ achieves its minimum value of 25.
By generalizing Example 1, it is not difficult to obtain
Conclusion 1 Suppose $a_{1} \leqslant a_{2} \leqslant \cdots \leqslant a_{n}$. For the function
$$
f(x)=\sum_{i=1}^{n}\left|x-a_{i}\right| \text {, }
$$
(1) When $n=2 k+1(k \in \mathbf{N})$, the point where $f(x)$ achieves its minimum value is $a_{k+1}$, and
$$
f(x)_{\min }=\sum_{i=k+2}^{n} a_{i}-\sum_{i=1}^{k} a_{i} ;
$$
(2) When $n=2 k\left(k \in \mathbf{Z}_{+}\right)$, every point in the interval $\left[a_{k}, a_{k+1}\right]$
is a point where $f(x)$ achieves its minimum value, and
$$
f(x)_{\min }=\sum_{i=k+1}^{n} a_{i}-\sum_{i=1}^{k} a_{i} .
$$