Rough sets provide a useful tool for data preprocessing during data mining. However, many algorithms related to some problems in rough sets, such as attribute reduction, are greedy ones. Matroids propose a good platform for greedy algorithms. Therefore, it is important to study the combination between rough sets and matroids. In this paper, we investigate rough sets and matroids through their operators, and provide a matroidal method for attribute reduction in information systems. Firstly, we generalize four operators of rough sets to four operators of matroids through the interior, closure, exterior and boundary axioms, respectively. Thus, there are four matroids induced by these four operators of rough sets. Then, we find that these four matroids are the same one, which implies the relationship about operators between rough sets and matroids. Secondly, a relationship about operations between matroids and rough sets is presented according to the induced matroid. Finally, the girth function of matroids is used to compute attribute reduction in information systems.