ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • [더플러스수학] 수반행렬과 역행렬, 크래머 정리 -2
    수학과 공부이야기/선형대수학 2021. 9. 6. 20:58
    반응형

    연립일차방정식의 풀이 방법에는 '가우스소거법', '역행렬'과 '크래머 공식' 등이 있다. 우리는 앞에서 수반행렬을 통해 역행렬을 구하는 방법을 보았다. 이것을 이용하여 크래머 공식을 유도하고자 한다.

    간단한 연립방정식을 예를 들어 해를 구하고 그 과정에서 크래머 공식이 어떻게 쓰이는지 한 번 보자.

    \(\displaystyle \begin{cases} x+2y=7 \\ 2x+3y=1\end{cases}\)

    이것을 행렬로 나타내면

    \(\displaystyle \begin{pmatrix} 1&2\\2&3\end{pmatrix}\begin{pmatrix} x\\y\end{pmatrix}=\begin{pmatrix} 7\\1\end{pmatrix}\)

    \(\displaystyle A=\begin{pmatrix} 1&2\\2&3\end{pmatrix} \)라 하면 \(\displaystyle A\)가 가역이므로 양변에 \(\displaystyle A^{-1}\)을 곱하면

    \(\displaystyle A\begin{pmatrix} x\\y\end{pmatrix}=\begin{pmatrix} 7\\1\end{pmatrix}\) \(\displaystyle \Longleftrightarrow\)  \(\displaystyle \begin{pmatrix} x\\y\end{pmatrix}=A^{-1}\begin{pmatrix} 7\\1\end{pmatrix}\) 

    여기서 \(\displaystyle A^{-1} = \frac{1}{|A|} (adj A)\)이므로 

    \(\displaystyle A_{11}=3,~A_{12}=-2,~A_{21}=-2,~A_{22}=1\)

    \(\displaystyle \begin{align} A^{-1} &= \frac{1}{|A|} (adj A)= \frac{1}{|A|} \begin{pmatrix} A_{11}&A_{21}\\A_{12}&A_{22}\end{pmatrix} \\&= \frac{1}{|A|}  \begin{pmatrix} 3&-2\\-2&1\end{pmatrix} \end{align} \)

    따라서

    \(\displaystyle \begin{align}  \begin{pmatrix} x \\ y \end{pmatrix} &=A^{-1} \begin{pmatrix} 7\\ 1 \end{pmatrix} \\& =\frac{1}{|A|} \begin{pmatrix} A_{11}&A_{21}\\A_{12}&A_{22}\end{pmatrix}  \begin{pmatrix} 7 \\ 1 \end{pmatrix} \\&=\frac{1}{|A|}  \begin{pmatrix} \textcolor {red}{7} A_{12}+\textcolor{red}{1} A_{22} \\ \textcolor {red}{7} A_{11}+\textcolor{red}{1}A_{21}   \end{pmatrix} \end{align}\) 

    따라서 

    \(\displaystyle x = \frac{1}{|A|} \left(\textcolor {red}{7} A_{12}+\textcolor{red}{1} A_{22} \right) = \frac{\left|\begin{matrix} \textcolor{red}{7} &2\\\textcolor{red}{1} &3\end{matrix}\right|}{|A|}=\frac{\left|\begin{matrix} \textcolor{red}{7} &2\\\textcolor{red}{1} &3\end{matrix}\right|}{\left|\begin{matrix} 1&2\\2 &3\end{matrix}\right|} \),

    \(\displaystyle y = \frac{1}{|A|} \left(\textcolor {red}{7} A_{11}+\textcolor{red}{1} A_{21} \right) = \frac{\left|\begin{matrix} 1&\textcolor{red}{7} \\ 2&\textcolor{red}{1} \end{matrix}\right|}{|A|}=\frac{\left|\begin{matrix} 1&\textcolor{red}{7} \\ 2&\textcolor{red}{1}\end{matrix}\right|}{\left|\begin{matrix} 1&2\\2 &3\end{matrix}\right|} \)

    위의 예에서 보듯이 \(\displaystyle x\)값은 행렬 \(\displaystyle A\)의 첫번째 열에 상수 열을 넣은 행렬식을 행렬 \(\displaystyle A\)의 행렬식으로 나눈 값이고, \(\displaystyle y\)값은 행렬 \(\displaystyle A\)의 두 번째 열에 상수 열을 넣은 행렬식을 행렬 \(\displaystyle A\)의 행렬식으로 나눈 값이다. 이것을 일반화한 것이 크래머의 정리(Cramer's Rule)이다.

     

    정리1. 크래머의 공식 (cramer's rule)

    \(\displaystyle n \)개의 미지수 \(\displaystyle x_1 ,~x_2 ,~\cdots,~x_n \)에 대한 \(\displaystyle n\)개의 일차방정식으로 이루어진 연립일차방정식

    \(\displaystyle \begin{cases} a_{11}x_1 +a_{12} x_2 + \cdots+a_{1n} x_n = b_1 \\a_{21}x_1 +a_{22} x_2 + \cdots+a_{2n} x_n = b_2 \\ ~\vdots \\a_{n1}x_1 +a_{n2} x_2 + \cdots+a_{nn} x_n = b_n \end{cases} \)

    에서 계수행렬 \(\displaystyle A=(a_{ij})_{n \times n}\)이 정칙행렬일 때, 즉 \(\displaystyle |A| \neq 0\)일 때, 이 연립일차방정식은 오직 한 개의 해를 가지며, 그 \(\displaystyle \textcolor {red}{j}\)번 째 해는 다음과 같다.

    \(\displaystyle x_{\textcolor {red}{j} }= \frac{1}{|A|} \left|\begin{matrix} a_{11}&a_{12}&\cdots & \textcolor {red}{b_1} &\cdots&a_{1n} \\   a_{21}&a_{22}&\cdots & \textcolor {red}{b_2} &\cdots&a_{2n} \\ \vdots & \vdots&\cdots&\vdots &&\vdots \\a_{n1}&a_{n2}&\cdots & \textcolor {red}{b_n} &\cdots&a_{nn}  \end{matrix} \right| \)  (\(\displaystyle 1 \leq j \leq n \))

    (증명) 행렬 \(\displaystyle A=(a_{ij})_{n \times n},~X= \begin{bmatrix} x_1 \\x_2 \\ \vdots \\x_n \end{bmatrix},~B= \begin{bmatrix} bx_1 \\b\\ \vdots \\b_n \end{bmatrix}\)으로 놓으면 위의 연립방정식은 \(\displaystyle AX=B\)

    \(\displaystyle A\)는 정칙행렬이므로 방정식은 오직 하나의 해를 가진다. 그 해는

    \(\displaystyle X= A^{-1}B\)

    또, \(\displaystyle A^{-1}=\frac{1}{|A|} adj A \)이므로

    \(\displaystyle \begin{bmatrix} x_1 \\x_2 \\ \vdots \\x_n \end{bmatrix}= \frac{1}{|A|}  \begin{bmatrix} A_{11}&A_{21}&\cdots  &A_{n1} \\ A_{12}&A_{22}&\cdots  &A_{n2}  \\ \vdots & \vdots& &\vdots  \\  A_{1n}&A_{2n}&\cdots  &A_{nn} \end{bmatrix}\begin{bmatrix} b_1 \\ b_2 \\ \vdots \\b_n \end{bmatrix} \)

    성립한다. 예를 들어 \(\displaystyle x_1 \)의 값을 구해보면

    \(\displaystyle \begin{align} x_1 &=\frac{1}{|A|} \left\{ \textcolor {red}{b_{1}} A_{\textcolor {blue}{1}  1}+ \textcolor {red}{b_{2}} A_{\textcolor {blue}{2}1}+\textcolor {red}{b_{3}}A_{\textcolor {blue}{3}1}+\cdots+\textcolor {red}{b_{n}}A_{\textcolor {blue}{ n}1} \right\}\\&~~~~~~~~~~~~~~ \textcolor {red}{1}번째\\&=\frac{1}{|A|}\left| \begin{matrix}   \textcolor {red}{b_{1}}  &a_{12} &\cdots&a_{1n} \\\textcolor {red}{b_{2}}& a_{22} &\cdots&a_{2n} \\ \vdots&\vdots&&\vdots \\ \textcolor {red}{b_{n}}&a_{n2} &\cdots&a_{nn}\end{matrix}   \right| \end{align}  \)

    이제 \(\displaystyle x_{\textcolor {red}{j}} \)의 값을 구해보면

    \(\displaystyle \begin{align} x_{\textcolor {red}{j}} &=\frac{1}{|A|} \left\{ \textcolor {red}{b_{1}} A_{\textcolor{blue}{1} j}+ \textcolor {red}{b_{2}} A_{\textcolor{blue}{2}j}+\textcolor {red}{b_{3}}A_{\textcolor{blue}{3}j}+\cdots+\textcolor {red}{b_{n}}A_{\textcolor{blue}{n}j} \right\}\\&~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \textcolor {red}{j}번째\\& =\frac{1}{|A|}\left| \begin{matrix}      a_{11}&\cdots&\textcolor {red}{b_{1}}  & \cdots& \cdots&a_{1n} \\a_{21}&\cdots&\textcolor {red}{b_{2}}  & \cdots& \cdots&a_{2n}  \\ \vdots&\vdots&&\vdots \\ a_{n1}&\cdots&\textcolor {red}{b_{n}}  & \cdots& \cdots&a_{nn }\end{matrix}   \right| \end{align}  \) 

    즉, 이제 각 \(\displaystyle j\)에 대하여 \(\displaystyle A\)의 제 \(\displaystyle j\)의 열의 원소 \(\displaystyle a_{1j},~a_{2j},~\cdots ,~a_{nj}\) 대신에 각각 \(\displaystyle b_i ,~b_2 ,~\cdots,~b_n \)을 대입하여 얻은 행렬을 \(\displaystyle B_j \)로 나타내면,

    \(\displaystyle \left| B_j \right| = b_1 A_{1 \textcolor{red}{j}} + b_2 A_{2 \textcolor{red}{j}} + \cdots+ b_n A_{n \textcolor{red}{j}} \)

    이므로, 위의 정리가 증명된다.

     

    예제 1 크래머의 정리를 이용하여 다음 연립일차방정식의 해를 구하여라.

    (1) \(\displaystyle \begin{cases}3x_1 +x_2 =1\\5x_1 +2x_2 =4 \end{cases}\)

    (풀이) \(\displaystyle A=\begin{pmatrix} 3&1\\5&2\end{pmatrix}\)라 두면

    \(\displaystyle x_1 = \frac{\left|\begin{matrix} \textcolor{red}{1}&1\\\textcolor{red}{4}&2\end{matrix}\right|}{\left|\begin{matrix} 3&1\\5&2\end{matrix}\right|}=\frac{-2}{1}\),  \(\displaystyle x_2 = \frac{\left|\begin{matrix} 3&\textcolor{red}{1}\\5&\textcolor{red}{4}\end{matrix}\right|}{\left|\begin{matrix} 3&1\\5&2\end{matrix}\right|}=\frac{7}{1}=7\)

    (2) \(\displaystyle \begin{cases}7x_1 -x_2 +x_3 =0\\10x_1 -2x_2 -x_3 =8\\6x_2 +3x_2 +2x_3 =7 \end{cases}\)

    (풀이) 주어진 연립방정식의 계수행렬을 \(\displaystyle  A\)라 하면

    \(\displaystyle |A|=\left|\begin{matrix} 7&-1&1\\10&-2&-1\\6&3&2\end{matrix}\right| =61 \neq 0\)

    이므로, 오직 한 개의 해를 가진다. 한편,

    \(\displaystyle  \left|\begin{matrix} \textcolor {red}{0}&-1&1\\ \textcolor {red}{8}&-2&-1\\ \textcolor {red}{7}&3&2 \end{matrix}\right| =61  \) ,  \(\displaystyle  \left|\begin{matrix} 7&\textcolor {red}{0}&1\\ 10&\textcolor {red}{8}&-1\\ 6&\textcolor {red}{7}&2\end{matrix}\right| =183  \),  \(\displaystyle  \left|\begin{matrix} 7&-1&\textcolor {red}{0}\\ 10&8&\textcolor {red}{8}\\ 6&7&\textcolor {red}{7}\end{matrix}\right| =-244  \)

    크래머의 공식에 따라 해는 다음과 같다.

    \(\displaystyle x_1 = \frac{61}{61}=1, ~x_2 = \frac{183}{61}=3, ~x_1 = -\frac{244}{61}=-4\)

     

    반응형

    댓글

Designed by Tistory.