In an undirected graph G=(V,E) a clique is a subgraph induced by node set S⊆V (i.e., GS = (S,ES)) such that the density of GS is 1. Put another way, in a clique, every pair of nodes is adjacent.
Example: Consider undirected graph G=(V,E) drawn below.
Image may be NSFW.
Clik here to view.
Clik here to view.

The following are cliques:
- The subgraph induced by {c,d,e,f}
- The subgraph induced by {b,f}
The following are not cliques:
- The subgraph induced by {a,b,c}
- The subgraph induced by {b,c,d,e}, which is drawn below
Image may be NSFW. Clik here to view. ![]() This subgraph is not a clique: Its density is less than 1. |
The subgraph induced by {c,d,e,f} is the largest clique in G: the clique with the most nodes. Usually the largest clique in a graph is the most interesting clique in that graph.