6. Given that $A_{1} A_{2} A_{3} \cdots A_{9}$ is a regular nonagon, $A_{1} A_{2}=$ $a, A_{1} A_{3}=b$. Then $A_{1} A_{5}$ equals ( ).
(A) $\sqrt{a^{2}+b^{2}}$
(B) $\sqrt{a^{2}+a b+b^{2}}$
(C) $\frac{1}{2}(a+b)$
(D) $a+b$
6. (D).

As shown in Figure 5, we have
$$
\begin{array}{l}
\angle A_{2} A_{1} A_{5}=\angle A_{4} A_{5} A_{1} \\
=\frac{3 \times 180^{\circ}-\frac{7 \times 180^{\circ}}{9} \times 3}{2} \\
=60^{\circ} .
\end{array}
$$

Thus, $\angle A_{1} A_{5} B$ and $\triangle A_{2} A_{4} B$ are both equilateral triangles.
Therefore, $A_{2} B=A_{1} A_{4}=A_{1} A_{3}=h$.
$$
I_{1} A=A_{1} B=A_{1} A_{2}+A_{2} B=a+b .
$$