Matrix는 일종의 Linear transform을 의미함.
Linear transform을 의미하는 matrix 들 중에서,
Square Matrix에서 구해지는 Determinant는
해당하는 Linear transform의 특성을 나타내는 scalar 임.
square matrix가 의미하는 linear transform은
차원이 증가할 수 없음을 기억할 것.
Determinant의 의미
Determinant가 의미하는 것은 크게 다음의 3가지임.
- full-rank matrix 인지 여부
- $\det (A)$이면 $A$의 column (or row) vector가 linearly dependent임을 의미.
- 즉, $A$가 full-rank가 아닐 경우 determinant가 0임.
- Scale (or Volumne) Change.
- Determinant의 magnitude는 univectore들에 의한 n-dimentional unit volume이
- Linear transform에 의해 얼마나 확대 또는 축소되는지를 나타냄.
- 0이 될 경우, n-dimentional unit volume이 보다 작은 차원의 volume이 되는 것을 의미함.
- Invertible
- 앞서 scale change에서 Determinant의 magnitude가 0인 경우 차원 축소가 발생함을 설명함.
- 차원 축소가 발생할 경우, 해당 Linear transform은 not invertible을 의미함.
- Orientation Change.
- Determinant의 sign이 positive 인 경우 orientation이 해당하는 linear transform에 의해 변하지 않음.
- 만약 negative인 경우, orientation이 바뀌게 됨.
- 3차원을 예로 들면 right handed coordinate가 이 경우 left handed coordinate가 됨.
- 이는 computer graphics에서 mirroring 등에서 이용됨
- $A=\begin{bmatrix}-1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}$ 가 x축의 부호를 반전시킴을 기억할 것.
주요성질
Determinant에 관련된 주요 성질을 다음과 같음.
$A$와 $B$가 $m \times m$ matrix인 경우 다음이 성립.
- $A$ 는 invertible (=역행렬을 가짐)이라는 것은 $A$의 determinant가 0이 아니라는 말과 동치임.
- $\det (A) =0$ iif $A$ is singular.
- $AB$의 determinant는 $A$와 $B$ 각각의 determinant를 곱한 것과 같음.
- $\det (AB) = \det(A) \det(B)$
- transpose 는 determinant 를 변화시키지 않음.
- $\det (A^\top) = \det (A)$
- $A$가 $n\times n$ Matrix인 경우, $kA$의 determinant는 $k^n \det (A)$임.
- 삼각행렬에서의 determinant는 main diagonal의 entries의 곱과 같음.
- Elementary Row Operation과 다음의 관계를 가짐.
- row replacement는 determinant에 변화를 주지 않음.
- row interchange는 determinant의 sign을 바꿈.
- row scaling은 같은 scale factor로 determinant를 바꿈.
2024.02.17 - [.../Linear Algebra] - [LA] Row Operations and Row Equivalent
[LA] Row Operations and Row Equivalent
Linear Algebra에서는 "Row Operations"와 유사하게 "Column Operation"도 존재. 이 두 유형의 Operations은 Matrix를 다룰 때 중요한 Tool로,matrix의 성질을 조사하거나특정한 형태(Echelon form등)로 변환하는 데 사용.
dsaint31.tistory.com
계산법
작은 크기의 square matrix에서는 Laplace Expansion을 사용하나,
큰 크기의 경우엔 Upper Triangular Matrix로 변환 후 main diagonal의 entries를 곱해서 구함.
다음은 Laplace Expansion임 (재귀적인 계산임.)
$$\det (A) =\sum^n_{j=1} (-1)^{i+j} a_{ij} \det (M_{ij})$$
where,
- $a_{ij}$: Matrix $A$의 $i$th row, $j$th column 의 element.
- $M_{ij}$: $A$에서 $i$th row 와 $j$th column을 제거한 Minor Matrix.
활용: Design Matrix $X$에서의 Determinant
Liner Regression Model $\mathbf{y}=X\boldsymbol{\beta} +\boldsymbol{\epsilon}$ 에서 OLS 나 Optimization으로 모델의 파라미터 $\boldsymbol{\beta}$를 구하는 경우, $X^\top X$의 determinant를 통해 다음을 확인할 수 있음.
- $\det(X^\top X)\ne 0$: Normal Equation $\hat{\boldsymbol{\beta}} = (X^\top X)^{-1}X^\top \mathbf{y}$가 unique solution을 가짐.
- $\det(X^\top X) =0$: solution이 무수히 많거나 존재하지 않음.
- $\det(X^\top X)$가 매우 작을 경우: ill-conditioned로 $X$에서 entry들의 작은 변화가 solution에 매우 큰 변화를 일으키어 over-fitting를 초래하거나 신뢰하기 어려운 solution을 구하기 쉬움. Determinant가 클수록 일관된 추정값을 얻을 수 있음.
[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
2022.04.28 - [Programming/ML] - [Fitting] Ordinary Least Squares : OLS, 최소자승법
[Fitting] Ordinary Least Squares : OLS, 최소자승법
Ordinary Least Squares : OLS, 최소자승법Solution을 구할 수 없는 Over-determined system에서 solution의 근사치(approximation)을 구할 수 있게 해주는 방법임.Machine Learning에서 Supervised Learning의 대표적인 task인 Re
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
'... > Linear Algebra' 카테고리의 다른 글
[LA] Matrix-Vector Multiplication (0) | 2024.05.29 |
---|---|
[LA] Linear Transformation (1) | 2024.04.03 |
[LA] Gauss-Jordan Elimination (including Gauss Elimination) and LU Factorization (0) | 2024.02.17 |
[LA] Row Operations and Row Equivalent (0) | 2024.02.17 |
[LA] Pivot and Pivot Column (0) | 2024.02.17 |