Abstract A valiant of L-system called `matrix L-system' is introduced to model the folding process of a square paper into small polygons (rectangles or triangles). Using this grammar, the patterns generated by triangular folding combined with cutting operation at each step are demonstrated.