The magnetic bipolar transistor (MBT) is a bipolar junction transistor with an equilibrium and nonequilibrium spin (magnetization) in the emitter, base, or collector. The low-injection theory of spin-polarized transport through MBT's and of a more general case of an array of magnetic p-n junctions is developed and illustrated on several important cases. Two main physical phenomena are discussed: electrical spin injection and spin control of current amplification (magnetoamplification). It is shown that a source spin can be injected from the emitter to the collector. If the base of a MBT has an equilibrium magnetization, the spin can be injected from the base to the collector by intrinsic spin injection. The resulting spin accumulation in th...