3. In rectangle $A B C D$, $A B=12, A D=3, E$ and $F$ are points on $A B$ and $D C$ respectively. Then the minimum length of the broken line $A F E C$ is $\qquad$ .
3. 15 .

As shown in Figure 5, construct the symmetric points $A_{1}$ and $C_{1}$ of $A$ and $C$ with respect to $DC$ and $AB$, respectively. Connect $A_{1}C_{1}$ to intersect $AB$ and $DC$ at points $E_{1}$ and $F_{1}$, respectively, and connect $A_{1}F$ and $C_{1}E$. Draw a perpendicular from $A_{1}$ to the extension of $BC$, with the foot of the perpendicular being $G$.
Given that $A_{1}G = AB = 12$ and $C_{1}G = 3AD = 9$, by the Pythagorean theorem, we have
$$
\begin{array}{l}
A_{1}C_{1} = \sqrt{A_{1}G^{2} + C_{1}G^{2}} = 15 . \\
\text{Therefore, } AF + FE + EC = A_{1}F + FE + EC_{1} \\
\geqslant A_{1}C_{1} = 15 .
\end{array}
$$

When points $E$ and $F$ coincide with $E_{1}$ and $F_{1}$, respectively, the minimum value is achieved.