2. As shown in Figure 1, in rectangle $A B C D$, it is known that $A B=1$, point $M$ is on diagonal $A C$, $\frac{A M}{A C}=\frac{1}{4}$, line $l$ passes through point $M$ and is perpendicular to $A C$, intersecting side $A D$ at point $E$ and side $A B$ at point $G$. If line $l$ divides the rectangle into two parts with an area ratio of $1: 6$, then $A E=$ $\qquad$
2. $\frac{\sqrt{14}}{7}$.

It is easy to get $\triangle A E G \backsim \triangle D C A \Rightarrow \frac{A G}{A D}=\frac{A E}{D C}$.
Since $D C=A B=1$, we have
$$
\begin{array}{l} 
\frac{S_{\triangle A E G}}{S_{\text {rectangle } A B C D}}=\frac{\frac{1}{2} A E \cdot A G}{A D \cdot D C}=\frac{1}{7} \\
\Rightarrow A E^{2}=\frac{2}{7} \Rightarrow A E=\frac{\sqrt{14}}{7} .
\end{array}
$$