---
tags: Linear Algebra - HungYiLee
---
# Linear Algebra - Lec 23~24: Determinant
[TOC]
# [課程網站](http://speech.ee.ntu.edu.tw/~tlkagk/courses_LA18.html)
# [Lecture 23: Formulas of Determinant](https://www.youtube.com/watch?v=7fXtSUrKND0&list=PLJV_el3uVTsNmr39gwbyV-0KjULUsN7fW&index=23)
## Determinant
- scalar
- only defined matrix is **square**
- provide some info about the matrix, e.g.
- **invertibility**
- 要求 determinant,要先會求 cofactor
### Cofactor Expansion

- $A\in \mathbb R^{n\times n}$
- $a_{ij}$:$A$ 的 element
- $A_{ij}\in\mathbb R^{n\times n}$ : 把 $A$ 的第 $i$ row 及第 $j$ column 移除之後的 matrix
- $c_{ij}=(-1)^{i+j}\det\,A_{ij}$:**(i, j)-cofactor**
### Example - 2x2 matrix

- define $\det([a]) = a$
### Example - tridiagonal matrix
- 假設 $A_n$ 為 $n$ 階的 tridiagonal matrix
- 即使推廣到 $A_n$,我們也只需要考慮兩項
- $\det(A_n)=\det(A_{n-1})-\det(A_{n-2})$,proof 懶得寫,自己導一次ˊˋ
# [Lecture 24: Properties of Determinant](https://www.youtube.com/watch?v=005nG8ZZVDE&list=PLJV_el3uVTsNmr39gwbyV-0KjULUsN7fW&index=24)
## Determinant 於二維 & 三維空間
- 平行四邊形 的面積
- 平行六面體 的體積
## Three Basic Properties of Determinant
1. $\det(I)=1$
2. **Exchange rows only reverses the sign of det**
3. **Determinant is "linear" for each row**
其實根據這三個 property 可以直接推出 determinant cofactor expansion
### Basic Property 1

### Basic Property 2
- Exchanging rows only reverses the sign of det
- 可以利用這個 property 推出 若 $A$ 有兩個 row 是相同的,那麼 $\det(A)=0$
- 
### Basic Property 3
Property 3: Determinant is "linear" **for each row**

- Property 3-a:
- $\det(\begin{bmatrix}ta&tb\\c&d\end{bmatrix})=t\cdot \det(\begin{bmatrix}a&b\\c&d\end{bmatrix})$
- 可以推出:$\det(2A)=2^n\cdot\det(A)$
- 因此 **determinant 這個 operation 並不是 linear 的**
- 也可以推出:若 $A$ 有 zero-row,則 $\det(A)=0$

- Property 3-b:
- $\det(\begin{bmatrix}a+a'&b+b'\\c&d\end{bmatrix}) = \det(\begin{bmatrix}a&b\\c&d\end{bmatrix}) + \det(\begin{bmatrix}a'&b'\\c&d\end{bmatrix})$

- 利用 property 3 可以推出:若將 $A$ 的第 $j$ 個 row 減去第 $i$ 個 row 的 $k$ 倍,determinant 不會變
- 二階 example:$\det(\begin{bmatrix}a&b\\c&d\end{bmatrix})=\det(\begin{bmatrix}a&b\\c-ka&d-kb\end{bmatrix})$
### Determinants for Upper Triangular Matrix

### Determinants v.s. Invertible
**$A$ is invertible $\leftrightarrow$ $\det(A)\neq 0$**
- proof:
- 假設 $A$ 的 RREF 是 $R$,則
- 若 $A$ invertible,則 $\det(R)=1$
- 又 $\det(A)$ 和 $\det(R)$ 的關係為 $\det(R)=\pm k_1k_2...\det(A)$
- 故,若 $A$ invertible,則 $\det(A)\neq 0$
### Invertible: review & new

### More Properties of Determinant
- $\det(AB) = \det(A)\det(B)$ 可推出:
- $\det(A^{-1}) = 1/\det(A)$
- $\det(A^k)=\det(A)^k$
- $\det(A^T)=\det(A)$ 可推出:
- 之前我們知道:有 zero-row (或 same row) 則 $\det(A)=0$,現在我們也知道:有 zero-column (或 same column),則 $\det(A)=0$
## Cramer's Rule 克拉瑪公式 & Adjugate 伴隨矩陣

- 這個求 $A^{-1}$ 的方法**實用性很低**,比求 RREF 還麻煩
- 那我就先不學ㄌ
### 還有東西但是懶得看ㄌ