7. Given point $P(4,2)$, a line $l$ passing through point $P$ intersects the positive x-axis and y-axis at points $A$ and $B$ respectively, and $O$ is the origin. Then the minimum perimeter of $\triangle A O B$ is $\qquad$ .
7. 20 .

As shown in Figure 3, construct the excircle $\odot O_{1}$ of $\triangle A O B$ tangent to line $l$ at point $K$.
Thus, $|B K|=|B N|,|A M|=|A K|$.
Let the center $O_{1}(m, m)$. Then the perimeter of $\triangle A O B$ is
$$
|O M|+|O N|=2|O M|=2 \mathrm{~m} \text {. }
$$

To satisfy the condition for point $P$, it is only necessary that point $P(4,2)$ is not inside $\odot O_{1}$, i.e.,
$$
\begin{array}{l}
\left|O_{1} P\right| \geqslant m \\
\Rightarrow(4-m)^{2}+(2-m)^{2} \geqslant m^{2}
\end{array}
$$
$\Rightarrow m \leqslant 2$ (discard) or $m \geqslant 10$.
When $m=10$, the minimum perimeter of $\triangle A O B$ is 20. At this time, the equation of line $l$ is $3 x+4 y-20=0$, and $P$ is the point of tangency.