링크텍스트
위 강의를 듣고 정리하는 글입니다.
2.1 vectors and linear equations
A system of equations
(13−22)(xy)=(111)
{x−2y=13x+2y=11
x(13)+y(−22)=(111)
column picture의 의미: 두 벡터
(13) and (2−2)
의 linear combination으로 답을 만들 수 있니?
2.2 idea of elimination
Gaussian elimination
(13−22)(xy)=(111)
위 식의 1행을 봤을 때 0이 아닌 첫 번째 수 1: first pivot
→ 첫 번째 행에 -3을 곱해서 두 번째 행과 더함
(10−28)(xy)=(18)
2행에서 0이 아닌 수 중 첫 번째 수는 second pivot
더 이상 elimination을 할 수 없다면 back substitution으로 계산(8y=8부터 위로 )
예제)
(13−2−6)(xy)=(13)
(10−20)(xy)=(10)
number of pivots = 1
0∗y=0 → y: free variable
x: pivot variable
우변이 0벡터가 아니기 때문에 위 방정식은 nonhomogeneous equation
- nonhomobeneous equation 푸는 법: homogeneous equation을 풀고 nonhomogeneous equation의 particular solution(특정한 해)을 더해주면 됨
homogeneous equation 풀기
(10−20)(xy)=(00)
free variable의 개수만큼 벡터가 나옴
(xy)=c(??)
free variable 자리에 1을 넣기(여기에 0을 넣으면 다른 애들도 다 0이 되기 때문에 의미가 없음)
(free variable이 여러 개라면 하나에만 1 넣고 나머진 0 넣어주는 식으로)
(xy)=c(?1)
pivot variable 계산해서 넣기
(xy)=c(21)
nonhomogeneous equation 풀기
(10−20)(xy)=(10)
여기선 free variable에 어떤 수를 넣어도 되겠지
(xy)=(10)
최종 해
(xy)=c(21)+(10)
2.3 elimination using matrices
permutation matrix(자리 바꾸기)
P23=⎝⎜⎛100001010⎠⎟⎞
augmented matrix
[A∣b] where Ax=b
예시)
⎝⎜⎛1−20010001⎠⎟⎞⎝⎜⎛24−249−3−2 ∣ 2−3 ∣ 8 7 ∣ 10⎠⎟⎞=⎝⎜⎛20−241−3−2 ∣ 2 1 ∣ 4 7 ∣ 10⎠⎟⎞
왼쪽 행렬은 elimination matrix: 1행으로 2행의 elimination을 진행하는 행렬
E[A∣b]=[EA∣Eb]
행렬 곱의 다른 방법
⎝⎜⎛∣a1∣∣a2∣⎠⎟⎞(−−b1b2−−)=⎝⎜⎛∣a1∣⎠⎟⎞(−b1−)+⎝⎜⎛∣a2∣⎠⎟⎞(−b2−)
2.5 inverse matrices
nxn matrix(square matrix) A is invertible if ∃(exist) A−1 such that AA−1=A−1A=I
-
A−1 exists
if and only if Gaussian elimination produces n pivots.
-
suppose BA=I, AC=I → B랑 C랑 똑같니?(A의 역행렬이 unique하니?)
B(AC)=(BA)C
BI=IC
B=C → A의 역행렬은 unique하구나
-
if A−1 exists, Ax=b has the unique solution.
-
Ax=0을 만족하는 nonzero vector x가 존재하려면 A−1은 존재하지 않는다.
A−1이 존재하면 x=0A−1=0이 되니까
(acbd)−1=ad−bc1(d−c−ba)
ad−bc=determinant
calculation A−1 by Gauss-Jordan elimination
[A∣I] → [E1A∣E1I] → [E2E1A∣E2E1I] → … → [Em…E1A∣Em…E1I] = [I∣A−1]
A가 diagonal matrix될 때 까지 elimination matrix를 곱해준 뒤 I가 되게 나눠줌 → 이렇게 곱해준 Em…E1이 A−1이겠지
2.6 LU factorization
L: lower triangular matrix
U: upper triangular matrix
역행렬 구할 때와 마찬가지로 Gauss-Jordan elimination을 이용해 구하면 됨
2.7 transpose and permutations
(A+B)T=AT+BT
(AB)T=BTAT
(A−1)T=(AT)−1
A가 invertible하면 AT도 invertible하다.(AT의 역행렬은 A−1을 transpose하면 된다.)
A−1A=I
(A−1A)T=I
AT(A−1)T=I
AT(AT)−1=I
S가 n by n matrix이고 ST=S이면 S는 symmetric matrix
S가 symmetric하면 S−1도 symmetric하다.
(S−1)T=(ST)−1=S−1
Gaussian elimination for symmetric matrices
(1227)=(1201)(1023)=(1201)(1003)(1021)
S=LU=LDLT
→ U를 D(diagonal matrix)와 LT(U와는 다른 행렬이지만 어쨌든 upper triangular matrix이긴 함)로 더 decomposition 가능하다.
permutation matrices: n by n matrix이고 every row에 1이 하나, every column에 1이 하나