Patterning and algebra