Association
A plain solid line between two class boxes is an association: objects of the two classes can have links between them. Labels at either end can name each end's role and say how many objects take part.
How to read it
UML 2.5.1 defines an association as a relationship that can occur between typed instances, declaring that there can be links between objects of the classes at its ends. A binary association, the usual kind, is drawn as a solid line between two classes, or from a class back to itself. The line can carry the association's name; each end can carry a role name and a Multiplicity such as 1 or 0..*. A small filled triangle beside the name only shows which way to read it, and the specification says it has no semantic meaning. Robert C. Martin's 1997 tutorial gives the example of a Window and the Frame it belongs to: a Frame is not part of a Window, so the line between them is a plain association and not Aggregation.
Also searched as: association arrow, association symbol, uml association.
Arrows and crosses on the line
An open arrowhead at one end means that end is navigable: objects at the other end can reach it efficiently. A small x at an end means it is not navigable. UML 2.5.1 lets a diagram show all arrows and crosses, suppress all of them, or show arrows only on one-way associations. In the first style a line with no arrows means navigation both ways; in the second nothing can be inferred about navigation. Course notes generally read a plain line the third way, as navigable in both directions (Martin; Virginia Tech's OpenDSA), and the specification observes that this style can't tell two-way navigation apart from none at all.
Association, aggregation or composition?
A diamond at one end turns the line into a whole-part relationship: hollow for Aggregation, filled for Composition. Martin's tutorial says the difference between a plain association and aggregation is one of implication, since the two are implemented in much the same way. A dashed line is not an association: with an open arrowhead it is a Dependency.
Three or more classes
An association between three or more classes is drawn as a large diamond with a line from it to each class. The specification makes this diamond larger than the small diamonds of aggregation and composition, which sit at the end of a line.
Read next
- Next in UML diagram symbolsAggregationA line with a hollow (white) diamond at one end is aggregation: a whole-part relationship in a UML class diagram. The diamond sits against the class that is the whole.
- The same shape in African flagsFlag of AngolaAngola’s flag is red over black with a yellow emblem in the centre: part of a cogwheel, a machete and a five-pointed star. Its constitution says the red is the blood shed by Angolans under colonial oppression, in the liberation struggle and in defence of the country, and the black is the African continent; the cogwheel stands for workers and industry, the machete for peasants, farming and the armed struggle, the star for international solidarity and progress, and their yellow for the country’s wealth.
More UML diagram symbols
The same shape elsewhere
Browse symbols drawn with lines or squares and rectangles.
Sources
- OMG Unified Modeling Language (OMG UML), Version 2.5.1, OMG document formal/17-12-05, December 2017, Object Management Group, 11.5.3 Semantics; 11.5.4 Notation
- UML Tutorial: Part 1 -- Class Diagrams, Robert C. Martin, 1997, Northeastern University, Khoury College of Computer Sciences (course reading, CS U370, Fall 2007), Aggregation / Association
- The Unified Modeling Language (OpenDSA Complete Catalog, 3.2), Chapter 3, Object-Oriented Programming, OpenDSA Project, Virginia Tech, 3.2.1.2 Class Diagrams, Association
- Informal Semantics for UML Class Diagrams, CS 743, Software Verification and Validation, Fall 2019, University of Wisconsin–La Crosse, Department of Computer Science, Association
Researched, edited and approved by Rory Hansen before publishing. Last reviewed October 9, 2026. How we research
Added .