3. The minimum value of the function $f(x)=9^{x}+9^{-x}-2\left(3^{x}+3^{-x}\right)$ is ( ).
(A) 1
(B) 2
(C) -3
(D) -2
3. D.
$$
\begin{array}{l}
f(x)=9^{x}+9^{-x}-2\left(3^{x}+3^{-x}\right) \\
=\left(3^{x}+3^{-x}\right)^{2}-2\left(3^{x}+3^{-x}\right)-2 . \\
\text { Let } t=3^{x}+3^{-x} \geqslant 2, \text { then } \\
y=t^{2}-2 t-2=(t-1)^{2}-3 .
\end{array}
$$

Therefore, the minimum value is -2.