Given distinct complex numbers $$a_1,a_2,a_3$$, the following is always true:

$$\frac{1}{\left(a_1-a_2\right)\left(a_1-a_3\right)}+\frac{1}{\left(a_2-a_1\right)\left(a_2-a_3\right)}+\frac{1}{\left(a_3-a_1\right)\left(a_3-a_2\right)}=0$$

It's fairly straightforward to prove, by combining the terms under a common denominator. However there's a generalization of this identity:

$$\sum_{i=1}^k\prod_{j\neq i}\frac{1}{a_i-a_j}=0$$ where the $$a_i\mathrm{\'s}$$ are all distinct complex numbers, and $$k$$ is obviously a natural number $$\geq 2$$.

I know a quick, simple way of proving this generalized identity using a closed contour integration through the complex plane, which I'm willing to share if anyone's interested. However I remember a long time ago this math genius I once knew showed me a divinely clever way of proving it with matrices. I'm pretty sure from memory it's related to diagonalization and from there it's likely a comparison of traces, but the most I've personally been able to get by such methods is a completely obvious, trivial result. So would any of the math whizzes here have any idea how I could prove this via a clever application of matrices?

I believe this problem was once given in a Putnam Prize competition, but I don't have any more info than that. The identity looks similar at a glance to the Vandermonde matrix determinant, but I don't see any meaningful connection upon closer inspection. Does anyone know what this identity is called or where I can find more info on it? Anyone have yet another way of proving it?