3. A line $l$ is drawn through the fixed point $P(2,1)$, intersecting the positive directions of the $x$-axis and $y$-axis at points $A$ and $B$, respectively. If the area of $\triangle A O B$ (where $O$ is the origin) is to be minimized, then the equation of $l$ is ( ).
(A) $x+y-3=0$
(B) $x+3 y-5=0$
(C) $2 x+y-5=0$
(D) $x+2 y-4=0$
3.D.

From the given, we know that $S_{\triangle A O B}=\frac{1}{2} a b$, and $\frac{2}{a}+\frac{1}{b}=1$.
Then $a b=a+2 b \geqslant 2 \sqrt{a \cdot 2 b}=2 \sqrt{2} \cdot \sqrt{a b}$,
which means $\sqrt{a b} \geqslant 2 \sqrt{2}, a b \geqslant 8$.
Equality holds if and only if $\left\{\begin{array}{l}a=2 b, \\ 2 b+a=a b,\end{array}\right.$ i.e., $\left\{\begin{array}{l}a=4, \\ b=2\end{array}\right.$, at which point $a b=8$.

Therefore, the equation of $l$ is $\frac{x}{4}+\frac{y}{2}=1$, or $x+2 y-4=0$.