Let $\displaystyle G$ be a graph of order $\displaystyle n$ that is not connected. What is the maximum size of $\displaystyle G$?
The maximum number of edges in a graph of order $\displaystyle n-1$ is $\displaystyle \binom{n-1}{2}=\frac{(n-1)(n-2)}{2}$. If we add another vertex, any new edge will have to join the new vertex to one of the original $\displaystyle n-1$ vertices and the graph becomes connected.
So, are you saying that the answer to my question in post #1 is $\displaystyle \binom{n-1}{2}$?