【笔记】范德蒙德矩阵
定义,形如下面的矩阵,其中 \(a_i\) 互不相同。
\[\begin{bmatrix}1&1&\cdots&1\\a_1&a_2&\cdots &a_n\\a_1^2 & a_2^n & \cdots& a_n^2\\\vdots&\vdots&\vdots&\vdots\\a_1^{n - 1}&a_2^{n - 1}&\cdots&a_n^{n - 1}\end{bmatrix}
\]
这个矩阵的行列式是
\[\det = \prod\limits_{i > j}(a_i- a_j)
\]
这个矩阵的逆矩阵 \(V\) 是
\[V_{i,j} = (-1)^{j + 1}(\sum\limits_{p_1<p_2<\cdots<p_{n-j}}\prod a_p ) / (\prod\limits_{x \ne i}(a_x - a_i))
\]
下面这个式子可以简单 DP 求得,时间复杂度 \(\mathcal{O}(N^2)\)。