end0tknr's kipple - web写経開発

太宰府天満宮の狛犬って、妙にカワイイ

線形代数 : 行列式とサラスの公式、そしてクラメル式によるn元1次連立方程式の解

「1次連立方程式の解」について「掃き出し法」は知ってましたが、 「クラメル式」は知らなかった(or すっかり忘れてた)のでメモ。

2次行列の行列式


  {\bf{A}} = 
  \left(
    \begin{array}{cc}
      {a} & {b} \\\
      {c} & {d}
    \end{array}
  \right)

について、  \displaystyle
  \left| \bf{A} \right| =  ad - bc

3次行列の行列式 (サラスの公式、4次以上もOK)

 \displaystyle
  \left| \bf{A} \right| =
  a_{11}a_{22}a_{33} + a_{12}a_{23}a_{31} + a_{13}a_{21}a_{32}
  - a_{13}a_{22}a_{31} - a_{11}a_{23}a_{32} - a_{12}a_{21}a_{33}

f:id:end0tknr:20170617090330p:plain

クラメル式によるn元1次連立方程式の解

 \displaystyle
  \left(
    \begin{array}{cccc}
      a_{11} & a_{12}  & \cdots  & a_{1n} \\\
      a_{21} & a_{22}  & \cdots  & a_{2n} \\\
      \vdots & \vdots  & \ddots  & \vdots \\\
      a_{n1} & a_{n2}  & \cdots  & a_{nn}
    \end{array}
  \right)
  \left(
    \begin{array}{c}
      x_{1} \\\
      x_{2} \\\
      \vdots \\\
      x_{n}
    \end{array}
  \right) =
  \left(
    \begin{array}{c}
      b_{1} \\\
      b_{2} \\\
      \vdots \\\
      b_{n}
    \end{array}
  \right)

 \displaystyle  \left| \bf{A} \right| ≠ 0 のとき、上記の解は次のように行列式により算出できる。

 \displaystyle
  \underline{
    x_i = \frac { \left| \bf{A_i} \right| }{ \left| \bf{A} \right| }
  }
 ただし、i = 1~n。 また、Aiは、次のようにi列目をbに置換したもの

 \displaystyle
  \left| \bf{A_i} \right| =
  \left|
    \begin{array}{cccccc}
      a_{11} & a_{12}  & \cdots  & b_{1}  & \cdots & a_{1n} \\\
      a_{21} & a_{22}  & \cdots  & b_{2}  & \cdots & a_{2n} \\\
      \vdots & \vdots  & \ddots  & \vdots &        & \vdots \\\
      a_{n1} & a_{n2}  & \cdots  & b_{n}  & \cdots & a_{nn}
    \end{array}
\right|