Adding the bleed-matrix helper function.