Download (Linear Algebra) & B (Convex and Concave Functions)

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Matrix completion wikipedia , lookup

Capelli's identity wikipedia , lookup

Covariance and contravariance of vectors wikipedia , lookup

Linear least squares (mathematics) wikipedia , lookup

System of linear equations wikipedia , lookup

Shapley–Folkman lemma wikipedia , lookup

Rotation matrix wikipedia , lookup

Eigenvalues and eigenvectors wikipedia , lookup

Jordan normal form wikipedia , lookup

Matrix (mathematics) wikipedia , lookup

Principal component analysis wikipedia , lookup

Determinant wikipedia , lookup

Four-vector wikipedia , lookup

Singular-value decomposition wikipedia , lookup

Orthogonal matrix wikipedia , lookup

Non-negative matrix factorization wikipedia , lookup

Perron–Frobenius theorem wikipedia , lookup

Gaussian elimination wikipedia , lookup

Cayley–Hamilton theorem wikipedia , lookup

Matrix calculus wikipedia , lookup

Matrix multiplication wikipedia , lookup

Transcript
APPENDIX A: REVIEW OF LINEAR ALGEBRA
APPENDIX B: CONVEX AND CONCAVE
FUNCTIONS
V. Sree Krishna Chaitanya
3rd year PhD student
Advisor: Professor Biswanath Mukherjee
Networks Lab
University of California, Davis
June 4, 2010
APPENDIX A: REVIEW OF LINEAR
ALGEBRA
• Sets
• Vectors
• Matrices
• Convex Sets
Set Theory
• Set is a well-defined collection of things.
• Example: set S ={ x|x>= 0}, is a set of all non-negative
numbers.
• x = 2 is an element of S. Denoted as 2 Є S.
• Union of two sets: is another Set.
• R = {x|x Є P or x Є Q or both}
• Intersection of two sets: is another set.
• R = {x|x Є P and x Є Q}
• Subset: Denoted as P  Q, every element P is in Q.
• Disjoint Sets: No elements in common.
• Empty Set: Φ
Vectors
• Vector is an ordered set of real numbers.
• a = (a1,a2,…….,an) is a vector of n elements or
components.
• a = (a1,a2,…….,an), b = (b1,b2,…….,bn)
• a + b = c = (a1 + b1,a2 + b2,…….,an + bn)
• a – b = d = (a1 - b1,a2 - b2,…….,an – bn)
• For any scalar α positive or negative,
• αa = (αa1,αa2,…….,αan)
• Vector (0, 0,….,0) is called null vector.
• Inner product or scalar product of two vectors, written
as a.b is a number.
• a.b = (a1b1,a2b2,…….,anbn)
Vectors
• Linearly Dependent: Vectors a1, a2, a3,……, an are linearly
dependent, if there exist scalars α1, α2,…, αn (not all zero),
such that
n
 a
i 1
i i
0
• One vector can be written as linear combination of others,
a1  2 a2  3a3  ....  n an
• Vector Space: A set of all n-component vectors (Euclidean nspace).
• Spanning: A set of vectors span a vector space V, if every
vector in V can be expressed as linear combination of vectors
in that set.
• Basis: A set of linearly independent vectors that span the
vector space V.
Linear Dependence
v1'  5 12 
v2'  10
5
12

24 
10   v1' 
 '

24  v2 
2v1/  v2/  0 /
 2
1
 4
v1    v2    v3   
7 
8
5 
3v1  2v2
 6 21  2 16
 4 5  v3
3v1  2v2  v3  0
Matrices
• A matrix A of size m x n is a rectangular array of
numbers with m rows and n columns
1 2 3
A 
(
2
• x3) 4 5 6 is a matrix of two rows and three columns
• (i, j)th element of A is denoted by aij. a12 = 2 and a23 = 6.
• The elements (aij) for i = j are called diagonal elements.
• Elements of each column of a matrix is called column
vector.
• Elements of each row of a matrix is called row vector.
• A matrix with equal number of rows and columns is
called square matrix.
Matrices
• Transpose of A: Matrix obtained by interchanging
rows and columns of A.
• Denoted by A’ or AT. AT = [aji]
• AT = 1 4
2

3
5
6
• Symmetric Matrix: AT = A
• Identity Matrix: A square matrix whose diagonal
elements are all 1 and off-diagonal elements are
all zero. Denoted by I.
• Null Matrix: A matrix whose all elements are zero.
Matrix Operations
• Sum or difference of two matrices A and B is a
matrix C.
• C = A  B, cij = aij  bij
• Product AB is defined if and only if, the no. of
columns of A is equal to no. of rows of B
• If A is an m x n matrix and B is an n x r matrix,
then AB = C is a matrix of size m x r.
th element of C is given by
• The (i, j)
n
cij   aik bkj
k 1
Matrix Addition
I
f
a11 a12 
A  
a 21 a 22 

and
b11 b12 
B  
b 21 b 22

then
a11  b11 a12  b12 
C  
a 21  b 21 a 22  b22 

Matrix Multiplication
a11 a12 
A  
a 21 a 22 

[2 x 2]
b11 b12 b13 
B  
b 21 b 22 b 23

[2 x 3]
a11b11  a12b21 a11b12  a12b22 a11b13  a12b23 
C

a 21b11  a 22b21 a 21b12  a 22b22 a 21b13  a 22b 23
[2 x 3]
Matrix Operations
•
•
•
•
•
•
•
•
•
For any scalar α, αA = [αaij]
(A + B) + C = A + (B + C)
A+B=B+A
(A+B)C = AC + BC
AB ≠ BA
(AB)C = A(BC)
IA = AI = A
(A + B)T = AT + BT
(AB)T = BTAT
Determinant of a Square Matrix
• Denoted by A .
• If A is 2 x 2 matrix, then
a11 a12
A
 a11a22  a12a21
a21 a22
n
A   ai1 (1)i 1 M i1
• If A is n x n matrix, then
, where
i 1
Mi1 is a sub-matrix obtained by deleting row i
and column 1 of A.
• Singular Matrix: Determinant is zero.
• Non-singular Matrix: Determinant is not zero.
Example
1 2 3
A  4 5 6
( 3 x 3)
7 8 9
5 6
2 3
2 3
A 1
4
7
8 9
8 9
5 6
 (45  48)  4(18  24)  7(12  15)  0
A is singular
Inverse of a Matrix
• The inverse of a matrix A is denoted by A-1.
• It is defined only for non-singular square
matrices.
• AA-1 = I (identity matrix)
Ax  b
• Unknown set of values x can be found by
inverse of matrix A
x  A1Ax  A1b
Example
Inverse Matrix:
A 
2x2
 a b


 c d
A
1

1  d  b
ad  bc  c a 
In words:
•Take the original matrix.
•Switch a and d.
•Change the signs of b and c.
•Multiply the new matrix by 1 over the determinant of the original matrix.
Condition of a Matrix
• Condition of a Matrix: Measure of the numerical
difficulties likely to arise when the matrix is used
in calculations.
• For example, consider Q( x)  xT A1 x
• If small changes in x, produce large changes in Q(x),
then matrix A is ill-conditioned.
K ( A) 
h
l
• Condition Number of a Matrix:
, where λh
and λl are Eigen values of greatest and smallest
modulus.
• If condition number is large, then ill-conditioned.
• If condition number is close to 1, then wellconditioned.
Quadratic Forms
• A function of n variables f(x1,x2,…..,xn) is called
a quadratic form if
•
n
n
f ( x1 , x2 ,...., xn )   qij xi x j  xT Qx,
xT
i 1 j 1
where Q(nxn) = [qij]
and = (x1,x2,…..,xn).
• Q is assumed to be symmetric.
• Otherwise, Q can be replaced with the symmetric
matrix (Q+QT)/2 without changing value of the
quadratic form.
Definitions
• A matrix Q is positive definite when xTQx > 0
for all x ≠ 0.
•
 2  1
Q

 1 2 
is positive definite.
• A matrix Q is positive semi-definite when xTQx
≥ 0 for all x and there exists an x ≠ 0 such that
xTQx = 0.
•
 1  1
Q

 1 1 
is positive semi-definite.
• A matrix Q is negative definite when xTQx < 0
for all x ≠ 0.
•
 1  1
Q

 1 1 
is negative definite.
Definitions
• A matrix Q is negative semi-definite when –Q
is positive semi-definite.
•
 1 1 
Q

 1  1
is negative semi-definite.
• A matrix Q is indefinite when xTQx > 0 for
some x and < 0 for other x.
•
1  1
Q

1 2 
is indefinite.
Principal Minor
• Principal minor of order k: A sub-matrix obtained
by deleting any n-k rows and their corresponding
columns from an n x n matrix Q.
1 2 3
• Consider Q  4 5 6


7 8 9
• Principal minors of order 1 are diagonal elements
1, 5, and 9.
1 2 1 3
5 6
• Principal minors of order 2 are 4 5, 7 9 and 8 9

 



• Principal minor of order 3 is Q.
• Determinant of a principal minor is called
principal determinant.
• There are 2n-1 principal determinants for an n x n
matrix.
Leading Principal Minor
• The leading principal minor of order k of an n x n
matrix is obtained by deleting the last n-k rows
and their corresponding columns.
•
1 2 3
Q  4 5 6
7 8 9
• Leading principal minor of order 1 is 1.
• Leading principal minor of order 2 is 1 2
4 5


• Leading principal minor of order 3 is Q itself.
• No. of leading principal determinants of an n x n
matrix is n.
Tests
• Tests for positive definite matrices
• All diagonal elements must be positive.
• All the leading principal determinants must be
positive.
• Tests for positive semi-definite matrices
• All diagonal elements are non-negative.
• All the principal determinants are non-negative.
• Tests for negative definite and negative semidefinite matrices
• Test the negative of the matrix for positive
definiteness or positive semi-definiteness.
• Test for indefinite matrices
• At least two of its diagonal elements are of opposite
sign.
Convex Sets
• A set S is convex set if for any two points in
the set the line joining those two points is also
in the set.
• S is a convex set if for any two vectors x(1) and
x(2) in S, the vector x = λ x(1) +(1-λ) x(2) is also in
S for λ between 0 and 1.
Convex Sets
• The intersection of convex sets is a convex set
(Figure A.4).
• The union of convex sets is not necessarily a
convex set (Figure A.4).
Convex Sets
• A convex combination of vectors x(1) , x(2),…., x(n) is
a vector x such that
• x = λ1x(1)+λ2x(2)+…+λkx(k)
• λ1+λ2+…+λk = 1
• λi≥0 for i = 1,2,….,k
• Extreme point: A point in convex set that cannot
be expressed as the midpoint of any two points in
the set
• Convex set S = {(x1 ,x2)|0≤x1≤2,0≤x2≤2}
• This set has four extreme points (0,0), (0,2),(2,0) and
(2,2)
• A hyperplane is a convex set.
APPENDIX B: CONVEX AND
CONCAVE FUNCTIONS
Convex Function
• Convex function: A function is convex on set D
if and only if for any two points x(1) and x(2) Є D
and 0 ≤ λ ≤ 1,
• f[λx(1) + (1-λ)x(2)] ≤ λf(x(1) ) +(1- λ) x(2)
Properties of Convex Functions
Property 4
• The linear approximation of f(x) at any point in
the interval always underestimates the true
function value
f ( x)  f ( x 0 )  f ( x 0 )( x  x 0 ) for all x
Convexity of a Function
• The Hessian matrix of a function f(x1, x2 ,…, xn) is
an n x n symmetric matrix given by
 2f 
2
H f ( x1 , x2 ,...., xn )  
  f
x1x2 
• Test for convexity of a function: A function f is
convex if the Hessian matrix of f is positive
definite or positive semi-definite for all values of
x1, x2 ,…, xn.
• Test for concavity of a function: A function f is
convex if the Hessian matrix of f is negative
definite or negative semi-definite for all values of
x1, x2 ,…, xn.
Example
f ( x1 , x2 , x3 )  3x  2 x  x  2 x1 x2  2 x1 x3  2 x2 x3  6 x1  4 x2  2 x3
2
1
2
2
2
3
 6 x1  2 x2  2 x3  6 


f ( x1 , x2 , x3 )   4 x2  2 x1  2 x3  4 
 2x  2x  2x  2 
 3 1 2 
 6  2  2
H f ( x1 , x2 , x3 )   2 4 2 
 2 2 2 
• H is a symmetric.
• All diagonal elements are positive.
• The leading principal determinants are
6 0
6 2
 20  0
2 4
H f  16  0
• H is a positive-definite matrix , which implies f is convex function