Let $n$ be a positive integer and let $(a_1,...,a_n)$ be a permutation of $\{1,2,...,n\}$. Define $$A_k = \{ a_i | a_i < a_k, i >k\} \\ B_k = \{a_i | a_i > a_k, i < k\}$$ for $1 \leq k \leq n$. Prove that $\sum^{n}_{k=1} |A_k| = \sum^{n}_{k=1} |B_k|$.
The problem confuses me a bit. It asks to prove that both sets will have the same cardinality, but for example, if I choose $n = 10$ and $k = 4$, for the $A_k$ part I will have $i > k$, which means $5...10$, so I have $6$ elements, while in the set $B_k$, I have $i < k$, so I will have $1...3$, meaning $4$ elements. Am I interpreting the problem correctly, if not, can someone improve and help?