Linear Algebra Review

Similar documents
Linear Algebra Review and Reference

Knowledge Discovery and Data Mining 1 (VO) ( )

Linear Algebra Formulas. Ben Lee

MATH 240 Spring, Chapter 1: Linear Equations and Matrices

Chapter 3 Transformations

2. Linear algebra. matrices and vectors. linear equations. range and nullspace of matrices. function of vectors, gradient and Hessian

Basic Elements of Linear Algebra

EE731 Lecture Notes: Matrix Computations for Signal Processing

DS-GA 1002 Lecture notes 0 Fall Linear Algebra. These notes provide a review of basic concepts in linear algebra.

Math Bootcamp An p-dimensional vector is p numbers put together. Written as. x 1 x =. x p

Mathematical Foundations of Applied Statistics: Matrix Algebra

EE/ACM Applications of Convex Optimization in Signal Processing and Communications Lecture 2

Foundations of Matrix Analysis

Linear Algebra Massoud Malek

Math Camp Lecture 4: Linear Algebra. Xiao Yu Wang. Aug 2010 MIT. Xiao Yu Wang (MIT) Math Camp /10 1 / 88

Math 102, Winter Final Exam Review. Chapter 1. Matrices and Gaussian Elimination

Linear Algebra Highlights

MAT 610: Numerical Linear Algebra. James V. Lambers

MAT Linear Algebra Collection of sample exams

G1110 & 852G1 Numerical Linear Algebra

Massachusetts Institute of Technology Department of Economics Statistics. Lecture Notes on Matrix Algebra

Lecture 1 Review: Linear models have the form (in matrix notation) Y = Xβ + ε,

Matrices A brief introduction

Linear Algebra- Final Exam Review

A Brief Outline of Math 355

1. General Vector Spaces

Notes on Eigenvalues, Singular Values and QR

Ir O D = D = ( ) Section 2.6 Example 1. (Bottom of page 119) dim(v ) = dim(l(v, W )) = dim(v ) dim(f ) = dim(v )

STAT200C: Review of Linear Algebra

OHSx XM511 Linear Algebra: Solutions to Online True/False Exercises

Math113: Linear Algebra. Beifang Chen

Review of some mathematical tools

ELEMENTARY LINEAR ALGEBRA WITH APPLICATIONS. 1. Linear Equations and Matrices

IMPORTANT DEFINITIONS AND THEOREMS REFERENCE SHEET

Lecture Summaries for Linear Algebra M51A

1 9/5 Matrices, vectors, and their applications

Jim Lambers MAT 610 Summer Session Lecture 1 Notes

NOTES on LINEAR ALGEBRA 1

Linear Algebra March 16, 2019

1 Matrices and Systems of Linear Equations

MATRIX ALGEBRA. or x = (x 1,..., x n ) R n. y 1 y 2. x 2. x m. y m. y = cos θ 1 = x 1 L x. sin θ 1 = x 2. cos θ 2 = y 1 L y.

Notes on Linear Algebra

Elementary linear algebra

Linear Algebra Primer

Introduction to Matrix Algebra

Chapter 3. Matrices. 3.1 Matrices

IMPORTANT DEFINITIONS AND THEOREMS REFERENCE SHEET

Lecture 2: Linear Algebra Review

Math Linear Algebra Final Exam Review Sheet

Applied Mathematics 205. Unit II: Numerical Linear Algebra. Lecturer: Dr. David Knezevic

Linear Algebra. Matrices Operations. Consider, for example, a system of equations such as x + 2y z + 4w = 0, 3x 4y + 2z 6w = 0, x 3y 2z + w = 0.

Lecture 7: Positive Semidefinite Matrices

Queens College, CUNY, Department of Computer Science Numerical Methods CSCI 361 / 761 Spring 2018 Instructor: Dr. Sateesh Mane.

Equality: Two matrices A and B are equal, i.e., A = B if A and B have the same order and the entries of A and B are the same.

Eigenvalues, Eigenvectors. Eigenvalues and eigenvector will be fundamentally related to the nature of the solutions of state space systems.

MATRICES ARE SIMILAR TO TRIANGULAR MATRICES

Lecture notes: Applied linear algebra Part 1. Version 2

Linear algebra for computational statistics

APPENDIX A. Background Mathematics. A.1 Linear Algebra. Vector algebra. Let x denote the n-dimensional column vector with components x 1 x 2.

Final Review Sheet. B = (1, 1 + 3x, 1 + x 2 ) then 2 + 3x + 6x 2

Review problems for MA 54, Fall 2004.

Matrices and Vectors. Definition of Matrix. An MxN matrix A is a two-dimensional array of numbers A =

Math 4A Notes. Written by Victoria Kala Last updated June 11, 2017

ELEMENTS OF MATRIX ALGEBRA

Numerical Linear Algebra

Numerical Linear Algebra

Fundamentals of Engineering Analysis (650163)

ANSWERS (5 points) Let A be a 2 2 matrix such that A =. Compute A. 2

Matrices A brief introduction

LINEAR ALGEBRA BOOT CAMP WEEK 4: THE SPECTRAL THEOREM

LINEAR ALGEBRA SUMMARY SHEET.

AM 205: lecture 8. Last time: Cholesky factorization, QR factorization Today: how to compute the QR factorization, the Singular Value Decomposition

Duke University, Department of Electrical and Computer Engineering Optimization for Scientists and Engineers c Alex Bronstein, 2014

Introduction to Linear Algebra, Second Edition, Serge Lange

Properties of Matrices and Operations on Matrices

Linear Algebra & Analysis Review UW EE/AA/ME 578 Convex Optimization

Problem Set (T) If A is an m n matrix, B is an n p matrix and D is a p s matrix, then show

j=1 x j p, if 1 p <, x i ξ : x i < ξ} 0 as p.

Linear Algebra Review

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 1 x 2. x n 8 (4) 3 4 2

Math 350 Fall 2011 Notes about inner product spaces. In this notes we state and prove some important properties of inner product spaces.

Linear Algebra. Christos Michalopoulos. September 24, NTU, Department of Economics

Chapter 5 Eigenvalues and Eigenvectors

GQE ALGEBRA PROBLEMS

Introduction to Numerical Linear Algebra II

The University of Texas at Austin Department of Electrical and Computer Engineering. EE381V: Large Scale Learning Spring 2013.

Chapter 4 - MATRIX ALGEBRA. ... a 2j... a 2n. a i1 a i2... a ij... a in

Matrices A brief introduction

B553 Lecture 5: Matrix Algebra Review

CS 246 Review of Linear Algebra 01/17/19

NORMS ON SPACE OF MATRICES

MAT 2037 LINEAR ALGEBRA I web:

Preliminary/Qualifying Exam in Numerical Analysis (Math 502a) Spring 2012

Math 6610 : Analysis of Numerical Methods I. Chee Han Tan

33AH, WINTER 2018: STUDY GUIDE FOR FINAL EXAM

Lecture Notes in Linear Algebra

Mathematical Methods wk 2: Linear Operators

Linear Algebra Review. Vectors

Lecture 2: Linear operators

The Singular Value Decomposition

Transcription:

Linear Algebra Review Contents 1 Basic Concepts and Notations 2 2 Matrix Operations and Properties 3 21 Matrix Multiplication 3 211 Vector-Vector Products 3 212 Matrix-Vector Products 4 213 Matrix-Matrix Products 5 214 Kronecker Products 5 215 Block Matrix Products 6 22 The Transpose 6 23 Symmetric Matrices 7 24 The Trace 7 25 Vector Norms 7 26 Vector Spaces 8 27 Orthogonality 8 28 The Rank 9 29 Range and Nullspace 10 210 QR Factorization 10 211 Matrix Norms 11 2111 Induced Matrix Norms 11 2112 General Matrix Norms 12 212 The Inverse 13 213 The Determinant 14 214 Schur Complement 16 3 Eigenvalues and Eigenvectors 16 31 Definitions 16 32 General Results 17 33 Spectral Decomposition 18 331 Spectral Decomposition Theorem 18 332 Applications 19 4 Singular Value Decomposition 19 41 Definitions and Basic Properties 19 42 Low-Rank Approximations 20 43 SVD vs Spectral Decomposition 22 5 Quadratic Forms and Definiteness 22 6 Matrix Calculus 24 61 Notations 24 62 The Gradient 24 63 The Hessian 25 64 Least Squares 25 65 Digression: Generalized Inverse 27 66 Gradients of the Determinant 27 67 Eigenvalues as Optimization 28 68 General Derivatives of Matrix Functions 28 7 Bibliographic Remarks 29 1

1 Basic Concepts and Notations We use the following notation: By A R m n we denote a matrix with m rows and n columns, where the entries of A are real numbers By x R n, we denote a vector with n entries An n-dimensional vector is often thought of as a matrix with n rows and 1 column, known as column vector A row vector is a matrix with 1 row and n columns, which we typically write x T (x T denote the transpose of x, which we will define shortly) The ith element of a vector x is denoted x i : x 1 x 2 x x n We use notation a ij to denote the entry of A in the ith row and jth column: a 11 a 12 a 1n a 21 a 22 a 2n A (a ij) a m1 a m2 a mn We denote the jth columns of A by a j : A a 1 a 2 a n We denote the ith row of A by a i : A a T (1) a T (2) or A a T 1 a T 2 a T (m) a T m The meanings of the notations usually should be obvious from its use when they are ambiguous A matrix written in terms of its sub-matrices is called a partitioned matrix: A 11 A 12 A 1q A 21 A 12 A 2q A, A p1 A p2 A pq where A ij R r s, m pr, and n qs Based on the Matlab colon notation, we have A ij A ( (i 1)r + 1 : ir, (j 1)s + 1 : s ) 2

Table 1: Particular matrices and types of matrix Name Definition Notation Scalar m n 1 a, b Column vector n 1 x, y All-ones vector [1,, 1] T 1 or 1 n Null a ij 0 0 Square m n A R n n Diagonal m n, a ij 0 if i j diag(a 11,, a nn ) or diag([a 11,, a nn ] T ) Identity diag(1) I or I n Symmetric a ij a ji A S n Table 2: Basic matrix operations Operation Restrictions Notations and Definitions Addition / Subtraction A, B of the same order A ± B (a ij ± b ij ) Scalar multiplication ca c(a ij ) Inner product x, y of the same order x T y x i y i Multiplication #columns of A equals #rows of B AB (a T (i) b j) Kronecker Product A B (a ij B) Transpose A T [a (1),, a (m) ] Trace A is square tr(a) a ii Determinant A is square A or det(a) Inverse A is sqaure and det(a) 0 AA 1 A 1 A I Pseudo-inverse A 2 Matrix Operations and Properties 21 Matrix Multiplication The product of two matrices A R m n and B R n p is the matrix C AB R m p, where c ij a ik b kj k1 Note that in order for the matrix product to exist, the number of columns in A must equal the number of rows in B There are many ways of looking at matrix multiplication We ll start by examining a few special cases 211 Vector-Vector Products Given two vectors x, y R n, the quantity x T y, sometimes called the inner product or dot product of the vectors, is a real number given by y 1 x T y R [ ] y 2 x 1 x 2 x n y n n x i y i 3

Note that it is always the case that x T y y T x Given x R m, y R n (not for the same size), xy T is called the outer product of the vectors It is a matrix whose entries are given by (xy T ) ij x i y j, x 1 x 1 y 1 x 1 y 2 x 1 y n xy T R m n x 2 [ ] x 2 y 1 x 2 y 2 x 2 y n y1 y 2 y n x n x m y 1 x m y 2 x m y n Consider the matrix A R m n whose columns are equal to some vector x R m Using outer products, we can represent A compactly as, x 1 x 1 x 1 x 1 A x x x x 2 x 2 x 2 x 2 [ ] 1 1 1 x1 T x m x m x m x m 212 Matrix-Vector Products Given a matrix A R m n and a vector x R n, their product is a vector y Ax R m There are a couple ways of looking at matrix-vector multiplication, and we will look at each of them in turn If we write A by rows, then we can express Ax as, y Ax a T (1) a T (2) a T (m) a T (1) x x a T (2) x a T (m) x In other words, the ith entry of y is equal to the inner product of the ith row of A and x, y i a T (i) x Alternatively, lets write A in column form In this case we see that, x 1 y Ax a 1 a 2 a n x 2 a 1 x 1 + a 2 x 2 + + a n x n x n In other words, y is a linear combination of the columns of A, where the coefficients of the linear combination are given by the entries of x So far we have been multiplying on the right by a column vector We also have similar interpretation of multiplying on the left by a row vector For A R m n and a vector x R m, which gives x T a 1 y T x T A x T a 1 a 2 a n x T a 2, x T a n y T x T A [ ] x 1 x 2 x n a T (1) a T (2) x 1 [ a T (1) ] + x 2 [ a T (m) a T (2) ] + + x n [ a T (n) ] 4

213 Matrix-Matrix Products Armed with this knowledge, we can now look at four different (but, of course, equivalent) ways of viewing the matrix-matrix multiplication C AB We can view matrix-matrix multiplication as a set of vector-vector products The most obvious viewpoint, which follows immediately from the definition, is that the (i, j)th entry of C is equal to the inner product of the ith row of A and the jth row of B C AB a T (1) a T (2) a T (m) a T (1) b 1 a T (1) b 2 a T (1) b p b 1 b 2 b p a T (2) b 1 a T (2) b 2 a T (2) b p A a T (m) b 1 a T (m) b 2 a T (m) b p Alternatively, we can represent A by columns, and B by rows This representation leads to a much trickier interpretation of AB as a sum of outer products C AB a 1 a 2 a n b T (1) b T (2) b T (n) n a i b T i We can also view matrix-matrix multiplication as a set of matrix-vector products Specifically, if we represent B by columns, we can view the columns of C as matrix-vector products between A and the columns of B C AB A b 1 b 2 b p Ab 1 Ab 2 Ab p We have the analogous viewpoint, where we represent A by rows, and view the rows of C as the matrix-vector product between the rows of A and C C AB a T (1) a T (2) a T (m) B a T (1) B a T (2) B a T (m) B In addition to this, it is useful to know a few basic properties of matrix multiplication at a higher level: Matrix multiplication is associative: (AB)C A(BC) Matrix multiplication is distributive: A(B + C) AB + AC Matrix multiplication is, in general, not commutative; that is, it can be the case that AB BA (For example, if A R m n and B R m q, the matrix product BA does not even exist if m and q are not equal!) 214 Kronecker Products The Kronecker product, denoted by, is an operation on two matrices of arbitrary size resulting in a block matrix It is a generalization of the outer product from vectors to matrices The Kronecker product should not be confused with the usual matrix multiplication, which is an entirely different operation If A is an m n matrix and B is a p q matrix, then the Kronecker product A B is the mp nq block matrix: A B a 11 B a 1n B a m1 B a mn B, 5

more explicitly: a 11 b 11 a 11 b 12 a 11 b 1q a 1n b 11 a 1n b 12 a 1n b 1q a 11 b 21 a 11 b 22 a 11 b 2q a 1n b 21 a 1n b 22 a 1n b 2q a 11 b p1 a 11 b p2 a 11 b pq a 1n b p1 a 1n b p2 a 1n b pq A B a m1 b 11 a m1 b 12 a m1 b 1q a mn b 11 a mn b 12 a mn b 1q a m1 b 21 a m1 b 22 a m1 b 2q a mn b 21 a mn b 22 a mn b 2q a m1 b p1 a m1 b p2 a m1 b pq a mn b p1 a mn b p2 a mn b pq The following properties of transposes are easily verified: A (B + C) A B + A C (A B) C A (B C) (A B)(C D) AC BD tr(a B) tr(a)tr(b) 215 Block Matrix Products A block partitioned matrix product can sometimes be used on submatrices forms The partitioning of the factors is not arbitrary, however, and requires conformable partitions between two matrices such that all submatrix products that will be used are defined Given a matrix A R m p with q row partitions and s column partitions A 11 A 12 A 1s A 21 A 22 A 2s A A q1 A q2 A qs and B R p n with s row partitions and r column partitions B 11 B 12 B 1r B 21 B 22 B 2r B, B s1 B s2 B sr that are compatible with the partitions of A, the matrix product C AB can be formed blockwise, yielding as an matrix with q row partitions and r column partitions The matrices in your matrix C are calculated by multiplying 22 The Transpose C ij s A ik B kj k1 The transpose of a matrix results from flipping the rows and columns Given a matrix A R m n, its transpose, written A T R n m, is the n m matrix whose entries are given by (A T ) ij A ji We have in fact already been using the transpose when describing row vectors, since the transpose of a column vector is naturally a row vector The following properties of transposes are easily verified: (A T ) T A (AB) T B T A T 6

(A + B) T A T + B T Sometimes, we also use quotation marks A to express the transpose of A But note that the quotation in Matlab is to express the hermitian conjugate (notated as A ), not transpose The transpose operation in Matlab should be written as dot quotation 23 Symmetric Matrices A square matrix A R n n is symmetric if A A T It is anti-symmetric if A A T It is easy to show that for any matrix A R n n, the matrix A A T is anti-symmetric From this it follows that any square matrix A R n n can be represented as a sum of a symmetric matrix and an anti-symmetric matrix, since A 1 2 (A + AT ) + 1 2 (A AT ) and the first matrix on the right is symmetric, while the second is anti-symmetric It turns out that symmetric matrices occur a great deal in practice, and they have many nice properties which we will look at shortly It is common to denote the set of all symmetric matrices of size n as S n, so that A S n means that A is a symmetric n n matrix Another property is that for A S n, x R n, y R n, we have x T Ay y T Ax, which can be verified easily 24 The Trace The trace of a square matrix A R n n, denoted tr(a) (or just tra if the parentheses are obviously implied), is the sum of diagonal elements in the matrix: The trace has the following properties: tra a ii For A R n n, tra tra T For A, B R n n, tr(a ± B) tra ± trb For A R n n, c R, tr(ca) ctra For A, B such that AB is square, trab trba For A, B, C such that ABC is square, trabc trbca trcab, and so on for the product of more matrices For A R n n, tr(a T A) a 2 ij j1 The fourth equality, where the main work occurs, uses the commutativity of scalar multiplication in order to reverse the order of the terms in each product, and the commutativity and associativity of scalar addition in order to rearrange the order of the summation 25 Vector Norms A norm of a vector x R n written by x, is informally a measure of the length of the vector For example, we have the commonly-used Euclidean norm (or l 2 norm), x 2 x T x n x 2 i More formally, a norm is any function R n R that satisfies 4 properties: 1 For all x R n, x 0 (non-negativity) 2 x 0 if and only if x 0 (definiteness) 7

3 For all x R n, t R, tx t x (homogeneity) 4 For all x, y R n, x + y x + y (triangle inequality) Other examples of norms are the l 1 norm, and the l norm, x 1 x i, x max x i i In fact, all three norms presented so far are examples of the family of l p norms, which are parameterized by a real number p 1, and defined as 26 Vector Spaces ( n x p x i p) 1/p The set of vectors in R m satisfies the following properties for all x, y R m and all a, b R a(x + y) ax + ay (a + b)x ax + bx (ab)x a(by) 1x x If W is a subset of R m such that for all x, y W and a R have a(x + y) W, then W is called a vector subspace of R m Two simple examples of subspace of R m are {0} and R m itself A set of vectors {x 1, x 2,, x n } R m is said to be linearly independent if no vector can be represented as a linear combination of the remaining vectors Conversely, if one vector belonging to the set can be represented as a linear combination of the remaining vectors, then the vectors are said to be linear dependent That is, if n 1 x n α i x i for some scalar values α 1,, α n 1, then we say that the vectors x 1,,x n are linearly dependent; otherwise the vectors are linearly independent Let W be a subspace of R n Then a basis of W is a maximal linear independent set of vectors The following properties hold for a basis of W: Every basis of W contains the same number of elements This number is called the dimension of W and denoted dim(w) In particular dim(r n ) n If x 1,, x k is a basis for W then every element x W can be express as a linear combination of x 1,, x k 27 Orthogonality Two vectors x, y R n are orthogonal if x T y 0 A vector x R n is normalized if x 2 1 A square matrix U R n n is orthogonal (note the different meanings when talking about vectors versus matrices) if all its columns are orthogonal to each other and are normalized (the columns are then referred to as being orthonormal) It follows immediately from the definition of orthogonality and normality that U T U I UU T Note that if U is not square, ie, U R m n, n < m, but its columns are still orthonormal, then U T U I, but UU T I, we call that U is column orthonormal 8

A nice property of orthogonal matrices is that operating on a vector with an orthogonal matrix will not change its Euclidean norm, Ux 2 x 2 for any x R n, U R n n orthogonal Orthogonal matrices can be used to represent a rotation, since the cosine of the angle θ [0, π] between lines from 0 to x and 0 to y will not be changed by orthogonal transformation That is, for a square matrix A R n n is orthogonal: cos θ (Ax)T Ay xt (A T A)y cos θ Ax 2 Ay 2 x 2 y 2 In two dimension space, the orthogonal matrix can be represented as [ ] cos θ sin θ sin θ cos θ and represents a rotation of the coordinate axes counterclockwise through an angle θ A basis x 1,, x k of a subspace W of R n is called orthonormal basis if all the elements have norm 1 and are orthogonal to one another In particular, if A R n n is an orthogonal matrix then the columns of A form an orthogonal basis of R n 28 The Rank The column rank of a matrix A R m n is the size of the largest subset of columns of A that constitute a linearly independent set With some abuse of terminology, this is often referred to simply as the number of linearly independent columns of A In the same way, the row rank is the largest number of rows of A that constitute a linearly independent set For any matrix A R m n, it turns out that the column rank of A is equal to the row rank of A Then we present a short proof, which uses only basic properties of linear combinations of vectors Let the column rank of A be r and let c 1,, c r be any basis for the column space of A Place these as the columns of an matrix C c 1 c 2 c r R m r Every column of A can be expressed as a linear combination of the r columns in C This means that there is a matrix Q (q ij ) R r n such that A CQ Q is the matrix whose i-th column is formed from the coefficients giving the ith column of A as a linear combination of the r columns of C a j r q ij c i c 1 c 2 c r A a 1 a 2 a n c 1 c 2 c r q 1 q 2 q n CQ q j Now, each row of A is given by a linear combination of the r rows of Q, A CQ a T (1) a T (2) c T (1) c T (2) q T (1) q T (2) [ a T (m) a T (i) ] [ c T (i) c T (m) ] Q q T (r) 9

Therefore, the row rank of A cannot exceed r This proves that the row rank of A is less than or equal to the column rank of A This result can be applied to any matrix, so apply the result to the transpose of A Since the row rank of the transpose of A is the column rank of A and the column rank of the transpose of A is the row rank of A, this establishes the reverse inequality and we obtain the equality of the row rank and the column rank of A, so both quantities are referred to collectively as the rank of A, denoted as rank(a) The following are some basic properties of the rank: For A R m n, rank(a) min(m, n) If rank(a) min(m, n), then A is said to be full rank For A R m n, rank(a) rank(a T ) For A R m n, B R n p, rank(ab) min(rank(a), rank(b)) For A, B R m n, rank(a + B) rank(a) + rank(b) 29 Range and Nullspace The span of a set of vectors {x 1,, x n } is the set of all vectors that can be expressed as a linear combination of {x 1,, x n } That is, { } span({x 1,, x n }) v : v α i x i, α i R The range (also called the column space) of matrix A R m n denote R(A) In other words, R(A) {v R m : v Ax, x R n } The nullspace of a matrix A R m n, denoted N (A) is the set of all vectors that equal 0 when multiplied by A, N (A) {x R n : Ax 0} Note that vectors in R(A) are of size m, while vectors in the N (A) are of size n, so vectors in R(A T ) and N (A) are both in R n In fact, we can say much more that {w : w u + v, u R(A T ), v N (A)} R n and R(A T ) N (A) {0} In other words, R(A T ) and N (A) together span the entire space of R n Furthermore, the Table 3 summarizes some properties of four fundamental subspace of A including the range and the nullspace, where A has singular value decomposition 1 : A UΣV T Table 3: Properties of four fundamental subspaces of rank r matrix A R m n Name of Subspace Notation Containing Space Dimension Basis range, column space or image R(A) R m r (rank) The first r columns of U nullspace or kernel N (A) R n n r (nullity) The last (n r) columns of V row space or coimage R(A T ) R n r (rank) The first r columns of V left nullspace or cokernel N (A T ) R m m r (corank) The last (m r) columns of U 210 QR Factorization Given a full rank matrix A R m n (m n), we can construct the vectors q 1,, q n and entries r ij such that r 11 r 12 r 1n A a 1 a 2 a n q 1 q 2 q n r 22 r 2n, r nn 1 Singular value decomposition will be introduced in section 4 10

where the diagonal entries r kk are nonzero, then a 1,, a k can be expressed as linear combination of q 1,, q k and the invertibility of the upper-left k k block of the triangular matrix implies that, conversely, q 1,, q k can be expressed as linear combination of a 1,, a k Written out, these equations take the form As matrix formula, we have a 1 r 11 q 1 a 2 r 12 q 1 + r 22 q 2 a 3 r 13 q 1 + r 23 q 2 + r 33 q 3 a n r 1n q 1 + r 2n q 2 + + r nn q n A ˆQ ˆR, where ˆQ is m n with orthonormal columns and ˆR is n n and upper-triangular Such a factorization is called a reduced QR factorization of A A full QR factorization of A R m n (m n) goes futher, appending an additional m n orthogonal columns to ˆQ so that it becomes an m m orthogonal matrix Q In the process, rows of zeros are appended to ˆR so that it becomes an m n matrix R Then we have A QR There is an old idea, known as Gram-Schmidt orthogonalization to construct the vectors q 1, q n and entires r ij for reduced QR factorization Let s rewrite the relationship between q 1, q n and a 1, a n, in the form q 1 a 1 r 11 q 2 a 2 r 12 q 1 r 22 q 3 a 3 r 13 q 1 r 23 q 2 r 33 q n a n n 1 r inq i r nn Let r ij q T i a j for i j, and r jj a j j 1 r ijq i 2, then we have q T i q j 0 (can be proved by induction) But how to obtain full QR factorization? 211 Matrix Norms 2111 Induced Matrix Norms An m n matrix can be viewed as a vector in an mn-dimensional space: each of the mn entries of the matrix is an independent coordinate Any mn-dimensional norm can therefore be used for measuring the size of such a matrix In dealing with a space of matrices, these are the induced matrix norms, defined in terms of the behavior of a matrix as an operator between its normed domain and range space Given vector norms (m), (n) and on the domain and the range of A R m n, respectively, the induced matrix norm A (m,n) is the smallest number C for which the following inequality holds for all x R n : Ax (m) C x (n) The induced matrix norm can be defined equivalently as following: A (m,n) Ax (m) sup sup Ax (m) x R n,x 0 x (n) x R n, x 1 11

Note that the (m) and (n) in subscript are only represented the dimensionality of vectors, rather than l m or l n norm The notations (m) and (n) can be any the same type of vector norm For example, if A R m n, then its 1-norm A 1 is equal to the maximum column sum of A We explain and derive this result as follows Let s write A in terms of its columns A a 1 a 2 a n Any vector x in the set {x R n : n x i 1} satisfies Ax 1 1 x i a i x i a i ( x i ) max a j 1 1 j n max 1 j n a j 1 By choosing x be the vector whose jth entry is 1 and others are zero, where j maximizes a j 1, we attain this bound, and thus the matrix norm is A 1 max 1 j n a j 1 By much the same argument, it can be shown that the -norm of an m n matrix is equal to the maximum row sum A max 1 i m a (i) 1 Computing matrix p-norms with p 1, is more difficult Then we provide a geometric example of some induced matrix norms Let s consider the matrix [ ] 1 2 A, 0 2 which maps R 2 to R 2 by multiplication Figure 1 depicts the action of A on the unit balls of R 2 defined by the 1-, 2- and -norms Regardless of the norm, A maps e 1 [1, 0] T to the first column of A itself, and e 2 [0, 1] T to the second column of A In the 1-norm, the vector whose norm is 1 that is amplified most by A is [0, 1] T (or its negative), and the amplification factor is 4 In the -norm, the vector whose norm is 1 that is amplified most by A is [1, 1] T (or its negative), and the amplification factor is 3 In the 2-norm, the vector whose norm is 1 that is amplified most by A is [0, 1] T is the vector indicated by the dash line in the figure (or its negative), (9 + 65)/2) We will consider and the amplification factor is approximately 29208 (the exact value is how to get 2-norm again in section 332 2112 General Matrix Norms Matrix norms do not have to be induced by vector norms In general a matrix norm must merely satisfy the vector norm conditions applied in the mn-dimensional vector space of matrices: 1 For all A R m n, A 0 (non-negativity) 2 A 0 if and only if a ij 0 (definiteness) 3 For all A R m n, t R, ta t A (homogeneity) 4 For all A, B R m n, A + B A + B (triangle inequality) The most important matrix norm which is not induced by a vector norm is Frobenius norm (or F-norm), for A R m n, defined by m A F tr(a T A) a 2 ij j1 12

Figure 1: On the left, the unit balls of R 2 with respect to 1, 2 and On the right, their images under multiplying the matrix A on left Dashed lines mark the vectors that are amplified most by A in each norm The Frobenius norm can be used to bound products of matrices Let C AB (c ij ) R m n, by Cauchy-Schwarz inequality we have c ij a (i) 2 b j 2 Then we obtain AB 2 F m j1 m j1 c 2 ij ( a (i) 2 b j 2 ) 2 ( m )( n ) ( a (i) 2 2 b j 2 2 A 2 F B 2 F One of the many special properties of Frobenius norm is that, it is invariant under multiplication by orthogonal matrix The same property holds for matrix 2-norm, that is for any A R m n and orthogonal Q R m m, we have j1 QA F A F, QA 2 A 2 To the end of this section, consider why Frobenius norm can not be induced by a vector norm? 212 The Inverse The inverse of a square matrix A R n n is denoted A 1, and is the unique matrix such that A 1 A I AA 1 Note that not all matrices have inverses Non-square matrices, for example, do not have inverses by definition However, for some square matrices A, it may still be the case that A 1 may not exist In particular, we say that A is invertible or non-singular if A exists and non-invertible or singular otherwise In order for a square matrix A to have an inverse A 1, then A must be full rank We will soon see that there are many alternative sufficient and necessary conditions, in addition to full rank, for invertibility The following are properties of the inverse; all assume that A, B R n n are non-singular and c R: 13

(A 1 ) 1 A (ca) 1 c 1 A 1 (A 1 ) T (A T ) 1 (AB) 1 B 1 A 1 A 1 A T if A R n n is orthogonal matrix Additionally, if all the necessary inverse exist, then for A R n n, B R n p, C R p p and D R p n, the Woodbury matrix identity says that (A + BCD) 1 A 1 A 1 B(C 1 + DA 1 B) 1 DA 1 This conclusion is very useful to compute inverse of matrix more efficiently when A I and n p For non-singular matrix A R n n and vectors x, b, R n, when writing the product x A 1 b it is important not to let the inverse matrix notation obscure what is really going on! Rather than thinking of x as the result of applying A 1 to b, we should understand it as the unique vector that satisfies the equation Ax b This means that x is the vector of coefficients of the unique linear expansion of b in the basis of columns of A Multiplication by A 1 is a change of basis operation as Figure 2 displayed Figure 2: The vector e i represent the vector in R n whose ith entry is 1 and the others are 0 213 The Determinant The determinant of a square matrix A R n n, is a function det : R n n R and is denoted det(a) or A (like the trace operator, we usually omit parentheses) Algebraically, one could write down an explicit formula for the determinant of A, but this unfortunately gives little intuition about its meaning Instead, well start out by providing a geometric interpretation of the determinant and then visit some of its specific algebraic properties afterwards Given a square matrix A a T (1) a T (2) a T (m) consider the set of points S R n formed by taking all possible linear combinations of the row vectors, where the coefficients of the linear combination are all between 0 and 1; that is, the set S is the restriction of span({a 1,, a n }) to only those linear combinations whose coefficients satisfy 0 α i 1, i 1,, n Formally, we have S {v R n : v α i a i, where 0 α i 1, i 1,, n} The absolute value of the determinant of A, it turns out, is a measure of the volume 2 of the set S For example, consider the 2 2 matrix, [ ] 1 3 A 3 2 2 Admittedly, we have not actually defined what we mean by volume here, but hopefully the intuition should be clear enough When n 2, our notion of volume corresponds to the area of S in the Cartesian plane When n 3, volume corresponds with our usual notion of volume for a three-dimensional object, 14

Here, the rows of the matrix are [ 1 a 1 3] a 2 [ 3 2] The set S corresponding to these rows is shown in Figure 3 For two-dimensional matrices, sets generally has the shape of a parallelogram In our example, the value of the determinant is det(a) 7 (as can be computed using the formulas shown later in this section), so the area of the parallelogram is 7 In three dimensions, the set S corresponds to an object known as a parallelepiped which is a three- Figure 3: Illustration of the determinant for the matrix A Here, a 1 and a 2 are vectors corresponding to the rows of A, and the set S corresponds to the shaded region (ie, the parallelogram) The absolute value of the determinant, det(a), is the area of the parallelogram dimensional box with skewed sides, such that every face has the shape of a parallelogram and the trivial example is a cubic The absolute value of the determinant of the matrix whose rows define S give the three-dimensional volume of the parallelepiped In even higher dimensions, the set S is an object known as an n-dimensional parallelotope Algebraically, the determinant satisfies the following three properties (from which all other properties follow, including the general formula): The determinant of the identity is 1, det(i) 1 (Geometrically, the volume of a unit hypercube is 1) Given a matrix A R n n, if we multiply a single row in A by a scalar t R, then the determinant of the new matrix is t det(a) (Geometrically, multiplying one of the sides of the set sets by a factor t causes the volume to increase by a factor t) If we exchange any two rows a T (i) and at (j) of A, then the determinant of the new matrix is det(a) For A R n n is triangular, det(a) n a ii For square sub-matrices A R n n, B R p p and C R n p, ([ ]) A C det det(a) det(b) 0 B For A R n n, det(a) det(a T ) For A R n n is orthogonal, det(a) ±1 For A, B R n n, det(ab) det(a) det(b) For A R n n, det(a) 0 if and only if A is singular (If A is singular then it does not have full rank, and hence its columns are linearly dependent In this case, the set S corresponds to a flat sheet within the n-dimensional space and hence has zero volume) 15

Before giving the general definition for the determinant, we define, for A R n n, A \i,\j R (n 1) (n 1) to be the matrix that results from deleting the ith row and jth column from A The general (recursive) formula for the determinant is det(a) ( 1) i+j a ij det(a \i,\j ) (for any j {1, 2,, n}) ( 1) i+j a ij det(a \i,\j ) j1 (for any i {1, 2,, n}) with the initial case that det(a) a 11 for A R 1 1 If we were to expand this formula completely for A R n n, there would be a total of n (n factorial) different terms For this reason, we hardly ever explicitly write the complete equation of the determinant for matrices bigger than 3 3 The classical adjoint (often just called the adjoint) of a matrix A R n n is denoted adj(a), and defined as adj(a) R n n ( ), adj(a) ij ( 1)i+j det(a \j,\i ) (note the switch in the indices A \j,\i ) It can be shown that for any nonsingular A R n n, 214 Schur Complement A 1 1 det(a) adj(a) Suppose A R p p, B R p q, C R q p, D R q q, and D is invertible Let [ ] M R (p+q) (p+q) A B C D Then the Schur complement of the block D of the matrix M is the matrix A BD 1 C R p p This is analogous to an LDU decomposition That is, we have shown that [ ] [ ] [ ] [ ] A B Ip BD 1 A BD 1 C 0 Ip 0 C D 0 I q 0 D D 1 C and the he inverse of M may be expressed involving D 1 and the inverse of Schur complement (if it exists) such as [ ] 1 [ ] [ ] [ ] A B I p 0 (A BD 1 C) 1 0 Ip BD 1 C D D 1 C I q 0 D 1 0 I q [ ] (A BD 1 C) 1 (A BD 1 C) 1 BD 1 D 1 C(A BD 1 C) 1 D 1 + D 1 C(A BD 1 C)BD 1 Moreover, the determinant of M is also clearly seen to be given by det(m) det(d) det(a BD 1 C) 3 Eigenvalues and Eigenvectors I q 31 Definitions Given a square matrix A R n n, we say that λ C is an eigenvalue of A and x C n corresponding eigenvector is the corresponding eigenvector if is the Ax λx, x 0 Intuitively, this definition means that multiplying A by the vector x results in a new vector that points in the same direction as x, but scaled by a factor λ Also note that for any eigenvector x C n, and 16

scalar t C, A(cx) cax cλx λ(cx), so cx is also an eigenvector And if x and y are eigenvectors for λ j and α R, then x + y and αx are also eigenvectors for λ i Thus, the set of all eigenvectors for λ j forms a subspace which is called eigenspace of A for λ i For this reason when we talk about the eigenvector associated with λ, we define the standardized eigenvector which are normalized to have length 1 (this still creates some ambiguity, since x and x will both be eigenvectors, but we will have to live with this) Sometimes we also use the term eigenvector to refer the standardized eigenvector We can rewrite the equation above to state that (λ, x) is an eigenvalue-eigenvector pair of A if, (λi A)x 0, x 0 (λi A)x 0 has non-zero solution ( to x if and only ) if (λi A)x has a non-zero dimension nullspace Considering that Table 3 implies rank N (λi A) n rank(λi A), which means such x exists only the case if (λi A) is singular, that is det(λi A) 0 We can now use the previous definition of the determinant to expand this expression into a (very large) characteristic polynomial in λ, defined as n p A (λ) det(a λi) (λ i λ), where λ will have maximum degree n We can find the n roots (possibly complex) of p A (λ) to find the n eigenvalues λ 1,, λ n To find the eigenvector corresponding to the eigenvalue λ i, we simply solve the linear equation (λi A)x 0 It should be noted that this is not the method which is actually used in practice to numerically compute the eigenvalues and eigenvectors (remember that the complete expansion of the determinant has n! terms), although it maybe works in the linear algebra exam you have taken 32 General Results The following are properties of eigenvalues and eigenvectors (in all cases assume A R n n has eigenvalues λ i,, λ n and associated eigenvectors x 1,, x n ): The trace of a A is equal to the sum of its eigenvalues, tr(a) λ i The determinant of A is equal to the product of its eigenvalues, n det(a) λ i Let C R n n be a non-singular matrix, then det(a λi) det(c) det(a λic 1 C) det(c 1 ) det(cac 1 λi) Thus A and CAC 1 have the same eigenvalues and we call they are similar Further, if x i is an eigenvector of A for λ i then Cx i is an eigenvector of CAC 1 for λ i Let λ 1 denote any particular eigenvalue of A, with eigenspace W of dimension r (called geometric multiplicity) If k denotes the multiplicity of λ 1 in as a root of p A (λ) (called algebra multiplicity), then 1 r k To prove the last conclusion, let e 1,, e r be an orthogonal basis of W and extend it to an orthogonal basis of R n, e 1,, e r, f 1,, f n r Write E [e 1,, e r ] and F [f 1,, f n r ] Then [E, F] is an orthogonal matrix so that I n [E, F][E, F] T EE T + FF T, det([e, F][E, F] T ) det([e, F]) det([e, F] T ) 1, E T AE λ 1 E T E λ 1 I r, F T F I n r, F T AE λ 1 F T E 0 17

Thus p A (λ) det(a λi n ) det([e, F] T ) det(a λi n ) det([e, F]) det([e, F] T (AEE T + AFF T λee T λff T )[E, F]) ([ ]) (λ1 λ)i det r E T AF 0 F T AF λi n r (λ 1 λ) r p A1 (λ), then the multiplicity of λ 1 as a root of p A (λ) is at least r In section 331, we will show that if A is symmetric then r k However, if A is not symmetric, it is possible that r < k, For example, [ ] 0 1 A 0 0 has eigenvalue 0 with multiplicity 2 but the corresponding eigenspace which is generated by [1, 0] T only has dimension 1 33 Spectral Decomposition 331 Spectral Decomposition Theorem Two remarkable properties come about when we look at the eigenvalues and eigenvectors of symmetric matrix A S n First, it can be shown that all the eigenvalues of A are real Let an eigenvalue-eigenvector pair (λ, x) of A, where x y + iz and y, z R n Then we have Ax λx A(y + iz) λ(y + iz) (y iz) T A(y + iz) λ(y iz) T (y + iz) y T Ay iz T Ay + iy T Az + z T Az λ(y T y + z T z) λ yt Ay + z T Az y T y + z T z R Secondly, two eigenvectors corresponding to distinct eigenvalues of A are orthogonal In other words if λ i λ j are eigenvalues of A with eigenvector x i and x j respectively, then λ j x T i x j x T i Ax j x T j Ax i λ i x T j x i, so that x T i x j 0, which means the eigenspaces of distinct eigenvalues are orthogonal Furthermore, if λ i is an eigenvector of A with m 2 algebra multiplicity, we can find m orthogonal eigenvectors in its eigenspace Then we prove this result Let x i be one of eigenvector with λ i and extend x i to an orthogonal bias x i, y 2,, y n and denote B [x i, Y], where Y [y 2,, y n ] Then B is orthogonal and Y is column orthonormal, and we have [ ] B T λi 0 AB 0 Y T AY and det(λi n A) det(b T ) det(λi n A) det(b) det(λi n B T AB) (λ λ i ) det(λi n 1 Y T AY) Since m 2, det(λ i I n 1 Y T AY) must be zero, which means λ i is an eigenvalue of Y T AY Suppose x i2 is the eigenvector of Y T AY with λ i, then Y T AYx i2 λ 2 x i2 Hence, we have [ ] [ ] [ ] [ ] B T 0 λi 0 0 0 AB x i2 0 Y T λ AY x i i2 x i2 [ ] [ ] 0 0 AB λ x i B i2 x i2 18

which implies [ ] 0 x j B x i2 another eigenvectors of A and x T i x j 0 Repeat this type of procedure by induction with B 2 [x i, x j, y 3,, y n ], we can find m m orthogonal eigenvectors in this eigenspace Based on previous results, we can derive spectral decomposition theorem that any symmetric matrix A R n n can be written as A XΛX T λ i x i x T i, where Λ diag(λ 1,, λ n ) is a diagonal matrix of eigenvalues of A, and X is an orthogonal matrix whose columns are corresponding standardized eigenvectors 332 Applications An application where eigenvalues and eigenvectors come up frequently is in maximizing some function of a matrix In particular, for a matrix A S n, consider the following maximization problem, max x R n xt Ax subject to x 2 2 1 ie, we want to find the vector (of l 2 -norm 1) which maximizes the objective function (which is a quadratic form) Assuming the eigenvalues of A are ordered as λ 1 λ 2 λ n, the optimal x for this optimization problem is x 1, the eigenvector corresponding to λ 1 In this case the maximal value of the quadratic form is λ 1, also called the spectral radius of A and denoted as ρ(a), which satisfied ρ(a) A for any induced matrix norm Additionally, the solution of above maximization problem indicate us how to compute the 2-norm of a matrix Recall that for any B R m n, we can define its 2-norm as B 2 sup Bx 2 x R n, x 21 and consider when A B T B S n The solution of this optimization problem can be proved by appealing to the eigenvector-eigenvalue form of A and the properties of orthogonal matrices However, in section 67 we will see a way of showing it directly using matrix calculus 4 Singular Value Decomposition 41 Definitions and Basic Properties For general matrix A R m n, we can use spectral decomposition theorem to derive that if rank(a) r, then A can be written as reduced singular value decomposition (SVD) A Û Σ V T When m n, Û R m n is column orthonoromal and V R n n are orthonoromal matrices and Σ diag(σ 1 (A),, σ n (A)) is a diagonal matrix with positive elements where σ 1 (A) σ 2 (A),, σ n (A) 0, called singular values The result of SVD for general matrix A can be derived by using spectral decomposition on A T A and AA T (consider their eigenvalues are non-negative, we can get singular values by the square roots of the eigenvalues of A T A and AA T ) Furthermore, we have σ 1 (A) A 2 By adjoining additional orthonomal columns, Û and V can be extended to a orthogonal matrix if they are not Accordingly, let Σ be the m n matrix consisting of Σ in upper n n block together with zeros for other entries We now have a new factorization, the full SVD of A A UΣV T, where Σ ii σ i (A) 0 for i > r For following properties, we assume that A R m n Let p be the minimum of m and n, let r < p denote the number of nonzero singular values of A 19

Figure 4: SVD of A R 2 2 matrix rank(a) rank(σ) r R(A) span({u 1,, u r }) and N (A) span({v r+1,, v n }) (in Table 3) A 2 σ 1 (A) and A F σ 1 (A) 2 + σ 2 (A) 2 + + σ r (A) 2 The SVD is motivated by the geometric fact that the image of the unit sphere under m n is a hyperellipse Hyperellipse is just the m-dimensional generalization of an ellipse We may define a hyperellipse in R m by some factors σ 1,, σ m (possible 0) in some orthogonal directions u 1,, u m R m and let u i 2 1 Let S be the unit sphere in R n, and take any A R m n with m n and has the SVD A UΣV T The Figure 4 shows the transformation of S in two dimension by 2 2 matrix A 42 Low-Rank Approximations SVD can also be written as a sum of rank-one matrices, for A R m n has rank r and SVD A UΣV T, A r σ i (A)u i vi T This form has a deeper property: the kth partial sum capture as much of the energy of A as possible This statement holds with energy defined by either the 2-norm or the Frobenius norm We can make it precise by formulating a problem of best approximation of a matrix A of lower rank That is for any k with 0 k r, define A k k σ i (A)u i vi T ; if k p min{m, n}, define σ k+1 (A) 0 Then A A k 2 inf A B 2 σ k+1 (A), B R m n,rank(b) k A A k F inf A B F B R m n,rank(b) k σ 2 k+1 +,, +σ2 r In detial, for Frobenius norm, if it can be shown that for arbitrary x i R m, y i R n A k x i yi T 2 A k 2 F A 2 F F k σi 2 (A) then A k will be the desired approximation Without loss of generality we may assume that the vector x 1,, x k are orthonormal For if they are not, we can use Gram-Schmidt orthogonalization (not included in this review) to express them as linear 20

combinations of orthonormal vectors, substitute these expressions in k x iyi T, and collect therms in the new vectors Now k ( A x i yi T 2 k ) T ( k ) tr( ) A x i yi T A x i yi T F ( ) k k tr AA T + (y i A T x i )(y i A T x i ) T A T x i x i A Since tr((y i A T x i )(y i A T x i ) T ) 0 and tr(ax i x T i AT ) Ax i 2 F, the result will be established if it can be shown that k Ax i 2 F k σi 2 (A) Let V [V 1, V 2 ], where V 1 has k columns, and let Σ diag(σ 1, Σ 2 ) be conformal partition of Σ Then Ax i 2 F σk(a) 2 + ( Σ 1 V1 T x i 2 2 σk(a) V 2 1 T x i 2 ) 2 ( σk(a) V 2 2 T x i 2 2 Σ 2 V2 T x i 2 ) 2 σ 2 k(a) ( 1 V T x i 2 2) Now the last two terms in above equation are clearly nonnegative Hence k Ax i 2 2 kσk(a) 2 + kσ 2 k(a) + k ( Σ1 V1 T x i 2 2 σk(a) V 2 1 T x i 2 2) k j1 k ( σ 2 j (A) σk(a) 2 ) vj T x i 2 2 ( k σk(a) 2 + ( σj 2 (A) σk(a) 2 ) ) k vj T x i 2 2 j1 k j1 (σ 2k(A) + ( σ 2j (A) σ 2k(A) )) k σj 2 (A), j1 which establishes the result For 2-norm, we can prove by contradiction Suppose there is some B with rank(b) k such that A B 2 < A A k 2 σ k+1 (A) Then rank(n (B)) n rank(b) n k, hence there is an (n k)-dimensional subspace W R n such that w W Bw 0 Accordingly, for any w W, we have Aw (A B)w and Aw 2 (A B)w 2 A B 2 w 2 < σ k+1 (A) w 2 Thus W is and an (n k)-dimensional subspace such that w W Aw 2 < σ k+1 (A) w 2 But there is a (k + 1)-dimensional subspace where for any w of it has Aw 2 σ k+1 (A) w 2, namely the space spanned by the first k + 1 columns of V, since for any w k+1 c iv i, we have w 2 2 k+1 c2 i and k+1 k+1 k+1 Aw 2 c i Av i c i σ i (A)u i σ k+1 (A) c i u i σ k+1 (A) w 2 2 2 2 j1 j1 Since the sum of the dimensions of these spaces exceeds n, there must be a nonzero vector lying in both, and this is a contradiction j1 21

43 SVD vs Spectral Decomposition The SVD makes it possible for us to say that every matrix is diagonal if only one uses the proper bases for the domain and range spaces Here is how the change of bases works For A R m n has SVD A UΣV T, any b R m can be expanded in the basis of left singular vectors of A (columns of U), and any x R n can be expanded in the basis of right singular vectors of A (columns of V) The coordinate vectors for these expansions are b U T b, x V T x, which means the relation b Ax can be expressed in terms of b and x : b Ax U T b U T Ax U T UΣV T x b Σx Whenever b Ax, we have b Σx Thus A reduces to the diagonal matrix Σ when the range is expressed in the basis of column U and the domain is expressed in the basis of column of V If A S n has spectral decomposition A XΛX T, then it implies that if we define, for b, x R n satisfying b Ax, b X T b, x X T x then the newly expended vectors b and x satisfy b Λx There are fundamental differences between the SVD and the eigenvalue decomposition The SVD uses two different bases (the sets of left and right singular vectors), whereas the eigenvalue decompositions uses just one (the eigenvectors) Not all matrices (even sqaure ones) have a spectral decomposition, but all matrices (even rectangular ones) have a singular value decomposition In applications, eigenvalues tend to be relevant to problems involving the behavior of iterated forms of A, such as matrix powers A k, whereas singular value vectors tend to be relevant to problems involving the behavior of A itself or its inverse 5 Quadratic Forms and Definiteness Given a square matrix A R n n and a vector x R n, the scalar value x T Ax is called a quadratic form Written explicitly, we see that Note that x T Ax x i (Ax) i ( n ) x i A ij x j j1 j1 x T Ax (x T Ax) T x T A T x x T ( 1 2 A + 1 2 AT )x, A ij x i x j where the first equality follows from the fact that the transpose of a scalar is equal to itself, and the second equality follows from the fact that we are averaging two quantities which are themselves equal From this, we can conclude that only the symmetric part of A contributes to the quadratic form For this reason, we often implicitly assume that the matrices appearing in a quadratic form are symmetric We give the following definitions: A symmetric matrix A S n is positive definite (PD) if for all non-zero vectors x R n, x T Ax > 0 This is usually denoted A 0 (or just A > 0), and often times the set of all positive definite matrices is denoted S n ++ A symmetric matrix A S n is positive semidefinite (PSD) if for all vectors x R n, x T Ax 0 This is written A 0 (or just A 0), and the set of all positive semidefinite matrices is often denoted S n + 22

Likewise, a symmetric matrix A S n is negative definite (ND), denoted A 0 (or just A < 0) if for all non-zero x R n, x T Ax < 0 Similarly, a symmetric matrix A S n is negative semidefinite (NSD), denoted A 0 (or just A 0) if for all x R n, x T Ax 0 Finally, a symmetric matrix A S n is indefinite, if it is neither positive semidefinite nor negative semidefinite ie, if there exists x 1, x 2 R n such that x T 1 Ax 1 > 0 and x T 2 Ax 2 < 0 It should be obvious that if A is positive definite, then A is negative definite and vice versa Likewise, if A is positive semidefinite then A is negative semidefinite and vice versa If A is indefinite, then so is A There are some important properties of definiteness as following All positive definite and negative definite matrices are always full rank, and hence, invertible To see why this is the case, suppose that some matrix A R n n is not full rank Then, suppose that the jth column of A is expressible as a linear combination of other n 1 columns: a j i j x i a i, for some x 1,, x j 1, x j+1,, x n R Setting x j 1, we have Ax x i a i 0 This implies x T Ax 0 for some non-zero vector x, so A must be neither positive definite nor negative definite Therefore, if A is either positive definite or negative definite, it must be full rank Let A S n has spectral decomposition A XΛX T, where Λ diag(λ 1,, λ n ) For i 1,, n, if A 0, then λ i 0 and if A 0, then λ i > 0 Consider if A 0, we have for all z 0, z T Az z T XΛX T z y T Λy λ i yi 2, where y X T z Note that for any y, we can get the corresponding z, by z Xy Thus, by choosing y 1 1, y 2 y n 0, we reduced that λ 1 > 0 Similarly λ i > 0 for all 1 i n If A 0, the above inequalities are weak If A 0, then A is non-singular and det(a) > 0 Finally, there is one type of positive definite matrix that comes up frequently, and so deserves some special mention Given any matrix A R m n (not necessarily symmetric or even square), the matrix G A T A (sometimes called a Gram matrix) is always positive semidefinite Further, if m n (and we assume for convenience that A is full rank), then G A T A is positive definite Let X be a symmetric matrix given by [ ] A B X B T C Let S be the Schur complement of A in X, that is: Then we have following results: X 0 A 0, S 0 If A 0 then X 0 S 0 S C B T A 1 B To prove it, you can consider the following minimization problem (can be solved easily by matrix calculus) min u T Au + 2v T B T u + v T Cv u 23

6 Matrix Calculus 61 Notations While the topics in the previous sections are typically covered in a standard course on linear algebra, one topic that does not seem to be covered very often (and which we will use extensively) is the extension of calculus to the matrix setting Despite the fact that all the actual calculus we use is relatively trivial, the notation can often make things look much more difficult than they are In this section we present some basic definitions of matrix calculus and provide a few examples There are two competing notational conventions (denominator notations and numerator-layout notation) which split the field of matrix calculus into two separate groups The two groups can be distinguished by whether they write the derivative of a scalar with respect to a vector as a column vector (in denominator notations) or a row vector (in numerator-layout notations) The discussion in this review assumes the denominator notations The choice of denominator layout does not imply that this is the correct or superior choice There are advantages and disadvantages to the various layout types Serious mistakes can result when combining results from different authors without carefully verifying that compatible notations are used Therefore great care should be taken to ensure notational consistency Matrix calculus refers to a number of different notations that use matrices and vectors to collect the derivative of each component of the dependent variable with respect to each component of the independent variable In general, the independent variable can be a scalar, a vector, or a matrix while the dependent variable can be any of these as well 62 The Gradient Suppose that f : R m n R is a function that takes as input a matrix A of size m n and returns a real value Then the gradient of f with respect to A R m n is the matrix of partial derivatives, defined as f(a) A Xf(X) R m n f(a) a 11 f(a) a 21 f(a) a m1 f(a) a 12 f(a) a 22 f(a) a m2 f(a) a 1n f(a) a 2n, f(a) a mn ie, an m n matrix with ( ) A f(a) f(a) ij a ij So if, in particular, the independent variable is just a vector x R n, f(x) x xf(x) R n f(x) x 1 f(x) x 2 f(x) x n It is very important to remember that the gradient (denoted as ) of a function is only defined if the function is real-valued, that is, if it returns a scalar value, and the gradient A f(a) is always the same as the size of A We can not, for example, take the gradient of Ax, x R n with respect to x, since this quantity is vector-valued It follows directly from the equivalent properties of partial derivatives with that: For x R n, ( f(x) + g(x) x ) f(x) x + g(x) x 24

For x R n, t R, tf(x) t f(x) x x For x, a R n, at x x a For x R n, xt x x 2x For x R n, A R n n, xt Ax x For x R n, A R n n, xt Ax x 63 The Hessian (A + A T )x If A S n, then xt Ax x (A + A T )x If A S n, then xt Ax x 2Ax 2Ax Suppose that f : R n R n is a function that takes a vector in R n and returns a real number Then the Hessian matrix with respect to x, written 2 xf(x) or H f (x) (simply as H(x) when f is clear from context, even H when x is also clear), is the n n matrix of partial derivatives x 2 1 2 xf(x) H f (x) R m n x 2 x 1 x n x 1 x 1 x 2 x 2 2 x n x 2 2 f(x) x 1 x n x 2 x n x 2 n If the second derivatives of f are all continuous in a neighborhood of x, then the Hessian is a symmetric matrix, ie, x i x j 2 f(x) x j x i Similar to the gradient, the Hessian is defined only when f(x) is real-valued It is natural to think of the Hessian as the analogue of the second derivative (and the symbols we use also suggest this relation) But it is not the case that the Hessian is the second order gradient or derivative of the independent variable, ie, 64 Least Squares 2 xf(x) 2 f(x) x 2 Consider the quadratic function f(x) x T Ax for A S n Remember that f(x) j1 a ij x i x j To take the partial derivative, well consider the terms including x k and x k k factors separately: f(x) a ij x i x j x k x k j1 [ a ij x i x j + a ik x i x k + ] a kj x k x j + a kk x 2 k x k i k j k i k j k i k a ik x i + j k a kj x j + 2a kk x k a ik x i + a kj x j 2 a ik x i j1 25