I am a novice at math and need help calculating the determinant of the Vandermonde matrix, which is:
$V=\begin{bmatrix} 1&a_1&a_1^2&\dots&a_1^{n-1}\\ 1&a_2&a_2^2&\dots&a_2^{n-1}\\ \vdots&\vdots&\vdots&\vdots&\vdots\\ 1&a_n&a_n^2&\dots&a_n^{n-1} \end{bmatrix}$
$det(V)={\displaystyle \prod_{1\le i\lt j\le n} (a_j-a_i)}$
I want to start with the following 3-by-3 and generalize to the n-by-n.
$A=\begin{bmatrix} 1&a_1&a_1^2\\ 1&a_2&a_2^2\\ 1&a_3&a_3^2 \end{bmatrix}$
So far I have:
$det(A) = a_2a_3(a_3-a_2)-a_1a_3(a_3-a_1)+a_1a_2(a_2-a_1)$
But I cannot figure out how to simplify this into a form like the determinant for $V$ above. What do I need to do?