이 글은 Linear Algebra and Its Applications 책을 정리한 글입니다.
2.1 Matrix Operations
Matrix의 표기법 및 용어
- m개의 rows와 n개의 columns를 갖은 m×n matrix의 ith row, jth column의 entry를 aij로 표기한다.
- 또한 m×n matrix A의 각 column을 vector in Rm 으로 다음과같이 표기할 수 있다
A=[a1a2…an]
- m×n matrix의 a11,a22,⋯ 를 diagonal entries 라고 하고 nondiagonal entries가 zero인 square n×n matrix를 diagoanl matrix 라고 한다
Theorem1
Let A,B and C be matrices of the same size, and let r and s be scalars
a. A + B = B + A
b. (A + B) + C = A + (B + C)
c. A + 0 = A
d. r(A + B) = rA + rB
e. (r + s)A = rA + sA
f. r(sA) = (rs)A
- 위 theorem의 각 matrix를 column으로 쪼개서 봤을때도 ch1의 algebratic properties of Rn (벡터의 성질)을 그대로 유지한다.
Matrix multipliaction
-
A(Bx)=(AB)x
-
A를 m×n matrix, B를 b1,…,bp 의 column vector를 가진 n×p matrix라고 하였을때 product AB 는 m×p matrix이며 Ab1,…,Abp 를 column 으로 갖는다
AB=A[b1,…,bp]=[Ab1,…,Abp]
- matrix AB의 entry는 다음과같이 표현될 수 있다
(AB)ij=ai1b1j+ai2b2j+⋯+ainbnj
Properties of Matrix Multiplication
Theorem2
Let A be an m×n matrix, and let B and C have sizes for which the indicated sums and products are defined.
a. A(BC) = (AB)C
b. A(B + C) = AB + AC
c. (B + C)A = BA + CA
d. r(AB) = (rA)B = A(rB)
e. ImA = A = AIn
The Transpose of a Matrix
- Given an m×n matrix A, the transpose of A is the n×m matrix, denoted by AT, whose columns are formed from the corresponding rows of A.
Theorem3
a. (AT)T = A
b. (A+B)T=AT+BT
c. For any scalar r, (rA)T=rAT
d. (AB)T=BTAT
2.2 The Inverse of Matrix
Invertible Matrix
-
n×n matrix A가 invertible하다면 n×n matrix C가 있을때 CA=I and AC=I고 이때 I는 identity matrix이며 또한 matrix C는 invertible하며 unique하다.
-
B를 또다른 A의 inverse라고 가정했을때 아래와 같이 결국 C는 unique하다
B=BI=B(AC)=(BA)C=IC=C
- matrix가 not invertible하다면 singular matrix, invertible하다면 nonsingular matrix 라고 한다.
Theorem4
Let A = [a bc d]. if ad-bc = 0, then A is invertible and
A−1=ad−bc1[d −b−c a].
if ad-bc = 0, then A is not invertible
- 이때 ad-bc를 determinent of A 라고 하며 det A 로 표기한다.
Theorem5
If A is an invertible n × n matrix, then for each b in Rn,
the equation Ax=b has the unique solution x=A−1b
Au=b→A−1Au=A−1b→Inu=u=A−1b
Theorem6
a. If A is invertible matrix, then A−1 is invertible and (A−1)−1=A
b. If A and B are n×n invertible matrices, then so is AB, and the inverse of AB is the product of the inverces of A and B in the reverse order.
That is (AB)−1=B−1A−1
c. If A is an invertible matrix, then so is AT, and the inverse of AT is the tranpose of A−1. That is (AT)−1=(A−1)T
- Elementary matrix란 1장에서 matrix를 echelon form으로 row reduction할때 쓰였던 single elementary row operation을 identity matrix에 수행한 것 이다. 다시말해 identity matrix 에 single elementary row operation 을 수행한 것 이고 다른 matrix에 Left multiplication(pre-multiplication)을 하면 single elementary row operation을 해준 것과 동일하다.
- 위 예시는 각각 replacement, interchange, scaling이며 임의 matrix A에 left multiplication을 해보면 다음과같다.
- 위와같은 elementary matrix E는 invertible하며 E의 inverse는 E가 identity matrix I에 row operation을 해주는 것이기에 다시 I로 다시 돌아가는 operation을 해주면 된다.
Theorme7
An n × n matrix A is invertible if and only if A is row equivalent to In, and in this case, any sequence of elementary row operations that reduces A to In also transforms In into A−1
- 위에서 언급된데로 matrix A 가 invertible하다면 elementary matrix를 multiplication해주어 elementary row operation을 해주어 In을 만들고 elemetary matrix를 sequence로 나타내주면 inverse를 찾을 수 있다.
A∼E1A∼E2(E1A)∼⋯ Ep(Ep−1⋯E1A)InEp⋯E1A=InA−1=(Ep⋯E1)−1
Algorithm for finding A−1
-
Row reduce the augmented matrix [AI]. If A is row equivalet to I, then [AI] is row equinalent to [IA−1]. Otherwise, A does not have an inverse.
-
위 설명은 지금까지의 augmented matrix를 [Ab] 로 표현하였는데 vector b대신 identity matrix I로 대신한 것이고 A부분이 I가되도록 계속 row reduction한 것이다.
Example
- Find the inverse of the matrix A, if it exists
Example
[AI] 로 두었던 부분을 row reduction을 통해 I로 만들었으니 I자리의 matrix가 A−1이 된다.
2.3 Characterizations of invertible matrices
Theorem8
Let A be a square n × n matrix. Then the following statements are equivalent.
- a. A is an invertible matrix.
- b. There is an n × n matrix C such that CA = I.
- c. The equation Ax = 0 has only the trivial solution.
- d. A has n pivot position.
- e. A is row equivalent to the idientity n × n matrix
- f. There is an n × n matrix D such that AD = I.
- g. The equation Ax = b has at least one solution for each b in Rn
- h. The columns of A span Rn.
- i. The linear transformation x↦Ax maps Rn onto Rn.
- j. The columns of A form a linearly independent set.
- k. The linear transformation x↦Ax id one-to-one.
- l. AT is an invertible matrix.
- Invertible linear transformation
- A linear transformation T : Rn→Rn is said to be invertible if ther exists a fuction S : Rn→Rn such that
(1)S(T(x)) for all x in Rn(2)T(S(x)) for all x in Rn
2.4 Partitioned Matrices
Theorem10
Column-Row Expansion of AB
If A is m × n and B is n × p, then
- 지금까지는 [Ab1⋯Abn] 이런 식으로 A에 B의 column 벡터를 matrix multiplication한 것을 column으로두어서 나열한 표현을 썼었다.
2.5 Matrix Factorization
- Factorization이란 한 matrix를 두개 혹은 이상의 product로 다은과같이 표현하는 것이다.
LU Factorization
2.6 Subspace of Rn
Definition
A subspace if Rn is any set H in Rn that has three properties :
- The zero vector is in H
- For each u and v in H, the sum u+v is in H.
- For each u and each scalar c, the vector cu is in H.
- addition 과 scalar multiplication 에 닫혀있고, zero vector를 포함하고있으면 Rn의 subspace가 된다.
Example
v1 and v2 and H = Span{v1,v2} 일때 H가 Rn의 subspace임을 보여라
u=s1v1+s2v2andv=t1v1+t2v2
라고 하였을때
u+v=(s1+t1)v1+(s2+t2)v2cu=(cs1)v1+(cs2)v2
위 식을통해 u+v와 cu 는 v1과 v2의 linear combination으로 나타내어 addition 과 scalar multiplication 에 닫혀있음을 보일 수 있고음을 보일 수 있고 0v1+0v2 도 v1과 v1 의 linear combination이므로 H가 zero vector로 포함시켜 위 세가지 조건을 만족시키기에 H는 Rn의 subspace라고 할 수 있다.
Example
- 위 그림처럼 line L이 원점(origin)을 지나지 않으면 addition 과 scalar multiplication 에 닫혀있지 않으므로 subspace가 될 수 없다.
∴ For v1,⋯,vp in Rn, Span{v1,⋯,vp} is a subspace of Rn
Column Space and Null Space of a Matrix
Column space (Col A)
Example
일 때, is b in Col A ?
- 위 matrix를 augmented matrix로 row reduce해주면 다음과 같고.
- 위 echelon form을 보면 pivot이 2개여서 Ax = b가 consistent함을 알 수 있고, 이는 vector b 가 matrix의 column vector들의 linear combination으로 나타낼 수 있음을 뜻하므로 b in Col A이다. 이를 그림으로 나타내면 다음과 같다.
Null space (Nul A)
- The null space of a matrix A is the set Nul A of all solutions of the homogeneous equation Ax=0
Theorem12
The null space of an m x n matrix A is a subspace of Rn. Equivalently, the set of all solutions of a system Ax=0 of m homogeneous linear equations in n unknowns is a subspace of Rn
- Nul A에 있는 어떤 u,v (homogeneous equation의 임의의 solution) 은 Au=0, Av=0 두 식으로 나타낼 수 있고 이를 통해 A(u+v) = Au + Av = 0과 A(cu) = Au + c(Av) = c0 = 0 을 통해 addition과 scalar multiplication 에 닫혀 있음을 보임으로 Nul A 는 Rn의 subspace임을 증명 할 수 있다.
Basis for a Subspace
- 위와같은 identity matrix In의 column vector들은 linearly independent set 이며 Rn의 standard basis 라고 한다.
- 물론 Rn도 Rn의 subspace이다.
Example
- 위 matrix의 homogeneous equation의 solution set은 null space이므로 augmented form으로 reduction해보면 다음과 같고,
- 이를 free variable인 x2,x4,x5를 통해 vector equation으로 general solution을 표현하면 다음과 같다.
=x2u+x4v+x5w
- vector u,v,w으로 나타낼 수 있는 linear combination은 Nul A 가 되고 위 linear combination은 자동적으로 trivial solution을 갖기에 (vector X를 0으로 만드는 free variable x2,x4,x5는 모두 0이 됨) vector u,v,w는 linearly independent set이고 {u,v,w} 는 Nul A 의 basis 가 된다.
Example
- 위 reduced matrix B의 column들을 b1,⋯,b5 라고 하였을 때 당연하게도 아래 식처럼 다른 column들은 pivot column인 b1,b2,b5의 inear combination으로 표현 할 수 있고
v=c1b1+c2b2+c3(−3b1+2b2)+c4(5b1−b2)+c5b5
-
pivot column인 b1,b2,b5는 당연히 linearly independent set이므로 {b1,b2,b5} 는 Col B 를 span한다.
-
∴ pivot columns of B {b1,b2,b5}는 Col B의 basis이다.
Theorem13
The pivot columns of a matrix A form a basis for the column space of A.
2.7 Dimension and Rank
Coordinate Systems
Definition
Suppose the set B = {b1,⋯,bp} is a basis for a subspace H. For each x in H the coordinates of x relative to the basis B are the weights c1,⋯,cp such that x=c1b1+⋯+cpbp, and the vector in Rp
[x]B=⎣⎢⎢⎡c1⋮cp⎦⎥⎥⎤
is called the coordinate vector of x (relative to B) or the B-coordinate vector of x
- basis B 라는 것은 일반적인 좌표계가 아닌 basis에 대한 좌표계를 나타내며 위 definition은 basis가 주어졌을 때 H의 특정 vector x를 나타내는 weights(coefficient) c1,⋯,cp는 unique하다는 것을 나타낸다.
Example
- vector x가 subspace H = Span{v1,v2}에 있는지 보이고 B-coordinate vector of x를 구해라
-
일단 v1,v2는 서로 scalar 곱으로 표현될 수 없어서 linearly independent하고 subspace H의 basis가 될 수 있다.
-
위 vector들을 augmented matirx로 reduction하면 다음과 같고
- vector equation c1v1+c2v2=x 일 때 c1=2,c2=3 이므로 [x]B=[23]이 되며 basis B는 subspace H의 "coordinate system"이 된다. 그림으로 나타내면 다음과 같다.
- 위 그림에서 보다시피 basis의 vector들(x1,x2)은 R3에 있지만 subspace H에있는 x들은 cordinate vector에 의해 마치 R2에 있는것 처럼 동작한다 이를 H is isomorphic to R2 이라고 부른다.
The Dimension of a Subspace
Definition
The dimension of a nonzero subspace H, denoted by dim H, is the number of vectors in any basis for H. The dimension of the zero subspace {0} is defined to be zero.
Rank
definition
The rank of a matrix A, denoted by rank A, is the dimension of the column space of A.
Example
- 우선 rank A는 Col A의 basis의 dimension을 말하므로 matrix의 echelon form을 구하면
-
row reduction한 echelon form은 3개의 pivot column이 있는걸 알 수 있고 이는 원래의 matrix A의 pivot column과 위치가 같으므로 rank A = 3 임을 알 수 있다.
-
이때 Ax = 0은 두개의 free variable을 갖는데 이는 5개 column중 2개의 non-pivot column이 있다는 것을 통해 바로 알 수 있고 x3u+x5x 로 general solution의 vector equation을 나타낼 수 있는데 이를 통해 null space A의 dimension (dim Nul A)는 free variable의 개수와 같은 것을 알 수 있다.
<Theorem 14> The Rank Theorem
if a matrix A has n columns, then rank A C dim Nul A D n
<Theorem 15> The Basis Theorem
Let H be a p-dimensional subspace of Rn. Any linearly independent set of exactly p elements in H is automatically a basis for H. Also, any set of p elements of H that spans H is automatically a basis for H.
The Invertible Matrix Theorem (cont'd)
- m. The columns of A form a basis of Rn.
- n. Col A = Rn
- o. dim Col A = n
- p. rank A = n
- q. Nul A = {0} : null space가 zero vector밖에 없고 trivial solution을 갖는다는 소리.
- r. dim Nul A = 0