[LA] Determinant (행렬식)

2024. 4. 3. 22:26·.../Linear Algebra
728x90
728x90

Matrix는 일종의 Linear transform을 의미함.

Linear transform을 의미하는 matrix 들 중에서,

Square Matrix에서 구해지는 Determinant는 

해당하는 Linear transform의 특성을 나타내는 scalar 임.

 

square matrix가 의미하는 linear transform은
차원이 증가할 수 없음을 기억할 것.

 

1. Determinant의 의미

Determinant가 의미하는 것은 크게 다음의 3가지임.

  1. full-rank matrix 인지 여부
    • $\det (A)$이면 $A$의 column (or row) vector가 linearly dependent임을 의미.
    • 즉, $A$가 full-rank가 아닐 경우 determinant가 0임.
  2. Scale (or Volumne) Change.
    • Determinant의 magnitude는 univectore들에 의한 n-dimentional unit volume이
    • Linear transform에 의해 얼마나 확대 또는 축소되는지를 나타냄.
    • 0이 될 경우, n-dimentional unit volume이 보다 작은 차원의 volume이 되는 것을 의미함. 
  3. Invertible
    • 앞서 scale change에서 Determinant의 magnitude가 0인 경우 차원 축소가 발생함을 설명함.
    • 차원 축소가 발생할 경우, 해당 Linear transform은 not invertible을 의미함.
  4. 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축의 부호를 반전시킴을 기억할 것.

2. 주요성질

Determinant에 관련된 주요 성질을 다음과 같음.

 

$A$와 $B$가 $m \times m$ matrix인 경우 다음이 성립.

  1. $A$ 는 invertible (=역행렬을 가짐)이라는 것은 $A$의 determinant가 0이 아니라는 말과 동치임.
    • $\det (A) =0$ iif $A$ is singular.
  2. $AB$의 determinant는 $A$와 $B$ 각각의 determinant를 곱한 것과 같음.
    • $\det (AB) = \det(A) \det(B)$ 
  3. transpose 는 determinant 를 변화시키지 않음.
    • $\det (A^\top) = \det (A)$
  4. $A$가 $n\times n$ Matrix인 경우, $kA$의 determinant는 $k^n \det (A)$임.
  5. 삼각행렬에서의 determinant는 main diagonal의 entries의 곱과 같음.
  6. Elementary Row Operation과 다음의 관계를 가짐.
    1. row replacement는 determinant에 변화를 주지 않음.
    2. row interchange는 determinant의 sign을 바꿈.
    3. 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


3. 계산법

작은 크기의 square matrix에서는 Laplace Expansion을 사용하나,
큰 크기의 경우엔 Upper Triangular Matrix로 변환 후 main diagonal의 entries를 곱해서 구함. 

 

3-1. Laplace Expansion

다음은 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.

Minor matrix에 대한 것은 다음의 URL에서 확인할 것.

2025.01.25 - [.../Linear Algebra] - [LA] Intermediate Matrices for Inverting Full-Rank Matrix: Cramer's Rule

 

[LA] Intermediate Matrices for Inverting Full-Rank Matrix: Cramer's Rule

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

dsaint31.tistory.com

3-2. Sarrus's Rule

3x3 에서는 가장 효과적인 손으로 푸는 방식임.

2x2, 3x3 행렬에서 행렬식을 구하는데 자주 사용되는 방법.


4. 활용: 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가 클수록 일관된 추정값을 얻을 수 있음.
더보기

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

 

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
'.../Linear Algebra' 카테고리의 다른 글
  • [LA] Matrix-Vector Multiplication
  • [LA] Linear Transformation
  • [LA] Gauss-Jordan Elimination (including Gauss Elimination) and LU Factorization
  • [LA] Row Operations and Row Equivalent
dsaint31x
dsaint31x
    반응형
    250x250
  • dsaint31x
    Dsaint31's blog
    dsaint31x
  • 전체
    오늘
    어제
    • 분류 전체보기 (740)
      • Private Life (13)
      • Programming (186)
        • DIP (104)
        • ML (26)
      • Computer (119)
        • CE (53)
        • ETC (33)
        • CUDA (3)
        • Blog, Markdown, Latex (4)
        • Linux (9)
      • ... (351)
        • Signals and Systems (103)
        • Math (172)
        • Linear Algebra (33)
        • Physics (42)
        • 인성세미나 (1)
      • 정리필요. (54)
        • 의료기기의 이해 (6)
        • PET, MRI and so on. (1)
        • PET Study 2009 (1)
        • 방사선 장해방호 (4)
        • 방사선 생물학 (3)
        • 방사선 계측 (9)
        • 기타 방사능관련 (3)
        • 고시 (9)
        • 정리 (18)
      • RI (0)
      • 원자력,방사능 관련법 (2)
  • 블로그 메뉴

    • Math
    • Programming
    • SS
    • DIP
  • 링크

    • Convex Optimization For All
  • 공지사항

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

  • 태그

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

  • 최근 글

  • hELLO· Designed By정상우.v4.10.3
dsaint31x
[LA] Determinant (행렬식)
상단으로

티스토리툴바