  The structure of the mirror nuclei $^9$Be and $^9$B is studied in a
microscopic $\alpha+ \alpha+ n$ and $\alpha+ \alpha+ p$ three-cluster model
using a fully antisymmetrized 9-nucleon wave function. The two-nucleon
interaction includes central and spin-orbit components and the Coulomb
potential. The ground state of $^9$Be is obtained accurately with the
stochastic variational method, while several particle-unbound states of both
$^9$Be and $^9$B are investigated with the complex scaling method.The
calculation for $^9$Be supports the recent identification for the existence of
two broad states around 6.5 MeV, and predicts the $\frac{3}{2}^{-}_2$ and
$\frac{5}{2}^{-}_2$ states at about 4.5 MeV and 8 MeV, respectively. The
similarity of the calculated spectra of $^9$Be and $^9$B enables one to
identify unknown spins and parities of the $^9$B states. Available data on
electromagnetic moments and elastic electron scatterings are reproduced very
well. The enhancement of the $E$1 transition of the first excited state in
$^9$Be is well accounted for. The calculated density of $^9$Be is found to
reproduce the reaction cross section on a Carbon target. The analysis of the
beta decay of $^9$Li to $^9$Be clearly shows that the wave function of $^9$Be
must contain a small component that cannot be described by the simple $\alpha+
\alpha+ n$ model. This small component can be well accounted for by extending a
configuration space to include the distortion of the $\alpha$-particle to $t+p$
and $h+n$ partitions.
