Network motifs are small, recurring subgraph patterns that appear significantly more often in real networks than in random graphs — they serve as the fundamental building blocks of complex networks. The 13 connected undirected graphs on 3–4 nodes include triangles (3-cliques), paths, stars, and squares. Triangle counting via matrix multiplication (tr(A³)/6) runs in O(n^ω) where ω ≈ 2.37. The motif significance profile, introduced by Milo et al. (2002 Science), distinguishes network types: transcriptional networks are rich in feed-forward loops, while social networks are dominated by triangles reflecting transitivity.