In this paper, we address the problem of obtaining the optimal size and location of piezoelectric actuator/sensors. An optimization problem is formulated for a general beam which has arbitrary boundary conditions and may have as many piezoelectric actuators as desired. The proposed optimization criterion is based on the beam modal cost and modal controllability. If the size of the actuator is unbounded, it frequently is optimal if it covers most if not all the length of the beam. This is not realistic, since there are cost, weight, and space factors to be considered. By adding a penalty term to the criterion, the size of the actuator/sensor can be reduced to a practical and reasonable size. Thus there is no need to pre-select the size of the actuator/sensor. The optimal size and location for beams with various boundary conditions are determined for a single pair and for two pairs of actuators. The results in this paper are in very good agreement with those reported by other investigators. A comparison is also made between the performance of two pairs of actuators and the performance of a single pair. The improvement in performance with two pairs is quantified.