Use case diagrams are widely used to describe system functionality from the perspective of actors and their goals. Two common relationships that often appear in these diagrams are and . While they look similar on the surface, they serve very different purposes in structuring your system’s behavior.

An include relationship represents mandatory behavior that is reused by multiple use cases. Think of it as extracting a shared step that always happens.
Purpose: Avoids duplication by modeling common functionality once.
Example:
Login use case → includes Validate Credentials
Both Register and Reset Password may also include Validate Credentials, since that step is essential every time a person’s identity is confirmed.
Whenever the base use case runs, the included use case is always executed.
An extend relationship, on the other hand, captures optional or conditional behavior. It lets you model steps that only happen under specific circumstances.
Purpose: Keeps the base use case simple, while still allowing you to capture variations.
Example:
Checkout use case → extends Apply Discount
Place Order use case → extends Add Gift Wrapping
The extended part is not always triggered; it depends on conditions like a promotion code or customer choice.
Mixing up <include> and <extend> can make a use case diagram confusing:
By using them properly:
In short, <include> is for must-do, reusable actions, while <extend> is for may-do, conditional actions. Getting this distinction right makes your system design more precise and easier to communicate.
