The law of similarity states that the human eye perceives objects that have a common visual characteristic (shape, color, size) as related. In other words, similar elements of design has a tendency to look related, even if they are separated.
Similarity can be based on different visual characteristic such as color, shape, size, and orientation. Designers stimulate users to make certain connections between interface elements, giving them the same or similar visual characteristics.
The law of similarity is one of the psychological principles of the gestalt laws of grouping. Gestalt principles are rules that describe how the human eye perceives visual elements. These principles explain how a person naturally perceives objects as a single form (or group), rather than as separate elements.