Patterns and relationships (Algebra)