Products of irreducible matrices