The performance of all subsystems of the CMS muon detector has been studied by using a sample of proton-proton collision data at root s = 7TeV collected at the LHC in 2010 that corresponds to an integrated luminosity of approximately 40 pb(-1). The measured distributions of the major operational parameters of the drift tube (DT), cathode strip chamber (CSC), and resistive plate chamber (RPC) systems met the design specifications. The spatial resolution per chamber was 80-120 mu m in the DTs, 40-150 mu m in the CSCs, and 0.8-1.2 cm in the RPCs. The time resolution achievable was 3 ns or better per chamber for all 3 systems. The efficiency for reconstructing hits and track segments originating from muons traversing the muon chambers was in the range 95-98%. The CSC and DT systems provided muon track segments for the CMS trigger with over 96% efficiency, and identified the correct triggering bunch crossing in over 99.5% of such events. The measured performance is well reproduced by Monte Carlo simulation of the muon system down to the level of individual channel response. The results confirm the high efficiency of the muon system, the robustness of the design against hardware failures, and its effectiveness in the discrimination of backgrounds.