1. Inverse Matrix and Linear System
Linear Algebra 의 가장 기본적인 응용은 Linear System (선형연립방정식)을 푸는 용도임.
다음은 Linear System의 Matrix Equation임.
$$A\mathbf{x}=\mathbf{b}$$
Inverse는 이 Linear Ssytem의 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 Equation linear 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)로 augm
dsaint31.tistory.com
2. 실제 사용되는 방법.
하지만 사실 Inverse를 구하는 것은 매우 계산복잡도가 높고, ill-conditioned matrix등에서는 수치적인 불안정성 때문에 쉽게 inverse를 구하기 어렵다.
때문에 다음의 방법을 사용하여 Solution을 구함:
- LU Decomposition
- 여러 $\mathbf{b}$ 에 대해 반복 계산이 필요한 경우 사용됨.
- 연립방정식 반복 계산
- Gaussian Elimination
- 일반적인 연립방정식 풀이에 가장 많이 애용됨.
- 사실 LU Decomposition 과 차이라면 대수적 표현이냐 아니면 matrix의 곱으로의 표현이냐 로 같다고 볼 수 있음.
- Identity Matrix 를 오른쪽에 붙인 Augmented Matrix를 RREF로 만드는 Gaussian-Jordan Elimination 도 본질적으로는 같음 (사용자 입장에서는)
- QR Decomposition
- 매우 높은 수치적 안정성을 제공하여 고정밀 계산에 유리.
- Least Square Method 등에.
[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
Inverse도 Cramer's Rule에 기반하여 구하는 일반해가 있으나,
보통은 Regular Matrix (=Invertible Matrix)에서는 LU Decomposition 등을 사용함.
Non-Square Matrix나 Ill-Conditioned matrix의 경우엔 Pseuod Inverse를 사용하며 이 경우는 주로 SVD를 이용함.
2024.02.15 - [.../Math] - [LA] Singular Value (특이값)
[LA] Singular Value (특이값)
Singular Value DecompositionRank가 $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\}$ 와positive scalr set $\{\sigma_1, \dots, \sigma_n
dsaint31.tistory.com
3. Types of Inverses
3-1. (Full) Inverse
Inverse는 다음을 만족해야함.
$$A^{-1}A = AA^{-1} = I$$
- 이를 위해서는 $A$가 Square Full-Rank Matrix 여야 함.
- $\det A \ne 0$
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 등에서는 행이 열보다 훨씬 크므로 Left Inverse가 보다 많이 사용됨.
$$ \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} \end{aligned}$$
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의 경우, Pseudo-Inverse와 곱하면 완벽한 Identity Matrix는 아니나 거의 비슷한 값을 가지는 Matrix가 구해짐.
즉, Rank-Deficient Matrix에서는 Pseudo-Inverse를 사용함.
보통 사용되는 Pseudo-Inverse는 Moore-Penrose Pseudo-Inverse이며 Singular Value Decomposition에 기반함.
2022.12.02 - [.../Math] - [LA] Pseudo Inverse Matrix
[LA] Pseudo Inverse Matrix
참고로 아래에 Singular Vector Decomposition으로 Pseudo Inverse를 구하는 방법이 있음. Pseudo Inverse Matrix square matrix 가 아닌 matrix $A_{m\times n}$에서 inverse에 해당하는 matrix를 구하는데 사용됨. $$ A^+_{n\times m}=\
dsaint31.tistory.com
같이 보면 좋은 자료
2024.02.16 - [.../Linear Algebra] - [LA] Linear Equation (선형 방정식) and Linear System 정리.
[LA] Linear Equation (선형 방정식) and Linear System 정리.
Linear Equation linear 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
[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라고 할 수 있다.하지만, 해당 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도 구할 수 있음. 다음은 1~2개
dsaint31.tistory.com
'... > 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 Square Full-Rank Matrix (0) | 2025.01.25 |
[LA] Quadratic Form and Positive/Negative Definite (0) | 2025.01.24 |
[Summary] Linear Algebra (작성중) (0) | 2025.01.21 |