In cognitive radio (CR) networks, there are scenarios where the secondary (lower priority) users intend to communicate with each other by opportunistically utilizing the transmit spectrum originally allocated to the existing primary (higher priority) users. For such a scenario, a secondary user usually has to trade off between two conflicting goals at the same time: one is to maximize its own transmit throughput; and the other is to minimize the amount of interference it produces at each primary receiver. In this paper, we study this fundamental tradeoff from an information-theoretic perspective by characterizing the secondary user's channel capacity under both its own transmit-power constraint as well as a set of interference-power constraints each imposed at one of the primary receivers. In particular, this paper exploits multi-antennas at the secondary transmitter to effectively balance between spatial multiplexing for the secondary transmission and interference avoidance at the primary receivers. Convex optimization techniques are used to design algorithms for the optimal secondary transmit spatial spectrum that achieves the capacity of the secondary transmission. Suboptimal solutions for ease of implementation are also presented and their performances are compared with the optimal solution. Furthermore, algorithms developed for the single-channel transmission are also extended to the case of multi-channel transmission whereby the secondary user is able to achieve opportunistic spectrum sharing via transmit adaptations not only in space, but in time and frequency domains as well.