Linear Algebra and its applications(Gilbert Strang)
2015. 10. 21
Symmetric Matrix = LDLT
differential Matrix는 Sysmmetric, Positive Definite
2015. 10. 22
Partial pivoting : 컴퓨터 연산시 큰 Pivot이 위로 올라가게 Permutation Matrix를 꾸며서 Gauss Elimination을 수행할때 |Lij|<1으로 설정하여 Roundoff Error를 줄인다.
2015. 10. 24
Vector Space의 정
1. x+y is in the subpsace
2. cx is inthe subspace
column space = C(A) = {b|Ax=b}
Null space = N(A) = {x|Ax=0}
2015. 10. 25
Retangular matrix (not square) can be converted to echelon form(staricase pattern, pivot이 Diagonal에 있지 않은 형태)
==> 더 정리하면 row reduce form으로 변경됨(쉽게 column, null Space를 찾아, complete solution을 찾을수 있다.)
2015. 10. 29
rank(AB)<=rank(A)
2015. 11. 4
Column Space : C(A) = r
null space : N(A) = n-r
Row Space : C(AT) = r , C(A)의 Dimension과 항상 동일하다
left null space : m-r
null space는 kernel of A로도 쓰인다
2015. 11. 10
Rank(A) = m ==> Right Inverse 존재(not unique) ==> 근이 많다 AT(AAT)-1
Rank(A) = n ==> Left Inverse 존재 ==> 근이 하나 (ATA)-1AT
if Rank(A) == 1 , A = uvT
2015. 11. 13
Vectors in the column space and left nullspace are perpendicular
2015. 11. 14
Graph 이론 Graph는 loop를 형성하며 모든 노드를 지나가는 선 Tree는 loop없이 모든 노드를 지나가는 선
Euler's formular : # nodes - #edges + # loop = 1
2015. 11. 19
Fundamental Equation : ATCAx=ATCb-f
2015. 12. 4
ATA = 대칭, A와 null space가 같다
2015. 12. 5
3D LeastSquare
function [m,p,s] = best_fit_line(x,y,z);
% x,y,z are n x 1 column vectors of the three coordinates
% of a set of n points in three dimensions. The best line,
% in the minimum mean square orthogonal distance sense,
% will pass through m and have direction cosines in p, so
% it can be expressed parametrically as x = m(1) + p(1)*t,
% y = m(2) + p(2)*t, and z = m(3)+p(3)*t, where t is the
% distance along the line from the mean point at m.
% s returns with the minimum mean square orthogonal
% distance to the line.
% RAS - March 14, 2005
[n,mx] = size(x); [ny,my] = size(y); [nz,mz] = size(z);
if (mx~=1)|(my~=1)|(mz~=1)|(ny~=n)|(nz~=n)
error('The arguments must be column vectors of the same length.')
end
m = [mean(x),mean(y),mean(z)];
w = [x-m(1),y-m(2),z-m(3)]; % Use "mean" point as base
a = (1/n)*w'*w; % 'a' is a positive definite matrix
[u,d,v] = svd(a); % 'eig' & 'svd' get same eigenvalues for this matrix
p = u(:,1)'; % Get eigenvector for largest eigenvalue
s = d(2,2)+d(3,3); % Sum the other two eigenvalues
2015. 12. 7
Weighted Least Square에서 error variance가 2일 때 weight는 1 이다
2015. 12. 8
Q(othogonal matrix)의 Transform에서는 길이가 변하지 않는다.
2015. 12. 15
Q Matrix Means Orthonormal columns
Qx=b, QTQx=QTb, x=QTb
A maxrix를 Gram schmit로 변환하고 나면 연산이 편하다.
QTQ = I 이므로 Least Square의 안정성이 증가한다
2015. 12. 24
Hilbert Space는 dimension이 무한대 이므로 함수도 포함된다.
Polynomial은 orthogonal 하지 않지만 -1
2015.12.28
determinant는 부피를 계산하는 것이 쓰일 수 있다.
2016.01.04
EigneValue를 구하는 공식은 없다.
det(A-I)가 5차 이상이면 즉 lambda^5의 근해 공식이 없다.
trace(A) = ()
det(A) = ()
eigenvalue로의 대각화 가능 여부(Eigenvector의 개수)와 역행렬 가능 여부(eigenvalue가 0이 없음)는 다르다.
AB=BA인 경우 A와 B의 eigenvector는 같다.
markove matrix는 각 column의 합이 1, 음수 항은 없다.
⇒ A markov matrix has all aij>0, with each column adding to 1.
positive matrix (not positive definite matrix) has all aij>0
⇒ eigenvector of largest eigenvalue is positive.
2016.01.05
미방을 푸는데 Eigenvalue가 중근이면 generalized eigenvector가 도입되어야 하고 이런 경우가 Jordan Form으로 나타난다
If A is skew-sysmmetric(AT = -A) then eAt is an orthogonal matrix
2016.01.06
Every sysmmetric matrix(Hermitian matrix) has real eigenvalue.
Its eigenvectors can be chosen to be orthonormal
A가 sysmmetric하여 A=QQT로 변환되면 spectral theorem이라 한다.
여기서 Q는 orthonomal한 Eigenvector로 특정축으로 투영된 값이 에 반영되므로 저렇게 명명된다.
2016.01.12
Symmetric, skew-sysmmetric, orthogonal, Hermition, skew Hermition, and unitary matrices are called “normal matrix”.
Normal matrices are exactly those that have a complete set of orthonomal eigenvectos. ⇒ Diagonalizable
2016.01.15
함수 F의 Taylor series는 아래와 같다.
F(x) = F(0) +xT(grad F)+12xTAx+higer order terms
F의 최대 최소를 찾기 위해서는 Taylor series의 2차항만을 확인하여도 된다.
즉 A의 positive(negative) definite를 확인하면 된다.
2016.01.18
Positive Definite Test 방안
(1)xTAx>0for all nonzero real vectors x.
(2) All the eigenvalues of A satisfy i>0
(3) All the upper left submatrices Ak have positive determinants.
(4) All the pivots (without row exchanges) satisfy dk>0
2016.1.19
Congruence transformation A→ CTAC for some nonsingular C
CTAC has the same number of positive eigenvalues, negtive eigenvalues, and zero eigenvalues as A.
For any sysmmetric matrix A=LDLT은 Pivots의 부호와 eigenvalue의 부호가 같다.
⇒ eigenvalue 찾는 방법으로 쓸 수 있다.
Mu''+Au=0⇒ Ax=Mx⇒ RTRx⇒ AR-1y=Ry
2016.1.21
Lagrange multipliers.
P(x) = 12xTAx-xTb, Cx=d ( Constraint ) ⇒ 문제를 풀기 위해 y를 도입한다.
L(x,y) = 12xTAx-xTb+yT(Cx-d)
L(x,y)를 x와 y에 대해서 미분하면 x와 y가 구해진다. ( P(x)와 Cx최소가 되는 것은 둘의 방정식이 하나의 접점을 갖는 경우 즉 L(x,y)=0,둘의 접선의 기울기가 같은 경우 )
minimum = 112bTAb+yT(Cx-d)
Rayleigh Quotient
R(x1)=x1TAx1x1Tx1=x1Tx1x1Tx1
minR(x)max
2016.01.25
컴퓨터로 Matrix 연산 시 자릿수에 의한 오차 분석
최대 오차를 Condition Number(c)라고 부른다.
Matrix가 symmetric하면 c = max/min
Matrix가 unsymmetric하면 c = ||A||||A-1|| ||A|| = max||Ax||||x||
Matrix Norm
The norm of A measures the largest amount by which any vector is amplified by matrix multiplication : ||A|| = max||Ax||||x||