420 likes | 752 Views
Linear Algebra, Principal Component Analysis and their Chemometrics Applications. Linear Algebra. Linear algebra is the language of chemometrics . One can not expect to truly understand most chemometric techniques without a basic understanding of linear algebra. y. y 1. x 1. x. Vector.
E N D
Linear Algebra, Principal Component Analysis and their Chemometrics Applications
Linear Algebra Linear algebra is the language of chemometrics. One can not expect to truly understand most chemometric techniques without a basic understanding of linear algebra
y y1 x1 x Vector A vector is a mathematical quantity that is completely described by its magnitude and direction P
y y1 x1 P = y1 x1 x Vector A vector is a mathematical quantity that is completely described by its magnitude and direction P
= x12 + y12 P P y n M = ( xi2 ) 0.5 x y1 i=1 x u x u = =1 x1 x Length of a Vector x = [x1, x2, …, xn] Normal Vector
x1 - mx x1 x2 x2 - mx xi n M mx = mcx = n … x = … i=1 xn xn - mx -1 0 0+2 2 -1 0 0+2 2 0 1 1+2 3 4 x = 5 mcx = y = 5+2 = 7 0 1 1+2 3 -1 0 0+2 2 -1 0 0+2 2 Mean Centered Vector mx = 1 mx = 3
Mean centered Mean centered
y1 - my y1 ? y2 - my y2 y* = … y = … yn - my yn ≈ sy y* i The length of a mean centered vector is proportional to the standard deviation of its elements
A set of p vectors [x1, x2, …, xp] with same dimension n is linearly independent if the expression: p ci xi = 0 M i=1 holds only when all p coefficients ci are zero x1 x3 c1x1 x2 c2x2 Linear Independent Vectors
Vector Space A vector space spanned by a set of p linearly independent vectors (x1, x2, …, xp) with the same dimension n is the set of all vectors that are linear combinations of the p vectors that span the space Basis set A set of n vectors of dimension n which are linearly independent is called a basis of an n-dimensional vector space. There can be several bases of the same vector space Coordinate Space A coordinate space can be thought of as being constructed from n basis vectors of unit length which originate from a common point and which are mutually perpendicular
a x1 Q = a P = a y1 y a y1 y1 x a x1 x1 Vector Multiplication by a Scalar Q P
y = 2.38 x = 1.19 y x y = 2 x
Addition of Vectors x1 + y1 x2 + y2 x + y = + = x1 x2 … … xn + yn y1 y2 xn x2 + y2 x + y x2 … x yn y2 y y1 x1 + y1 x1
Component 1 Component 2 mixture ex1cx ex2cx ax + ay = + = … exncx ey1cy ey2cy ex1cx +ey1cy ex2cx +ey2cy … … eyncy exncx +eyncy ax + ay ay ax
Subtraction of Vectors x1 - y1 x2 - y2 x - y = - = x1 x2 … … xn - yn y1 y2 xn x2 … x yn y2 y y1 x1 x - y
Inner Product (Dot Product) x1 x2 … = xn 2 x y x x . y = xTy = cos q x . y cos q = y x x . x = xTx = [x1 x2 … xn] = x12 + x22 + … +xn2 The cosine of the angle of two vectors is equal to the dot product between the normalized vectors:
x y x x . y = y x y x x . y = - y y x x y = = 1 x . y = 0 Two vectors x and y are orthogonal when their scalar product is zero x . y = 0 and Two vectors x and y are orthonormal