Why does the insertion-sort algorithm have a quadratic instead of a quasi-linear time complexity?
On an array of length $n$ which is reversely sorted, the first element would be compared to 0 elements, the second element to 1, the third element to 2, and so on. In total, the number of comparisons will be
$$
0 + 1 + 2 + \cdots + (n-1) = \\
\frac{1}{2} \bigl((0 + 1 + 2 + \cdots + (n-1)) + ((n-1) + \cdots + 2 + 1 + 0)\bigr) = \\
\frac{1}{2} \bigl((0 + (n-1)) + (1+(n-2)) + (2+(n-1)) + \cdots + ((n-1)+0)\bigr) = \\\
\frac{1}{2} \bigl(\underbrace{(n-1) + (n-1) + (n-1) + \cdots + (n-1)}_{\text{$n$ times}}\bigr) = \\
\frac{n(n-1)}{2}.
$$
This number scales like $n^2$.