概要
ここでは、与えられた正方行列の逆行列を求める方法と具体的な計算例を記載する。
なお、公式の証明は線形代数の専門書を参照すること。
正則な行列
正則行列とは、正方行列Aについて、構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle AB = BA = I}
(単位行列) となる行列Bが存在する時、Aを正則行列という。
# 正則行列の例:
構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle A = \begin{pmatrix} 1 & 2 \\ 1 & 3 \end{pmatrix}}
について考える。
逆行列 構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle B = \begin{pmatrix} 3 & -2 \\ 1 & 1 \end{pmatrix}}
構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle AB = BA = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}}
となる。
したがって、Aは正則行列である。
# 正則でない行列の例:
構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle A = \begin{pmatrix} 0 & 0 \\ 1 & 1 \end{pmatrix}}
について考える。
Bをどのようにとっても、行列Aと行列Bの積の左上成分は0になるため、単位行列にはならない。
したがって、行列Aは正則ではない。
正則行列の判定法
定理1:
Aが正則
例題:
構文解析に失敗 (Conversion error. Server ("https://wikimedia.org/api/rest_") reported: "Cannot get mml. Server problem."): {\displaystyle {\begin{pmatrix}1&2\\1&3\end{pmatrix}}}
は正則か?
Aの行列式を計算すると、1となる。
となるので、行列Aは正則である。
2×2行列の場合
の逆行列は、構文解析に失敗 (Conversion error. Server ("https://wikimedia.org/api/rest_") reported: "Cannot get mml. Server problem."): {\displaystyle A^{-1}={\frac {1}{ad-bc}}{\begin{pmatrix}d&-b\\-c&a\end{pmatrix}}}
逆行列の求め方 1 : 余因子を用いる
余因子を用いる方法では、行列式についての知識を前提とする。
Aの逆行列のij成分は、
ただし、detAはAの行列式である。
また、Δijは、Aのi行目とj列目を除いた行列の行列式を、(−1)i+j倍したものである。(余因子)
例題
の逆行列を求めよ。
解答
まず、Aの行列式を計算する。
次に、余因子を計算する。
構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \Delta_{11}=(-1)^{2} \begin{vmatrix} 0 & 1 \\ 2 & 1 \end{vmatrix} = -2 \qquad \qquad \Delta_{12}=(-1)^{3} \begin{vmatrix} -2 & 1 \\ 0 & 1 \end{vmatrix} = 2 \qquad \qquad \Delta_{13}=(-1)^{4} \begin{vmatrix} -2 & 0 \\ 0 & 2 \end{vmatrix} = -4 }
構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \Delta_{21}=(-1)^{3} \begin{vmatrix} 1 & -1 \\ 2 & 1 \end{vmatrix} = -3 \qquad \qquad \Delta_{22}=(-1)^{4} \begin{vmatrix} 1 & -1 \\ 0 & 1 \end{vmatrix} = 1 \qquad \qquad \Delta_{23}=(-1)^{5} \begin{vmatrix} 1 & 1 \\ 0 & 2 \end{vmatrix} = -2 }
構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \Delta_{31}=(-1)^{4} \begin{vmatrix} 1 & 1 \\ 0 & 1 \end{vmatrix} = 1 \qquad \qquad \Delta_{32}=(-1)^{5} \begin{vmatrix} 1 & -1 \\ -2 & 1 \end{vmatrix} = 1 \qquad \qquad \Delta_{33}=(-1)^{6} \begin{vmatrix} 1 & 1 \\ -2 & 0 \end{vmatrix} = 2 }
Δ11からΔ33より、余因子行列Δは以下となる。
構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \Delta = \begin{pmatrix} -2 & 2 & -4 \\ -3 & 1 & -2 \\ 1 & 1 & 2 \end{pmatrix}}
余因子行列Δを転置する。
構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \Delta^{T} = \begin{pmatrix} -2 & -3 & 1 \\ 2 & 1 & 1 \\ -4 & -2 & 2 \end{pmatrix}}
したがって、逆行列A-1は次のようになる。
構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle A^{-1} = \frac{\Delta^{T}}{\det A} = \frac{1}{4} \begin{pmatrix} -2 & -3 & 1 \\ 2 & 1 &1 \\ -4 & -2 & 2 \end{pmatrix} = \begin{pmatrix} - \frac{1}{2} & - \frac{3}{4} & \frac{1}{4} \\ \frac{1}{2} & \frac{1}{4} & \frac{1}{4} \\ -1 & - \frac{1}{2} & \frac{1}{2} \end{pmatrix}}
逆行列の求め方 2:掃き出し法
単位行列をEとする。
横長の行列AEに、行基本変形を繰り返して行列EBになるとき、BはAの逆行列である。
行基本変形とは、以下の3つの操作である。
- 操作1 : 任意の行を定数倍する。
- 操作2 : 2つの行を交換する。
- 操作3 : 任意の行の定数倍を別の行に加える。
例題
構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle A = \begin{pmatrix} 1 & 1 & -1 \\ -2 & 0 & 1 \\ 0 & 2 & 1 \end{pmatrix}}
の逆行列を求めよ。
構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle (AI) = \begin{pmatrix} 1 & 1 & -1 & 1 & 0 & 0 \\ -2 & 0 & 1 & 0 & 1 & 0 \\ 0 & 2 & 1 & 0 & 0 & 1 \end{pmatrix}}
行基本変形を適用して、行列の左半分を単位行列Eにしたとき、行列の右半分が逆行列Bである。
まず、1列目を見て、1行目の2倍を2行目に加える。
構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \begin{pmatrix} 1 & 1 & -1 & 1 & 0 & 0 \\ 0 & 2 & -1 & 2 & 1 & 0 \\ 0 & 2 & 1 & 0 & 0 & 1 \end{pmatrix}}
次に、2列目の第2成分以外に0を並べるように、操作3を行う。
構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \begin{pmatrix} 1 & 0 & - \frac{1}{2} & 0 & - \frac{1}{2} & 0 \\ 0 & 2 & -1 & 2 & 1 & 0 \\ 0 & 0 & 2 & -2 & -1 & 1 \end{pmatrix}}
同様に,三列目(の第3成分以外)に 0 を並べるように操作3を行う:
構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \begin{pmatrix} 1 & 0 & 0 & - \frac{1}{2} & - \frac{3}{4} & \frac{1}{4} \\ 0 & 2 & 0 & 1 & \frac{1}{2} & \frac{1}{2} \\ 0 & 0 & 2 & -2 & -1 & 1 \end{pmatrix}}
最後に、操作2を2行目と3行目に適用して、行列の左半分を単位行列にする。
構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \begin{pmatrix} 1 & 0 & 0 & - \frac{1}{2} & - \frac{3}{4} & \frac{1}{4} \\ 0 & 1 & 0 & \frac{1}{2} & \frac{1}{4} & \frac{1}{4} \\ 0 & 0 & 1 & -1 & - \frac{1}{2} & \frac{1}{2} \end{pmatrix}}
このとき、行列の右半分が、A−1である。
したがって、構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle A^{-1} = \begin{pmatrix} - \frac{1}{2} & - \frac{3}{4} & \frac{1}{4} \\ \frac{1}{2} & \frac{1}{4} & \frac{1}{4} \\ -1 & - \frac{1}{2} & \frac{1}{2} \end{pmatrix}}
となる。