There are two general types of bamboo, clumping and running. Clumping bamboo sends roots and shoots out in a small area close to the plant. It spreads expanding the edge of the cluster of plants slowly outward. Running bamboo sends long roots out through the soil. New shoots can emerge anywhere along these roots, letting running bamboo spread rapidly.
The best way to keep bamboo from spreading is to install a barrier to contain it. This is easily done when preparing the bed for planting, but can be done later if needed. Solid materials such as sheet metal make the best barriers, so that roots cannot penetrate through, allowing the bamboo to spread. Sheet metal is also les expensive than many other materials.
Place the sheet metal barrier deep enough into the soil to prevent roots from growing under it, 3 to 4 deet deep. Most bamboo roots grow toward the top of the soil, but if they encounter an obstacle they will go quite deep to trying to grow around it. It is also important to compress the soil firmly when refilling the trench after installing the barrier. Loose soil can allow bamboo roots to grow deeper into the soil and eventually grow under the sheet metal. Hard-packed soil will encourage the roots to grow away from the barrier and aid in containing the bamboo.
Since most bamboo roots grow at the top of the soil, position the sheet metal barrier at least 3 inches above the soil, or shoots will simply climb over it. While sheet metal is a practical and inexpensive barrier material, it may not be visually appealing to many people. Dress it up by placing decorative rock or low-growing plants around the barrier.