벡터와 행렬의 Norm

명대리·2023년 10월 24일

Linear Algebra

목록 보기
2/2
post-thumbnail

1. Inner product space

  • vector space에서 Inner poduct 즉 내적 연산이 추가된(equipped된) space를 의미함 (innder product ,:V×VR\langle\cdot, \cdot\rangle: \mathcal{V} \times \mathcal{V} \rightarrow \mathbb{R})
  • Inner Product은 두 벡터간의 유사도, 그리고 Projection을 위해 정의됨
  • 아래 조건 3가지 조건을 만족해야 함
    1. x,y=y,x for all x,yV\langle \mathbf{x}, \mathbf{y}\rangle = \langle \mathbf{y}, \mathbf{x}\rangle \ \text{for all} \ \mathbf{x},\mathbf{y} \in \mathcal{V}(교환 법칙 성립)
    2. cx+y,z=cx,z+y,z for all x,y,zV and cR\langle \mathbf{cx +\mathbf{y}}, \mathbf{z}\rangle = c\langle \mathbf{x}, \mathbf{z}\rangle + \langle \mathbf{y}, \mathbf{z} \rangle \ \text{for all} \ \mathbf{x,y,z} \in \mathcal{V} \ \text{and} \ c \in \mathbb{R}
    3. x,x>0 for all xV\{0}\langle \mathbf{x},\mathbf{x} \rangle > 0 \ \text{for all} \ \mathbf{x} \in \mathcal{V} \backslash \{ \mathbf{0} \}

앞의 Linear Algebra Chapter1에서 Vector Space라는 Basis vector를 늘리고 더해서 만들 수 있는 점들이 모여 이루는 공간이라고 설명하였다. Inner Product Space는 벡터공간에서 내적 연산을 갖춘(정의된)공간을 의미한다.

2. Normed space

  • vector space에 norm연산이 equipped된 경우를 의미

    (norm :VR\|\cdot\|: \mathcal{V} \rightarrow \mathbb{R})

  • Norm이라는 Operation은 스칼라의 크기의 개념을 벡터와 행렬에 적용하고 싶어서 정의됨

  • 아래 4가지 조건을 만족해야 함

    1. x0 for all xV\|\mathbf{x}\| \geq 0 \ \text{for all } \mathbf{x} \in \mathcal{V}
    2. x=0 if only if x=0\| \mathbf{x} \| = 0 \ \text{if only if } \mathbf{x} = 0
    3. cx=cx for all  cR and xR\|c\mathbf{x}\| = |c|\|\mathbf{x}\| \ \text{for all } \ c \in \mathbb{R} \text{ and } \mathbf{x} \in \mathbb{R}
    4. x+yx+y for all x,yV\| \mathbf{x+y} \| \leq \|\mathbf{x} \| + \|\mathbf{y}\| \text{ for all } \mathbf{x},\mathbf{y} \in \mathbb{V}

    Matrix나 Vector의 Norm (노름)이란 무엇일까?
    Vector 혹은 Matrix의 Norm이란 스칼라에서 정의한 '크기'라는 개념을 Vector와 Matrix에 확장시킨 것이다.
    3 >1, 5 < 10이라는 것은 너무나 당연하다. 그렇다면 Vector나 Matrix에서도 크기를 정의할 수 있어야 하지 않을까 --> Norm😍

    Vector Space에서 Norm이라는 크기를 정의할 수 있는 공간을 Normed Space라고 한다.

Theorem

  • Finite-dimensional vector space에서 모든 norm은 Equivalent
    c1x1<=x2<=c2 * x1c_1 *\|\mathbf{x}\|_ 1<=\|\mathbf{x}\|_ 2<=c_2 \text { * }\|\mathbf{x}\|_ 1
    • 즉 모든 놈은 서로 어떤 상수 배로 관련이 있음
    • 어떤 Norm을 쓰던 scalar배만 달라질 뿐 크기의 따른 순서는 모두 같음.

Vector와 Matrix의 크기(Norm)을 다양한 방법으로 정의할 수 있는데,
어떤 방법으로 정의하든 그 대소관계는 변하지 않는다!
'가'라는 방법으로 정의한 vector a의 크기 > vector b의 크기라면, '나','다','마'.. 방법으로 정의한 벡터의 크기의 부호도 똑같다!

3. 유명한 Norm

  • Lp\mathbb {L}^p Norm
xp=(i=1nxip)1p\|\mathbf{x}\|_p=\left(\sum_{i=1}^n\left|x_i\right|^p\right)^{\frac{1}{p}}

L2\mathbb {L}^2 Norm이 유클리디안 space에서 벡터의 크기를 정의하기 위해서 고등학생 때 부터 많이 사용됬었음

중학교때부터, 벡터의 크기를 2차원 3차원에서 정의했던 방법이 Lp Norm이였다...

  • Frobenius Norm
AF=i=1mj=1naij2=tr(ATA)\|A\|_F=\sqrt{\sum_{i=1}^m \sum_{j=1}^n\left|a_{i j}\right|^2} = \sqrt{\operatorname{tr}\left(A^T A\right)}

Frobenius Norm은 L2\mathbb {L}^2 Norm을 Matrix로 확장시킨 개념

  • Operator Norm
Aop=supv0Avpvp\|A\|_{o p}=\sup _{\mathbf{v} \neq \mathbf{0}} \frac{\|A \mathbf{v}\|_p}{\|\mathbf{v}\|_p}

Chapter1에서 벡터공간에서 행렬은 함수가 될 수 있다고 설명했다.
Operator Norm은 행렬을 Linear Function으로 생각했을 때, 이 연산자가 벡터에 작용했을 때의 최대 확대/축소 비율을 의미.

참고) 특히 L2\mathbb {L}^2 Norm의 Operator Norm은 Eigenvalue의 최대값임.

이 내용은 나중에 Spectral Decomposition의 개념과 Convex Optimization의 개념을 배우면 다시 돌아와서 보면 될듯...

proof

A22=supx21Ax22=supx21xTATAx=supx21xTVD2VTx=supx21(VTx)TD2VTx=supx21(d12x12++dn2xn2)=d12\begin{aligned} \|\mathbf{A}\|_2^2 &= \sup_{\|\mathbf{x}\|_2\leq 1} \|\mathbf{Ax}\|_2^2 \\ & =\sup_{\|\mathbf{x}\|_2\leq 1} \mathbf{x^TA^TAx} \\ & = \sup_{\|\mathbf{x} \|_2\leq 1 }\mathbf{x^TVD^2V^Tx} \\ & = \sup_{\|\mathbf{x} \|_2\leq 1 }\mathbf{(V^Tx)^TD^2V^Tx} \\ & = \sup_{\|\mathbf{x} \|_2\leq 1 }(d_1^2 x_1^2 + \cdots +d_n^2 x_n^2) \\ & = d_1^2 \end{aligned}

4. Cauchy-Schwarz inequalilty

  • V:Inner product space\mathcal{V}: \text{Inner product space}
x,y2x2y2for all x,yV|\langle\mathbf{x}, \mathbf{y}\rangle|^2 \leq\|\mathbf{x}\|^2\|\mathbf{y}\|^2 \quad \text{for all } \mathbf{x},\mathbf{y} \in \mathcal{V}

업로드중..

벡터의 내적은 b방향으로 a벡터를 내려찍은 값과 b벡터의 크기의 곱이다!
그림을 보면 너무나 당연하게도 a벡터의 크기 자체와 b벡터의 크기 자체를 곱한값보다는 작겠지?

profile
머신러닝 공부하는 명대리입니다. 비전공자들에게 어려울 수 있는 데이터과학을 위한 수학의 직관적 의미를 쉽게 전달하고, Quantization을 통한 Model Compression이나 Parallel Programming 같은 최적화 관련 부분을 공유합니다. 공부해가며 배워가는 단계이니 잘못된점이나 혹은 질문 주시면 감사할거 같아요. 같이 소통하면서 성장해보아요.

3개의 댓글

comment-user-thumbnail
2023년 10월 24일

비전공자인데 너무 쉬워요 잘 읽고갑니다

1개의 답글
comment-user-thumbnail
2023년 10월 24일

잘 읽고갑니다

답글 달기