The method of characteristics and multiple-scaling perturbation techniques are used to study the space-charge instability of electron beams. It is found that the stable oscillating state (virtual cathode) created when the space-charge limit is exceeded is similar to a collisionless shock wave. The oscillatory solution originates at the bifurcation point of two unstable steady states. Complementary behavior (virtual anode) results when an ion beam exceeds its space-charge limit. The virtual cathode can also exist in the presence of a neutralizing heavy-ion background. The Pierce instability, where the electron and ion charge densities are equal, is a special case of this broader class. Estimates of the nonlinear growth rate of the instability at the space-charge limit are given.