Scalar: a single number
s (- R e.g, 3.8
Vector:
๋ฒกํฐ๋ ํฌ๊ธฐ์ ๋ฐฉํฅ์ ๋์์ ๋ํ๋ธ๋ค. vector indicate magnitude and direction
์๋ velocity = 5mpu (ํ magnitude) + East (๋ฐฉํฅ direction)
an ordered list of numbers. (an unordered list of numbers: set)
- column vector์ row vector๊ฐ ์์
A vector of n-dimension is usually a column vector n by 1.
Thus, a row vector is usually written as its transpose.
Matrix: a two-dimensional array of numbers,
Square Matrix ์ ๋ฐฉํ๋ ฌ
Rectangular Matrix ์ง์ฌ๊ฐํ ํ๋ ฌ?
Transpose of Matrix
Vector / Matrix Additions and Multiplication
C = A+B : Element-wise addition
๊ฐ์ ํฌ๊ธฐ์ ํ๋ ฌ์ ๋ํด, ์๋ก ๊ฐ์ ์์น์ ์๋ ๊ฐ๋ผ๋ฆฌ ๋ํ๋ค.
ca, cA : Scalar multiple of vector/matrix.
ํ๋ ฌ์ด๋ ๋ฒกํฐ์ ์์(c)๋ฐฐ ํด์ค๋ค.
C = AB : Matrix-matrix multiplication
size: (3x2)(2x2) = 3x2
(1x3)(3x1) = 1x1 -> inner product ๋ด์
(3x1)(1x2) = 3x2 -> ?? poroduct ์ธ์
AB != BA: Matrix multiplication is Not commutative
ํ๋ ฌ๊ณฑ์์๋ ๊ตํ๋ฒ์น์ด ์ฑ๋ฆฝํ์ง ์์ต๋๋ค.
A(B+C) = AB + AC: Distributive
A(BC) = (AB)C: Associative
(AB) transpose = B transpose A transpose: Property of transpose
(AB) inverse = B inverse A inverse
Linear Equation and Linear System
์ ํ๋ฐฉ์ ์๊ณผ ์ ํ์์คํ
์ ํ๋ฐฉ์ ์: ์ฃผ์ด์ง ๋ณ์๋ค
์ ํ์์คํ Linear System: ์ ํ๋ฐฉ์ ์์ ์งํฉ Set of Equations
A system of linear equations (or a linear system) is a collection of one or more linear equations involving same variables x.
From Multiple Equations to Single Matrix Equation
Multiple equations can be converted into a single matrix equations.
ํญ๋ฑํ๋ ฌ Identity Matrix
(0,0)๋ถํฐ (n,n)๊น์ง ๋๊ฐ์ ์ ์์นํ ๊ฐ์ 1 ๋๋จธ์ง๋ 0์ธ ์ ์ฌ๊ฐ ํ๋ ฌ.
identity matrix๋ผ ๋ถ๋ฅด๋ ์ด์ ๋, ์ด๋ค matrix์ ๊ณฑํ๋๋ผ๋ ์๊ธฐ์์ ์ ๊ฒฐ๊ณผ๊ฐ์ผ๋ก ๋ฐํํ๊ฒ ํ๊ธฐ ๋๋ฌธ์ด๋ค.
I x = x
์ญํ๋ ฌ Inverse Matrix
์ ์ฌ๊ฐํ๋ ฌ์ผ๋,
A A inversed = A inversed A = I
ํญ๋ฑํ๋ ฌ์ ์ด์ฉํด ์ญํ๋ ฌ์ ๊ณ์ฐํ ์ ์๋ค.
A A inversed = A inversed A = I
์ด ๊ตํ๋ฒ์น์ด ์ฑ๋ฆฝํ์ง ์๋ ๊ฒฝ์ฐ๊ฐ ์์?
์ง์ฌ๊ฐํ๋ ฌ์ผ๋,
ํญ๋ฑํ๋ ฌ์ ๋ง๋ค์ด๋ด๋ ํ๋ ฌ A์ ์ญํ๋ ฌ์ ์ฐพ์ ์ ์๋๊ฐ?
์์ ์ชฝ์ผ๋ก ๊ฐ๋ฉด ๊ตฌํ ์ ์๋๋ฐ.
ํฐ ์ชฝ์ผ๋ก ๊ฐ๋ฉด ์๋๋ค.
-> ๊ตํ๋ฒ์น ์ฑ๋ฆฝํ์ง ์๋๋ค.
Non-Invertible Matrix A for Ax = b
If A is invertible, the solution uniquely obtained as x = A inversed b
A์ ์ญํ๋ ฌ์ ๊ตฌํ ์ ์๋ค๋ฉด, ๋ต์ ์ ์ผํ๊ฒ ๊ฒฐ์ ๋๋ค.
What if A is non-invertible, the inverse does not exist?
Does a Matrix Have an Inverse Matrix? det A
det A determines whether A is invertible (when det A != 0) or not (when det A == 0) for every squre matrix.
์ ๋ฐฉํ๋ ฌ A๊ฐ invertibleํ์ง(det A != 0)) ์๋์งdet A == 0)๋ฅผ ๊ฒฐ์ ํ๋ ์ซ์.
1. det I = 1
2. Exchange row: reversed sign of det
3. determinant, linearity
4. 2 Equal row -> det = 0
Exchange those rows -> same matrix
5. Subtract l * row i from row k
Det doesn't change.
6. Row of Zeros -> det A = 0
Rectangular Matrix A in A
x
=
b
under-determined system (equations<variables)
Usually, infinitely many solutions exist.
์์ ๊ฐฏ์๋ณด๋ค ๋ฏธ์ง์์ ๊ฐฏ์๊ฐ ๋ ๋ง์๋, ๋๊ฒ ๋ฌด์ํ ์์ ํด๊ฐ ์กด์ฌํ๋ค.
๋จธ์ ๋ฌ๋ approach:
data item์ด ์์ฒญ๋๊ฒ ๋ง๊ณ feature ๊ฐ์๋ ๊ทธ๋ณด๋ค ์ ๋ค๋ฉด,
์ ํํ ํด๋ ์ฐพ์ ์ ์์ง๋ง ๊ทธ์ ๊ทผ์ ํ ๊ทผ์ฌ ํด๋ฅผ ๋ํ๋ด๊ณ ์ ํ๋๊ฒ -> Least Square
over-determined system (equations>variables)
Usually, no solution exists.
๋ง์กฑํด์ผํ๋ ์์ด ๋ฏธ์ง์์ ๊ฐฏ์๋ณด๋ค ๋ ๋ง์๋, ๋๊ฒ ํด๊ฐ ์กด์ฌํ์ง ์๋๋ค.
ML approach:
data item์ ์์ ๋นํด feature ๊ฐฏ์๊ฐ ์์ฒญ๋๊ฒ ๋ง๋ค๋ฉด,
์ ๊ทํ Reqularization์ ํ์ฉํ๋ค.
Reference:
์ ํ๋ฐฉ์ ์๊ณผ ์ ํ์์คํ - ์ฃผ์ฌ๊ฑธ, edwith
Properties of determinants - MIT OC
Determinant formulas and cofactors - MIT OC