Show that a graph G with n vertices can have

Show that a graph G with n vertices can have at most n(n - 1)/2 edges, and G has exactly n(n - 1)/2 edges if G is complete, that is, if every pair of vertices of G is joined by an edge. (Recall that loops and multiple edges are excluded.)

PROBLEM SET 23.3: