In this paper, we study the capacity of spectrum sharing (SS) multiple-input multiple-output (MIMO) systems over Rayleigh fading channels. More specifically, we present closed-form capacity formulas for such systems with and without optimal power and rate adaptation. A lower bound on the capacity is also derived to characterize the scaling law of the capacity. Results show that increasing the number of antennas has a negative effect on the system capacity in the low signal-to-noise (SNR) regime and the scaling law at high SNR is similar to the conventional MIMO systems. In addition, a lower bound on the capacity of the SS keyhole MIMO channels is analyzed. We also present a capacity analysis of SS MIMO maximal ratio combining (MRC) systems and the results show that the capacity of such systems always decreases with the increase of the number of antennas. Numerical results are finally given to illustrate our analysis.