# Lecture 01

# Matrix Multiplication

- \mathbf{a}_i^T는 A의 i번째 행 벡터 (1×n)

- \mathbf{b}_j는 B의 j번째 열 벡터 (n×1)

## Row-Col Method (행-열 방법)

행렬의 각 행을 먼저 처리한 후, 그 결과를 열 단위로 계산하는 방법입니다. 즉, 가로 방향으로 먼저 연산을 수행한 뒤 세로 방향으로 계산합니다.

AB_{ij} = (i th\ row\ of\ A)(j th\ col\ of\ B)=A_i^T\cdot b_j=A_ib_j 

### col by col

i th column of AB = A(i th col of B) ⇒ col by col

### row by row

i th row of AB = (i th row of A)B 

## col-row expansion

row-col 메서드랑 달리 A를 col으로 처리함.

선수지식 Ax = \sum_{i=1}^{n} x_i \mathbf{a}_i

![Image](https://upload.cafenono.com/image/slashpageHome/20251025/001843_5MIynqLOjtRrQ70Bs7?q=80&s=1280x180&t=outside&f=webp)

A의 열벡터들을 x의 성분들로 가중치를 준 선형결합으로 표현할 수 있다.

AB = \sum_{p=1}^{n} a_p \times B_p 

이제 한줄짜리 x가 아니라 여러 column이 살아있는 B로 확장하면 위와 같다.

AB = \begin{bmatrix} \sum_{j=1}^{n} b_{j1} \mathbf{a}_j & \cdots & \sum_{j=1}^{n} b_{jk} \mathbf{a}_j \end{bmatrix} 

AB의 k 번째 열은 A의 열벡터들(a1, a2, …)을 B의 k번째 열성분(nx1 한줄짜리 벡터)로 선형결합한 형태임.

이제 시그마를 풀어서 쓰면

\begin{bmatrix} b_{11}\mathbf{a}_1 & b_{12}\mathbf{a}_1 & \cdots & b_{1k}\mathbf{a}_1 \end{bmatrix} … 이런식으로 행렬들의 합으로 쓸 수 있음.

근데 이건 m x 1 짜리 a_i 랑  1 x k 짜리 B_i의 곱임. (결과는 m x k 짜리 행렬이 나오는. 다시말하자면 a_i 컬럼에 B_i의 각 요소들을 가중치로 곱한 결과 벡터들을 모은. 더하는거 아님)

\mathbf{AB} = \mathbf{a}_1 \mathbf{B}_1 + \mathbf{a}_2 \mathbf{B}_2 + \cdots + \mathbf{a}_n \mathbf{B}_n

최종적으로 mxk 짜리 행렬들의 합으로 표현된 col-row expansion 완성!

# Inverse

### properties

1. A,B. inv → AB inv

2. A inv → A^T inv

3. A inv → A^m inv

4. A inv → kA inv

### determinent

det≠0 → A inv

# Transpose

(AB)^T = B^TA^T

For the site tree, see the [root Markdown](https://slashpage.com/yejun-cheon.md).
