Example 2 Polynomial $M=2 a^{2}-8 a b+17 b^{2}-$ $16 a-4 b+1998$. Then, what is the minimum value of $M$?
$$
\text { Sol: } \begin{aligned}
M= & 2\left(a^{2}+4 b^{2}+16-4 a b-8 a+\right. \\
& 16 b)+9\left(b^{2}-4 b+4\right)+1930 \\
= & 2(a-2 b-4)^{2}+9(b-2)^{2}+ \\
& 1930 .
\end{aligned}
$$

It is evident that for all real numbers $a, b$, we always have $M \geqslant 1930$. The minimum value of $M$ is 1930, which occurs only when $a-2 b-4=0$ and $b-2=0$, i.e., $a=8, b=2$.
2 Formula Method

When $a, b$ are both positive, $(\sqrt{a}-\sqrt{b})^{2} \geqslant 0$. Therefore, $a+b \geqslant 2 \sqrt{a b}(a>0, b>0$, equality holds only when $a=b$).