[LA] Inverse Matrix

2025. 1. 25. 17:27·.../Linear Algebra
728x90
728x90

1. Inverse Matrix and Linear System

Linear Algebra 의 가장 기본적인 응용은 Linear System (선형연립방정식)을 푸는 용도임.

다음은 Linear System의 Matrix Equation임.

$$A\mathbf{x}=\mathbf{b}$$

 

Inverse는 이 Linear System의 Solution $\mathbf{x}$를 어찌보면 가장 기본적으로 푸는 방법이라고 볼 수 있음: 

$$\begin{aligned} A\mathbf{x} &= \mathbf{b} \\ A^{-1}A\mathbf{x} &= A^{-1}\mathbf{b} \\ I \mathbf{x} &= A^{-1}\mathbf{b} \\ \mathbf{x} &= A^{-1}\mathbf{b} \end{aligned}$$

더보기

2024.02.16 - [.../Linear Algebra] - [LA] Linear Equation (선형 방정식) and Linear System 정리.

 

[LA] Linear Equation (선형 방정식) and Linear System 정리.

Linear Equationlinear equation(선형 방정식)은variables(변수들) $x_1, \cdots, x_n$에 대한 equation(방정식)으로,$a_1, \cdots, a_n$와 같은 real (or complex) scalar coefficients(계수들, weights) 와real (or complex) scalar $b$를 사용

dsaint31.tistory.com

2024.02.17 - [.../Linear Algebra] - [LA] Existence and Uniqueness Theorem

 

[LA] Existence and Uniqueness Theorem

Consistent Linear System만약 Linear system이 consistent하다는 애기는 다음과 equivalent임.해당 system의 augmented matrix에서 pivot column vector가 맨 오른쪽의 column이 되는 경우가 없음.이는 REF (row echelon form)로 augment

dsaint31.tistory.com



2. 실제 사용되는 방법.

하지만 사실 Inverse를 구하는 것은 다음과 같은 이유로 쉬운 일이 아님.

  • 매우 계산복잡도가 높고
  • ill-conditioned matrix등에서는 수치적인 불안정성.

2-1. Linear System (연립방정식)에서 solution을 구하는 경우 

때문에 inverse를 직접 구하기보다는 다음의 방법들을 사용하여 직접 Solution을 구함:

  • LU Decomposition
    • 여러 $\mathbf{b}$ 에 대해 반복 계산이 필요한 경우 사용됨.
    • 연립방정식 반복 계산
  • Gaussian Elimination
    • 일반적인 연립방정식 풀이에 가장 많이 애용됨.
    • 사실 LU Decomposition 과 같은 방법임:
      • Gaussian Elimination이 대수적 방법으로 푸는 것이라면,
      • 이를 matrix의 곱으로의 처리하여 푸는 것이 LU Decomposition 임.
    • Identity Matrix 를 오른쪽에 붙인 Augmented Matrix를 RREF로 만드는 Gaussian-Jordan Elimination 도 본질적으로는 같음 (사용자 입장에서는)
  • QR Decomposition
    • 매우 높은 수치적 안정성을 제공하여 고정밀 계산에 유리.
    • Least Square Method 등에.
더보기

2024.02.17 - [.../Linear Algebra] - [LA] Gauss-Jordan Elimination (including Gauss Elimination) and LU Factorization

 

[LA] Gauss-Jordan Elimination (including Gauss Elimination) and LU Factorization

System of Linear Equations (연립방정식)의 Solution를 구하는 가장 표준적인 방법.Gauss Elimination을 좀 더 보강한 방법(컴퓨터 없이 연립일차방정식 계산할 경우 가장 일반적으로 사용됨)System의 Augmented Matr

dsaint31.tistory.com

2025.01.26 - [.../Linear Algebra] - [LA] Gram-Schmidt Process and QR Decomposition

 

[LA] Gram-Schmidt Process and QR Decomposition

Gram-Schmidt Process는 임의의 Subspace $W$에서 Orthogonal Basis를 찾는 과정임. 0. Pre-Requirements우선 다음을 기억하자Basis에 속하는 Vector들로 Span 하면, Subppace $W$ 내의 모든 Vector를 표현가능!Basis 에 속하는

dsaint31.tistory.com


2-2. Inverse 그 자체를 구하는 방법

보통 Regular Matrix (=Invertible Matrix)에서는

Inverse는 Cramer's Rule에 기반하여 구할 수 있으나 이는 계산복잡도가 $O(n!)$이라 거의 사용되지 않음.

일반적으로는 LU Decomposition 등을 사용함.

 

Non-Square Matrix나 ill-Conditioned matrix의 경우엔 Pseuod Inverse를 사용하며 이 경우는 주로 SVD를 이용함.

2024.02.15 - [.../Math] - [LA] Singular Value Decomposition (특이값분해, SVD)

 

[LA] Singular Value Decomposition (특이값분해, SVD)

Singular Value Decomposition$$A=U\Sigma V^\top$$Rank가 $n$인 matrix $A\in \mathbb{R}^{m\times n}\text{ where }m\ge n$ 에서orthonormal vector set$\{\textbf{v}_1, \dots, \textbf{v}_n\}, \{\textbf{u}_1, \dots \textbf{u}_n\}$ 와non-negative scalr set $\{\

dsaint31.tistory.com

 

더보기

2022.12.02 - [.../Math] - [Math] ill-posed, well-posed, ill-conditioned, well-conditioned matrix (or problem)

 

[Math] ill-posed, well-posed, ill-conditioned, well-conditioned matrix (or problem)

well-posed matrix and well-conditioned matrix$A\textbf{x}=\textbf{b}$와 같은 Linear System (연립방정식)에서 system matrix $A$가 invertible하다면 해당 linear system(달리 말하면 연립방정식)이 well-posed라고 할 수 있다.하지

dsaint31.tistory.com

 


3. Types of Inverses

3-1. (Full) Inverse: $A^{-1}$ 

Inverse는 다음을 만족해야함.

$$A^{-1}A = AA^{-1} = I$$

  • 이를 위해서는 $A$가 (Square) Full-Rank Matrix 여야 함.
    • 사실 Full Rank는 항상 Square Matrix에서만 가능하므로, 그냥 Full-Rank Matrix라고 불러도 됨.
  • $\det (A) \ne 0$ 로 inverse 존재 유무를 확인할 수 있음.

3-2. One-Sided Inverse

Left Inverse $L$와 Right Inverse $R$가 있음:

$$ LA = I \ne AL \\ AR = I \ne RA$$

Non-Square Matrix에서 사용되는 Inverse임: $m$가 행의 수, $n$이 열의 수.

  • $m>n$: Full Column Rank ($\text{rank }A = n$)인 경우 Left Inverse를 가짐.
  • $m<n$: Full  Row Rank ($\text{rank }A = m$)인 경우 Right Inverse를 가짐.

일반적으로 ML 등에서는 row(행)이 column(열)보다 훨씬 크므로 Left Inverse가 보다 많이 사용됨: Overdetermined System.

$$ \begin{aligned} A \mathbf{x} &= \mathbf{b} \\ A^\top A \mathbf{x} &= A^\top \mathbf{b} \\ (A^\top A)^{-1} A^\top A \mathbf{x} &= (A^\top A)^{-1} A^\top \mathbf{b}  \\ I \mathbf{x} &= \color{red}{(A^\top A)^{-1} A^\top} \mathbf{b} \end{aligned}$$

column이 row가 보다 큰 경우는 Right Inverse를 사용함: Underdetermiend System.

$$\begin{aligned}  \mathbf{x}^\top A&= \mathbf{b}^\top \\ \mathbf{x}^\top A A^\top &= \mathbf{b}^\top A^\top \\ \mathbf{x}^\top A A^\top (A A^\top)^{-1} &= \mathbf{b}^\top A^\top (A A^\top)^{-1} \\ \mathbf{x}^\top I &= \mathbf{b}^\top \color{red}{A^\top (A A^\top)^{-1}} \end{aligned}$$

 

Square matrix가 아님에도 구해지지만, Full column rank 또는 Full row rank 인 경우의 제한이 있음.

Left inverse와 right inverse 모두 Moore-Penrose pseudoinverse와 동일함(full column rank나 full row rank 인 경우에 제한됨을 기억할 것)

$(AA^\top)^{-1}$와 $(A^\top A)^{-1}$가 존재하려면 각각 full row rank, full column rank가 되어야 함을 주의할 것!

 

2024.07.08 - [.../Linear Algebra] - [LA] Rank: matrix의 속성

 

[LA] Rank: matrix의 속성

Definition: Rank ← matrix 속성The rank of a matrix $A$, denoted by rank $A$,is the dimension of the column space of $A$.Matrix를 이루는 column vectors에서 linearly independent 인 것들의 수를 의미 row space의 dimension 의 경우를 강

dsaint31.tistory.com


3-3. Pseudo-Inverse

어느 경우나 유일하게 구할 수 있음 ( singular matrix인 경우 포함 )

Singular Matrix의 경우, Pseudoinverse와 곱하면 완벽한 Identity Matrix는 아니나 거의 비슷한 값을 가지는 Matrix가 구해짐.

즉, Rank-Deficient Matrix에서는 Pseudo-Inverse를 사용함.

보통 사용되는 Pseudoinverse는  Moore-Penrose Pseudo-Inverse이며 Singular Value Decomposition (SVD)에 기반함.

2022.12.02 - [.../Math] - [LA] Pseudoinverse Matrix (수정중)

 

[LA] Pseudoinverse Matrix (수정중)

Pseudo-Inverse (Moore-Penrose Pseudoinverse)Moore-Penrose Pseudoinverse는 일반적인 행렬에서 정의되어 inverse matrix처럼 사용가능한 개념 으로,inverse가 full rank square matrix에만 정의되는 것과 달리,square matrix가 아니

dsaint31.tistory.com

 


같이 보면 좋은 자료

2024.04.03 - [.../Linear Algebra] - [LA] Determinant (행렬식)

 

[LA] Determinant (행렬식)

Matrix는 일종의 Linear transform을 의미함.Linear transform을 의미하는 matrix 들 중에서,Square Matrix에서 구해지는 Determinant는 해당하는 Linear transform의 특성을 나타내는 scalar 임. square matrix가 의미하는 line

dsaint31.tistory.com

2025.01.25 - [.../Linear Algebra] - [LA] Intermediate Matrices for Inverting Square Full-Rank Matrix

 

[LA] Intermediate Matrices for Inverting Square Full-Rank Matrix

Square Full-Rank Matrix의 Inverse를 Cramer's rule에 기반하여 구하는 방식은 실제 inverse를 구하는 용도로는 많이 사용되지는 않는다.재귀적 방식인지라, 대상이 되는 Square Matrix의 크기가 커질 경우 매우

dsaint31.tistory.com


2025.01.21 - [.../Linear Algebra] - [Summary] Linear Algebra (작성중)

 

[Summary] Linear Algebra (작성중)

ML 을 위해 Linear Algebra 공부시 참고할만한 책더보기전체적으로 공부를 한다면 다음을 권함.Linear Algebra and Its Application, 5th ed 이상, David C. Lay5th ed. 는 웹에서 쉽게 pdf도 구할 수 있음.개인적으로 Str

dsaint31.tistory.com


 

728x90

'... > Linear Algebra' 카테고리의 다른 글

[LA] 예제: LU Factorization (or LU Decomposition) 와 Gauss Elimination  (0) 2025.01.27
[LA] Gram-Schmidt Process and QR Decomposition  (0) 2025.01.26
[LA] Intermediate Matrices for Inverting Full-Rank Matrix: Cramer's Rule  (0) 2025.01.25
[LA] Quadratic Form and Positive/Negative Definite  (0) 2025.01.24
[Summary] Linear Algebra (작성중)  (0) 2025.01.21
'.../Linear Algebra' 카테고리의 다른 글
  • [LA] 예제: LU Factorization (or LU Decomposition) 와 Gauss Elimination
  • [LA] Gram-Schmidt Process and QR Decomposition
  • [LA] Intermediate Matrices for Inverting Full-Rank Matrix: Cramer's Rule
  • [LA] Quadratic Form and Positive/Negative Definite
dsaint31x
dsaint31x
    반응형
    250x250
  • dsaint31x
    Dsaint31's blog
    dsaint31x
  • 전체
    오늘
    어제
    • 분류 전체보기 (787)
      • Private Life (15)
      • Programming (206)
        • DIP (116)
        • ML (35)
      • Computer (120)
        • CE (54)
        • ETC (33)
        • CUDA (3)
        • Blog, Markdown, Latex (4)
        • Linux (9)
      • ... (368)
        • Signals and Systems (115)
        • Math (176)
        • Linear Algebra (33)
        • Physics (43)
        • 인성세미나 (1)
      • 정리필요. (61)
        • 의료기기의 이해 (6)
        • PET, MRI and so on. (7)
        • PET Study 2009 (1)
        • 방사선 장해방호 (5)
        • 방사선 생물학 (3)
        • 방사선 계측 (9)
        • 기타 방사능관련 (3)
        • 고시 (9)
        • 정리 (18)
      • RI (0)
      • 원자력,방사능 관련법 (2)
  • 블로그 메뉴

    • Math
    • Programming
    • SS
    • DIP
  • 링크

    • Convex Optimization For All
  • 공지사항

    • Test
    • PET Study 2009
    • 기타 방사능관련.
  • 인기 글

  • 태그

    math
    Python
    random
    signal_and_system
    function
    Programming
    SIGNAL
    numpy
    linear algebra
    Term
    signals_and_systems
    opencv
    Vector
    fourier transform
    cv2
    SS
    ML
    Optimization
    인허가제도
    Probability
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.3
dsaint31x
[LA] Inverse Matrix
상단으로

티스토리툴바