Example 6 A class is using an electronic voting system to elect class officer candidates. All $k$ students in the class have the right to vote and be elected, and their numbers are $1,2, \cdots, k$. The rule is: press “1” for agreement, and press “0” for disagreement (including abstention). Let
$$
a_{i j}=\left\{\begin{array}{ll}
1, & \text { if the } i \text {th student agrees that the } j \text {th student should be elected, } \\
0, & \text { if the } i \text {th student disagrees that the } j \text {th student should be elected, }
\end{array}\right.
$$

where $i=1,2, \cdots, k$, and $j=1,2, \cdots, k$. The number of people who agree that both the 1st and 2nd students should be elected is ( ).
(A) $a_{11}+a_{12}+\cdots+a_{1 k}+a_{21}+a_{22}+\cdots+a_{2 k}$
(B) $a_{11}+a_{21}+\cdots+a_{k 1}+a_{12}+a_{22}+\cdots+a_{k 2}$
(C) $a_{11} a_{12}+a_{21} a_{22}+\cdots+a_{k 1} a_{k 2}$
(D) $a_{11} a_{21}+a_{12} a_{22}+\cdots+a_{1 k} a_{2 k}$
If the $i$-th student agrees to the 1st student being elected, then $a_{i 1}=1$. Similarly, if the $i$-th student agrees to the 2nd student being elected, then $a_{i 2}=1$. If the $i$-th student agrees to both the 1st and 2nd students being elected, then $a_{i 1} a_{i 2}=1$. Therefore, the number of students who agree to both the 1st and 2nd students being elected is $a_{11} a_{12} + a_{21} a_{22} + \cdots + a_{k 1} a_{k 2}$. The conclusion is $\mathrm{C}$.