## 2018年1月25日木曜日

### 数学 - Python - 線型代数 - 行列式 - 行列式の計算(ヴァンデルモンドの行列式、帰納法)

1. $\begin{array}{}\mathrm{det}\left(\begin{array}{ccc}1& 0& 0\\ {x}_{1}& {x}_{2}-{x}_{1}& {x}_{3}-{x}_{1}\\ {x}_{1}^{2}& {x}_{2}^{2}-{x}_{1}^{2}& {x}_{3}^{2}-{x}_{1}^{2}\end{array}\right)\end{array}=\left({x}_{2}-{x}_{1}\right)\left({x}_{3}^{2}-{x}_{1}^{2}\right)-\left({x}_{3}-{x}_{1}\right)\left({x}_{2}^{2}-{x}_{1}^{2}\right)\\ =\left({x}_{2}-{x}_{1}\right)\left({x}_{3}-{x}_{1}\right)\left({x}_{3}+{x}_{1}-{x}_{2}-{x}_{1}\right)\\ =\left({x}_{2}-{x}_{1}\right)\left({x}_{3}-{x}_{1}\right)\left({x}_{3}-{x}_{2}\right)$

2. $\begin{array}{}\mathrm{det}\left(\begin{array}{cccc}1& 1& \dots & 1\\ 0& {x}_{2}-{x}_{1}& & {x}_{n}-{x}_{1}\\ 0& {x}_{2}^{2}-{x}_{1}{x}_{2}& & {x}_{n}^{2}-{x}_{1}{x}_{n}\\ ⋮& ⋮& & ⋮\\ 0& {x}_{2}^{n-1}-{x}_{1}{x}_{2}^{n-2}& \dots & {x}_{n}^{n-1}-{x}_{1}{x}_{n}^{n-2}\end{array}\right)\end{array}=\prod _{j=1}^{n}\left({x}_{j}-{x}_{1}\right)\mathrm{det}\left(\begin{array}{ccc}1& ...& 1\\ ⋮& & ⋮\\ {x}_{2}^{n-2}& \dots & {x}_{n}^{n-2}\end{array}\right)\\ =\prod _{i

よって、帰納法により、2以上のすべての整数に対して成り立つ。

（証明終）

コード(Emacs)

Python 3

#!/usr/bin/env python3
from sympy import pprint, symbols, Matrix, zeros

for n in range(2, 6):
xs = symbols([f'x{i}' for i in range(1, n + 1)])
X = Matrix([[xs[j] ** i for j in range(n)]
for i in range(n)])
for t in [X, X.det().factor()]:
pprint(t)
print()
print()


$./sample11.py ⎡1 1 ⎤ ⎢ ⎥ ⎣x₁ x₂⎦ -x₁ + x₂ ⎡ 1 1 1 ⎤ ⎢ ⎥ ⎢x₁ x₂ x₃ ⎥ ⎢ ⎥ ⎢ 2 2 2⎥ ⎣x₁ x₂ x₃ ⎦ -(x₁ - x₂)⋅(x₁ - x₃)⋅(x₂ - x₃) ⎡ 1 1 1 1 ⎤ ⎢ ⎥ ⎢x₁ x₂ x₃ x₄ ⎥ ⎢ ⎥ ⎢ 2 2 2 2⎥ ⎢x₁ x₂ x₃ x₄ ⎥ ⎢ ⎥ ⎢ 3 3 3 3⎥ ⎣x₁ x₂ x₃ x₄ ⎦ (x₁ - x₂)⋅(x₁ - x₃)⋅(x₁ - x₄)⋅(x₂ - x₃)⋅(x₂ - x₄)⋅(x₃ - x₄) ⎡ 1 1 1 1 1 ⎤ ⎢ ⎥ ⎢x₁ x₂ x₃ x₄ x₅ ⎥ ⎢ ⎥ ⎢ 2 2 2 2 2⎥ ⎢x₁ x₂ x₃ x₄ x₅ ⎥ ⎢ ⎥ ⎢ 3 3 3 3 3⎥ ⎢x₁ x₂ x₃ x₄ x₅ ⎥ ⎢ ⎥ ⎢ 4 4 4 4 4⎥ ⎣x₁ x₂ x₃ x₄ x₅ ⎦ (x₁ - x₂)⋅(x₁ - x₃)⋅(x₁ - x₄)⋅(x₁ - x₅)⋅(x₂ - x₃)⋅(x₂ - x₄)⋅(x₂ - x₅)⋅(x₃ - x₄ )⋅(x₃ - x₅)⋅(x₄ - x₅)$