We investigate both theoretically and experimentally the electro- magnetically induced transparency (EIT) phenomenon of atomic <sup>87</sup>Rb at the room temperature with a static magnetic field lifting the degeneracy of all three involved hyperfine levels. Two collinearly propagating and linearly polarized laser fields (a probe field and a coupling field) are used to couple one hyperfine level (the upper level) of the 5<i>P</i><sub>1/2</sub> state to two hyperfine levels (the lower levels) of the 5<i>S</i><sub>1/2</sub> state, respectively. In the case of zero magnetic fields, we observed a deep EIT window with the contrast of about 66%. Here, the EIT window width is limited by both the spontaneous decay rate of the upper level and the coupling field intensity. When a magnetic field parallel to both laser beams is applied, the EIT window is split into three much narrower sub-windows with contrasts of about 32%. If the magnetic field is perpendicular to the laser beams, however, the EIT window is split into four much narrower sub-windows whose contrasts are 32% or 16%. This is because the decomposition of the linearly polarized optical fields strongly depends on the orientation of the used magnetic field. The underlying physics is that, in the limit of a weak probe field, an ideal degenerate three-level system can be split into three or four sets of independent three-level systems by a magnetic field due to the lifting of magnetic sublevels of the involved hyperfine levels. In this paper the absorption spectra corresponding to different magnetic field directions are clearly shown and compared. And a straightforward but effective theoretical method for analyzing the experimental results is put forward. Our theoretical calculations are in good agreement with the experimental results.