Proof
(related to Theorem: Inequality of Weighted Arithmetic Mean)
 By hypothesis, $a_1,\ldots,a_n$ are given real numbers and $p_1,\ldots,p_n$ are positive real numbers.
 Let $m:=\min(a_1,\ldots,a_n)$ be the minimum and let $M:=\max(a_1,\ldots,a_n)$ be the maximum of the numbers $a_1,\ldots,a_n.$
 Since $p_1,\ldots,p_n$ are positive, by rules 3rd and 6th of calculation wih inequalities, we get for the weighted arithmetic mean the order relation $$(p_1+\cdots+p_n)m\le p_1a_1+\cdots+p_na_n \le (p_1+\cdots+p_n)M.$$
 Applying the 6th rule once again, we get $$m\le\frac {p_1a_1+\cdots+p_na_n}{p_1+\cdots+p_n} \le M.$$
∎
Thank you to the contributors under CC BYSA 4.0!
 Github:

References
Bibliography
 Heuser Harro: "Lehrbuch der Analysis, Teil 1", B.G. Teubner Stuttgart, 1994, 11th Edition