[선형대수] Lecture 3: Multiplication and inverse matrices

이재호·2025년 2월 27일

선형대수

목록 보기
3/31

https://ocw.mit.edu/courses/18-06-linear-algebra-spring-2010/video_galleries/video-lectures/

먼저, 이전 강의에서 진행한 내용을 복습해보자.

[Ai,1Ai,2Ai,3]A[B1,jB2,jB3,j]B =[Ci,j]C\underbrace{ \begin{bmatrix} - & - & - \\ A_{i, 1} & A_{i, 2} & A_{i, 3} \\ - & - & - \end{bmatrix} }_{A} \underbrace{ \begin{bmatrix} - & B_{1, j} \\ - & B_{2, j} \\ - & B_{3, j} \end{bmatrix} }_{B} \ = \underbrace{ \begin{bmatrix} - & - \\ - & C_{i,j} \\ - & - \end{bmatrix} }_{C}

AB=CAB = C 행렬식에서 Ci,jC_{i, j}의 값은 어떻게 구할 수 있을까?
Ci,jC_{i, j}는 다음과 같이 구할 수 있다.

Ci,j=(rowi of A)(colj of B)C_{i, j} = (row_i \ of \ A) \cdot (col_j \ of \ B)
=ai,1b1,j+ai,2b2,j+...+ai,nbn,j= a_{i, 1}b_{1, j} + a_{i, 2}b_{2, j} + ... + a_{i, n}b_{n, j}
=k=1nai,kbk,j= \sum_{k=1}^n{a_{i, k}b_{k, j} }

그렇다면 위 수식을 보고, AB=CAB = C를 만족하기 위한 각 행렬의 사이즈를 생각해보자.

  • 만약 AA의 사이즈가 m×nm \times n이라면, BB의 사이즈는 n×pn \times p이어야 한다. 따라서 CC의 사이즈는 m×pm \times p가 된다.
[]A[]B =[]C\underbrace{ \begin{bmatrix} - & - & - \\ - & - & - \\ - & - & - \end{bmatrix} }_{A} \underbrace{ \begin{bmatrix} - & - \\ - & - \\ - & - \end{bmatrix} }_{B} \ = \underbrace{ \begin{bmatrix} - & - \\ - & - \\ - & - \end{bmatrix} }_{C}

또한, AB=CAB = C는 다음과 같이 해석할 수 있다.

  • colj of C=A(colj of B)col_j \ of \ C = A \cdot (col_j \ of \ B)
    []A[]colj of B =[]colj of C\underbrace{ \begin{bmatrix} - & - & - \\ - & - & - \\ - & - & - \end{bmatrix} }_{A} \cdot \underbrace{ \begin{bmatrix} - \\ - \\ - \end{bmatrix} }_{col_j \ of \ B} \ = \underbrace{ \begin{bmatrix} - \\ - \\ - \end{bmatrix} }_{col_j \ of \ C}
  • rowi of C=(rowi of A)Brow_i \ of \ C = (row_i \ of \ A)\cdot B
    []rowi of A[]B =[]rowi of C\underbrace{ \begin{bmatrix} - & - & - \end{bmatrix} }_{row_i \ of \ A} \cdot \underbrace{ \begin{bmatrix} - & - \\ - & - \\ - & - \end{bmatrix} }_{B} \ = \underbrace{ \begin{bmatrix} - & - \end{bmatrix} }_{row_i \ of \ C}

그렇다면 col of A×row of Bcol \ of \ A \times row \ of \ B는 어떨까?
이때 사이즈는 (m×1)×(1×p)(m \times 1) \times (1 \times p)와 같다.

예를 들어서 다음 행렬식을 계산해보자.

[234][16]\begin{bmatrix} 2 \\ 3 \\ 4 \end{bmatrix} \begin{bmatrix} 1 & 6 \end{bmatrix}

위 행렬식을 계산하면 결과는 다음과 같다.

[234][16] =[212318424]\begin{bmatrix} 2 \\ 3 \\ 4 \end{bmatrix} \begin{bmatrix} 1 & 6 \end{bmatrix} \ = \begin{bmatrix} 2 & 12 \\ 3 & 18 \\ 4 & 24 \end{bmatrix}

따라서 AB=CAB = C에서, AB=sum of (cols of A×rows of B)AB = sum\ of\ (cols\ of\ A \times rows\ of\ B)라고 해석이 가능하다.
그렇다면 좀더 복잡한 행렬로 생각해보자.

[273849][1600]\begin{bmatrix} 2 & 7 \\ 3 & 8 \\ 4 & 9 \end{bmatrix} \begin{bmatrix} 1 & 6 \\ 0 & 0 \end{bmatrix}

위 행렬식을 계산하면 결과는 다음과 같다.

[273849][1600] =[234][16]+[789][00] =[212318424]+[000000] =[212318424]\begin{bmatrix} 2 & 7 \\ 3 & 8 \\ 4 & 9 \end{bmatrix} \begin{bmatrix} 1 & 6 \\ 0 & 0 \end{bmatrix} \ = \begin{bmatrix} 2 \\ 3 \\ 4 \end{bmatrix} \begin{bmatrix} 1 & 6 \end{bmatrix} + \begin{bmatrix} 7 \\ 8 \\ 9 \end{bmatrix} \begin{bmatrix} 0 & 0 \end{bmatrix} \ = \begin{bmatrix} 2 & 12 \\ 3 & 18 \\ 4 & 24 \end{bmatrix} + \begin{bmatrix} 0 & 0 \\ 0 & 0 \\ 0 & 0 \end{bmatrix} \ = \begin{bmatrix} 2 & 12 \\ 3 & 18 \\ 4 & 24 \end{bmatrix}

AB=sum of (cols of A×rows of B)AB = sum\ of\ (cols\ of\ A \times rows\ of\ B)을 통해서 계산하니 직관적으로 계산이 가능해짐을 알 수 있다.
또한, 이를 행렬의 원소 단위가 아닌 행렬 그 자체인 블록 단위의 연산으로도 적용할 수도 있다.
ex.

[A1A2A3A4]A[B1B2B3B4]B =[A1B1+A2B3]C\underbrace{ \begin{bmatrix} A_1 & A_2 \\ A_3 & A_4 \end{bmatrix} }_A \underbrace{ \begin{bmatrix} B_1 & B_2 \\ B_3 & B_4 \end{bmatrix} }_B \ = \underbrace{ \begin{bmatrix} A_1B_1+A_2B_3 & - \\ - & - \end{bmatrix} }_C

이제 Inverse Matrix(역행렬)를 알아보자.
수식은 다음과 같다.

A1A=I=AA1A^{-1}A = I = AA^{-1}

즉, 행렬 AA에 대해서 어떤 행렬을 곱했을 때, identity matrix인 II가 나오도록 하는 행렬이 AA의 역행렬 A1A^{-1}이다.

다만 A1A=I=AA1A^{-1}A = I = AA^{-1} 을 만족하려면 중요한 전제 조건이 있다.
바로, 행렬 AA의 역행렬이 존재한다는 전제 조건이다.

행렬 AA역행렬이 존재한다. = 행렬 AAinvertible 행렬이다. = 행렬 AAnon-singular 행렬이다.

그렇다면, singular 행렬은 어떤 경우에 해당될까? 예시와 함께 살펴보자.
ex.

A=[1326]A = \begin{bmatrix} 1 & 3 \\ 2 & 6 \end{bmatrix}

위에서 행렬 AA는 singular matrix다. 왜 그럴까?

  • determination을 하면 0이 나온다.
  • 만약 AA에 어떤 행렬 BB를 곱해서 CC 행렬을 구한다고 할 때, CC의 모든 행,열은 AA의 행,열의 배수꼴로 나타난다.

즉, 강의에서는 다음과 같은 한 마디로 행렬 AA가 singular matrix라고 정의한다.

We can find a vector X with Ax = 0. (in x != 0)

예를 들어 살펴보자.

Ax=[1326][] =[00]Ax= \begin{bmatrix} 1 & 3 \\ 2 & 6 \end{bmatrix} \begin{bmatrix} - \\ - \end{bmatrix} \ = \begin{bmatrix} 0 & 0 \end{bmatrix}

위 행렬식에서 벡터 xx에 어떤 값을 넣으면 위 식을 만족할까? 아마도 다음과 같은 값으로 넣으면 될 것이다.

Ax=[1326][31] =[00]Ax= \begin{bmatrix} 1 & 3 \\ 2 & 6 \end{bmatrix} \begin{bmatrix} 3 \\ -1 \end{bmatrix} \ = \begin{bmatrix} 0 & 0 \end{bmatrix}

그렇다면 Ax=0Ax = 0 행렬식에서 다음과 같이 접근해보자.

Ax=0Ax = 0
A1Ax=A10A^{-1}Ax = A^{-1}0
Ix=0Ix = 0
x=0x = 0

분명 xx[31]\begin{bmatrix}3 \\ -1\end{bmatrix}이라고 확인했는데, x=0x = 0이 나왔다. 따라서 이는 모순이 되고,
행렬 AA는 not inevertible(=sigular)하다고 할 수 있다.


그렇다면 역행렬은 어떻게 구할 수 있을까?
예시를 살펴보자.

[1327]A[]A1 =[1001]I\underbrace{ \begin{bmatrix} 1 & 3 \\ 2 & 7 \end{bmatrix} }_A \underbrace{ \begin{bmatrix} - & - \\ - & - \end{bmatrix} }_{A^{-1}} \ = \underbrace{ \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} }_I

위 행렬식을 보고 A1A^{-1}을 바로 구하기는 쉽지 않다.
따라서 Gauss-Jordan 방법을 활용해야 한다.

먼저, 다음과 같이 행렬을 만든다.

[13102701]AI\underbrace{ \begin{bmatrix} \begin{array}{cc|cc} 1 & 3 & 1 & 0 \\ 2 & 7 & 0 & 1 \end{array} \end{bmatrix} }_{A|I}

그러고 나서 elimination(소거)를 시작한다.

[13102701]A  Ir22r1[13100121]r13r2[10730121]I  ?\underbrace{ \begin{bmatrix} \begin{array}{cc|cc} 1 & 3 & 1 & 0 \\ 2 & 7 & 0 & 1 \end{array} \end{bmatrix} }_{A \ | \ I} \underbrace{ \rightarrow }_{r_2 - 2r_1} \begin{bmatrix} \begin{array}{cc|cc} 1 & 3 & 1 & 0 \\ 0 & 1 & -2 & 1 \end{array} \end{bmatrix} \underbrace{ \rightarrow }_{r_1-3r_2} \underbrace{ \begin{bmatrix} \begin{array}{cc|cc} 1 & 0 & 7 & -3 \\ 0 & 1 & -2 & 1 \end{array} \end{bmatrix} }_{I \ | \ ?}

즉, 가우스-조던 방법을 거쳐서,

E[A  I]=[I  ?]E[A \ | \ I] = [I \ | \ ?]

형태로 변환하였다.
그리고 다음과 같은 추론을 통해 ??A1A^{-1}임을 알 수 있다.

EA=IEA = I
EAA1=IA1EAA^{-1} = IA^{-1}
E=A1E = A^{-1}

따라서,

?=EI=E=A1? = EI = E = A^{-1}
profile
천천히, 그리고 꾸준히.

0개의 댓글