Notes on Linear Algebra

Similar documents
Math Linear Algebra Final Exam Review Sheet

Linear Algebra M1 - FIB. Contents: 5. Matrices, systems of linear equations and determinants 6. Vector space 7. Linear maps 8.

(a) If A is a 3 by 4 matrix, what does this tell us about its nullspace? Solution: dim N(A) 1, since rank(a) 3. Ax =

MATH 240 Spring, Chapter 1: Linear Equations and Matrices

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

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

Matrices and Linear Algebra

The Singular Value Decomposition

LINEAR ALGEBRA REVIEW

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

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

2. Every linear system with the same number of equations as unknowns has a unique solution.

Knowledge Discovery and Data Mining 1 (VO) ( )

Foundations of Matrix Analysis

MTH 464: Computational Linear Algebra

A Brief Outline of Math 355

Lecture notes: Applied linear algebra Part 1. Version 2

Elementary linear algebra

1. General Vector Spaces

EE731 Lecture Notes: Matrix Computations for Signal Processing

IMPORTANT DEFINITIONS AND THEOREMS REFERENCE SHEET

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

Stat 159/259: Linear Algebra Notes

Study Guide for Linear Algebra Exam 2

IMPORTANT DEFINITIONS AND THEOREMS REFERENCE SHEET

Review problems for MA 54, Fall 2004.

(f + g)(s) = f(s) + g(s) for f, g V, s S (cf)(s) = cf(s) for c F, f V, s S

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

Math113: Linear Algebra. Beifang Chen

Linear Algebra in Actuarial Science: Slides to the lecture

Linear Systems and Matrices

Conceptual Questions for Review

Throughout these notes we assume V, W are finite dimensional inner product spaces over C.

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

Online Exercises for Linear Algebra XM511

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

Topic 15 Notes Jeremy Orloff

MH1200 Final 2014/2015

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

(b) If a multiple of one row of A is added to another row to produce B then det(b) =det(a).

Matrices A brief introduction

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

3 Matrix Algebra. 3.1 Operations on matrices

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

Math 3108: Linear Algebra

18.06SC Final Exam Solutions

Solution to Homework 1

Lecture Summaries for Linear Algebra M51A

NOTES on LINEAR ALGEBRA 1

Calculating determinants for larger matrices

LINEAR ALGEBRA SUMMARY SHEET.

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

Linear Algebra and Matrices

1. In this problem, if the statement is always true, circle T; otherwise, circle F.

NORMS ON SPACE OF MATRICES

Chapter 2: Matrix Algebra

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.

CS 143 Linear Algebra Review

MATH 583A REVIEW SESSION #1

Linear Algebra Primer

LINEAR ALGEBRA REVIEW

Topic 1: Matrix diagonalization

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.

det(ka) = k n det A.

2 b 3 b 4. c c 2 c 3 c 4

Basic Elements of Linear Algebra

linearly indepedent eigenvectors as the multiplicity of the root, but in general there may be no more than one. For further discussion, assume matrice

Linear Algebra review Powers of a diagonalizable matrix Spectral decomposition

1 Last time: determinants

Applied Mathematics 205. Unit V: Eigenvalue Problems. Lecturer: Dr. David Knezevic

Linear Algebra review Powers of a diagonalizable matrix Spectral decomposition

Determinants: Uniqueness and more

Jim Lambers MAT 610 Summer Session Lecture 1 Notes

MAT Linear Algebra Collection of sample exams

Vectors and matrices: matrices (Version 2) This is a very brief summary of my lecture notes.

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

MATH 315 Linear Algebra Homework #1 Assigned: August 20, 2018

Solutions to Final Practice Problems Written by Victoria Kala Last updated 12/5/2015

ANSWERS. E k E 2 E 1 A = B

Elementary Linear Algebra

Mathematical Foundations of Applied Statistics: Matrix Algebra

MATH 2331 Linear Algebra. Section 2.1 Matrix Operations. Definition: A : m n, B : n p. Example: Compute AB, if possible.

Linear Algebra Review

A matrix is a rectangular array of. objects arranged in rows and columns. The objects are called the entries. is called the size of the matrix, and

[Disclaimer: This is not a complete list of everything you need to know, just some of the topics that gave people difficulty.]

Chapter 3. Matrices. 3.1 Matrices

Notes on Eigenvalues, Singular Values and QR

33AH, WINTER 2018: STUDY GUIDE FOR FINAL EXAM

Linear Algebra Lecture Notes-II

Third Midterm Exam Name: Practice Problems November 11, Find a basis for the subspace spanned by the following vectors.

MATRICES ARE SIMILAR TO TRIANGULAR MATRICES

Math 240 Calculus III

Lecture Notes in Linear Algebra

Glossary of Linear Algebra Terms. Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

A matrix is a rectangular array of. objects arranged in rows and columns. The objects are called the entries. is called the size of the matrix, and

B553 Lecture 5: Matrix Algebra Review

The Singular Value Decomposition (SVD) and Principal Component Analysis (PCA)

Vectors To begin, let us describe an element of the state space as a point with numerical coordinates, that is x 1. x 2. x =

SUMMARY OF MATH 1600

Linear Algebra: Linear Systems and Matrices - Quadratic Forms and Deniteness - Eigenvalues and Markov Chains

Transcription:

1 Notes on Linear Algebra Jean Walrand August 2005 I INTRODUCTION Linear Algebra is the theory of linear transformations Applications abound in estimation control and Markov chains You should be familiar with the following concepts that we review in these notes: Linear transformation vector matrix determinant Basis Eigenvector eigenvalue Range rank null space Diagonalization Rotation Projection Singular Value Decomposition II PRELIMINARIES 1) Matrix Notation: You remember the matrix notation For instance 3 4 7 2 1 5 6 9 3 7 + 4 6 3 ( 2) + 4 9 1 7 + 5 6 1 ( 2) + 5 9 45 30 37 43 Thus element (AB) ij (meaning row i and column j) of AB is the product of row i of A times column j of B where the product of two vectors is the sum of the products of their corresponding elements This makes sense if A C m k meaning hat A has m rows and k columns and B C k n and then AB C m n Observe that with z C m and v 1 v m C n Also Recall that v 1 v 2 v m z j z j v j A(B + C) AB + BC (AB) B A where A is the transposed of A defined by A ij A ji Also in general AB BA If A C n n then A 1 is a matrix in C n n such that AA 1 is the identity matrix I It is easy to see that A 1 is unique if it exists Also (AB) 1 B 1 A 1 2) Inverse of 2 2: Note that with : ad bc a b d b 0 c d c a 0 so that a b c d provided that 0 For instance 3 5 2 7 1 1 d b c a 1 1 7 5 11 2 3 which enables us to state that the unique solution of the equations 3 5 x1 13 2 7 x 2 37 is x1 x 2 1 3 5 13 2 7 37 1 7 5 13 11 2 3 37 Note also that the matrix 3 5 6 10 94/11 85/11 does not have an inverse because ad bc 3 10 6 5 0 Observe that 3 5 x1 3 5 x 6 10 x 2 6 1 + 10 Consequently the equation 3 5 x1 6 10 x 2 has no solution unless b1 1 α b 2 2 1 x 2 2 b1 b 2 (3x 1 +5x 2 ) for some α In that case there are infinitely many solutions that correspond to 3x 1 + 5x 2 α 3) Solving Homogeneous Linear Equations: Consider the equations 2 6 4 3 11 8 x 1 x 2 x 3 0 0

2 We can subtract from the second equation the first one multiplied by 3/2 without changing the solutions Accordingly these equations are equivalent to the following: 2 6 4 0 2 2 x 1 x 2 x 3 0 0 Let us fix x 3 u C The second equation is 2x 2 +2x 3 0 and it yields x 2 u The first equation is 2x 1 + 6x 2 + 4x 3 0 and it yields x 1 3x 2 2x 3 3( u) 2u u We conclude that the general solution of the equations is x 1 u x 2 u x 3 u The procedure that we used consists in performing elementary row manipulations of the equations to bring them into a row echelon form In that form the column index of leftmost nonzero term of a row is called the pivot The index of the pivot is increasing for successive rows We then solve recursively bottom up The elementary row operations consist in interchanging rows or subtracting a multiple of one row from another row Let A be an arbitrary matrix Assume column i is the left-most nonzero column By interchanging rows one makes sure that element (1 i) is nonzero By subtracting row 1 multiplied by a ji /a 1i from row i the new matrix has all entries ji equal to zero for j 2 We then interchange rows below row 1 to make sure that the leftmost nonzero term in those rows is in row 2 We continue in this way to obtain the row echelon form Theorem 1: A system of m homogeneous linear equations with n variables has infinitely many solutions if n > m First reduce the equations to the row echelon form Since there are more columns than rows there must be columns without pivots One can fix the variables x i arbitrarily for the values of i such that column i has no pivot; these are free variables Proceeding bottom up one solves for the last pivot variable in terms of the free variables One then continues recursively solving for the other pivot variables III RANGE RANK NULL SPACE ETC A Linear Independence The vectors {v 1 v k } C n are linearly independent if a 1 v 1 + a k v k 0 only if a 1 a k 0 A linear subspace V of C n is a subset of C n such that a linear combination of two elements of V is again in V That is v 1 v 2 V and a 1 a 2 C implies a 1 v 1 + a 2 v 2 V For instance the collection of vectors x C 2 such that x 2 3x 1 is a linear subspace of C 2 Let V be a subspace of C n A basis of V is a collection {v 1 v m } of vectors of V that are linearly independent and such that every v V can be written as v a 1 v 1 + +a m v m for some a i C A linear map Q : V V is invertible if it is a bijection Fact 1: Let {v 1 v m } be a basis of the linear subspace V For any v V the representation v a 1 v 1 + + a m v m is unique That is if v a 1 v 1 + + a m v m b 1 v 1 + + b m v m then a i b i for i 1 m Note that 0 (a 1 b 1 )v 1 + + (a m b m )v m Since the v i are linearly independent it follows that a i b i 0 for i 1 m Fact 2: Let {v 1 v m } be a basis of the linear subspace V Let {w 1 w k } V with k > m Then the vectors {w 1 w k } are linearly dependent We want to find {b 1 b k } that are not all zero and such that b 1 w 1 + + b k w k 0 We know that Hence 0 w i k b i w i i1 It follows that m a ij v j for i 1 k j1 k m m k b i a ij v j b i a ij v j i1 j1 j1 i1 k b i a ij 0 for j 1 m i1 This is a system of m homogeneous equations with k > m variables We know from Fact 1 that there are infinitely many solutions In particular there are nonzero solutions {b 1 b k } B Dimension Theorem 2: Let V be a subspace of C n If {v 1 v m } and {w 1 w k } are two bases of V then m k n The value of m is called the dimension of V that we designate by dim(v) If Q : V V is a linear invertible map then dim(qv) dim(v) Since {v 1 v m } is a basis Fact 2 implies that k m A symmetric argument shows that m k It follows that k m To show that m n note that {e 1 (1 0 0) e n (0 0 0 1)} is a basis so that no more than n vectors can be linearly independent again by Fact 2 With V v 1 v m we claim that QV is a basis for QV Indeed QV x 0 implies V x 0 because Q is invertible which implies x 0

3 C Range Rank Null Space Let V {v 1 v m } be a collection of vectors in C n and V v 1 v m C n m the matrix with columns v j By V we designate the conjugate of the matrix V That is (V ) ij is the complex conjugate of V ji Thus V C m n Definition 1: We define R(V ) the range of V to be the collection of linear combinations of the vectors v i That is R(V ) {V a a C m } The range of V is a linear subspace of C n The dimension of that subspace is called the rank of V The null space of V N(V ) is defined as the following set: N(V ) : {z C m V z 0} Theorem 3: Let V C n m Then Moreover dim(r(v )) dim(r(v )) dim(r(v )) + dim(n(v )) m Convert the matrix V to the echelon form by performing row operations Since these operations are invertible they do not change the dimension of the range of V Also they do not change N(V ) Now say that the reduced matrix has k nonzero rows and therefore k pivot variables The k nonzero rows are linearly independent and there are only k linearly independent row so that dim(r(v )) k Also the k columns that correspond to the pivot variables are linearly independent and there cannot be more than k linearly independent columns Hence dim(r(v )) k In the previous argument there are m k columns that do not have pivots and they correspond to independent free variables Consequently dim(n(v )) m k Lemma 1: Let A C m n be a matrix of rank r (a) One has the decompositions C n R(A ) N(A) and C m R(A) N(A ) where R(A ) N(A) and R(A) N(A ) That is any x C n can be written uniquely as x u+v where u R(A ) and v N(A) and similarly for C m (b) The restriction of A on R(A ) is a bijection of R(A ) onto R(A) and N(AA ) N(A ) R(AA ) R(A) (c) The restriction of A on R(A) is a bijection of R(A) onto R(A ) and N(A A) N(A) R(A A) R(A ) Figure 1 illustrates the statements of the Lemma The key observation is that R(A) : {x C m x y 0 y R(A)} N(A ) To see this note that x R(A) x Az 0 z C n z A x 0 z C n A x 0 x N(A ) N(A) dim m - r R(A*) dim r Fig 1 The actions of A and A R(A) dim r A* 1:1 1:1 A 0 m 0 n N(A*) dim n - r Consequently replacing A by A one finds that R(A ) N(A) Since R(A ) N(A) any vector x can be written uniquely as x u + v where u R(A ) and v N(A) Consequently Ax Au and we see that A restricted to R(A ) is onto R(A) Moreover we claim that A restricted to R(A ) is one-to-one on R(A) That is if Au 1 Au 2 for u 1 u 2 R(A ) then u 1 u 2 Equivalently let Au 0 for some u R(A ); we show that u 0 To see this observe that u N(A) R(A ) {0} We now verify that N(AA ) N(A ) Assume that x N(AA ) Then AA x 0 so that A x 2 x AA x 0 which shows that A x 0 and x N(A ) Hence N(AA ) N(A ) Obviously N(A ) N(AA ) since A x 0 implies AA x 0 Hence N(AA ) N(A ) To show that R(AA ) R(A) assume that x R(A) so that x Ay We decompose y as y u + v where u A z R(A ) and v N(A) Then x A(u + v) Au AA z so that x R(AA ) Hence R(A) R(AA ) Also R(AA ) R(A) since any x R(AA ) is of the form x AA y A(A y) R(A) The other statements of the lemma are obtained by replacing A by A IV DETERMINANT We define the determinant det(a) of a square matrix A This concept is essential to understand the inverse of matrices and also the change of variables in multivariate calculus Before introducing the definition we need to review the notion of index of a permutation A Permutations Call a transposition of a list of numbers the interchange of two successive numbers in the list Consider the numbers (1 2 3) They are in increasing order Thus the minimum number s(1 2 3) of transpositions required to put these numbers in increasing order is equal to zero; that is s(1 2 3) 0 Now consider (3 1 2) To arrange these elements in increasing order we can interchange the first two elements to obtain (1 3 2) then interchange the last two elements to obtain (1 2 3) That is we can reorder the three elements with two transpositions of successive elements You can also see that this is the minimum number of such transpositions required since no single transposition does the job Hence s(3 1 2) 2

4 Consider a permutation p (p 1 p 2 p n ) of (1 2 n) There is certainly a sequence of transpositions that reorders these numbers For instance let p k 1 We can bring 1 back in the first position by interchanging the elements k and k 1 then the elements k 1 and k 2 then the elements 2 and 1 After these k 1 transpositions the permutation p has been modified to (1 p k p 1 p k 1 p k+1 p n ) One can then repeat the procedure to bring 2 in second position with a finite number of transpositions and so on We define s(p) to be the minimum number of transpositions required to arrange the elements in p in increasing order Assume that one can reorder the elements of a permutation p with k transpositions We claim that k s(p) must be an even number Equivalently if we perform a number k of transpositions of the elements (1 2 n) that brings them back to the same order then k must be even To see this note that the result is obvious for two elements Assume that the result holds for n elements and we color these elements blue Let us add one element that we color red Consider then the set of k transpositions that bring back the elements to their original order Among these transpositions a number k 1 do not move the red element By induction k 1 must be even The other k 2 k k 1 transpositions move the red element to the right or to the left in the set of blue elements It is obvious that k 2 must be even to bring the red element back to its original position Consider A C n n Let α be a selection of n entries of A taken from different rows and different columns We can list the elements of α in increasing order of their rows Thus α α(p) : (a 1p1 a 2p2 a npn ) where p : (p 1 p 2 p n ) is some permutation of (1 2 n) Thus there are n! such selections α one for each permutation p B Definition Definition 2: Let A C n n for some n 2 The determinant det(a) of matrix A is defined as det(a) p a 1p1 a 2p2 a npn ( 1) s(p) p α(p)( 1) s(p) where the sum is over all the possible permutations p of (1 2 n) To clarify this definition let us look at some examples For a b c d C ( ) a b det α(1 2) α(2 1) a c d 11 a 22 a 12 a 21 ad bc As another example det a b c d e f g h i α(1 2 3) α(1 3 2) α(2 1 3) + α(2 3 1) + α(3 1 2) α(3 2 1) a 11 a 22 a 33 a 11 a 23 a 32 a 12 a 21 a 33 + a 12 a 23 a 31 + a 13 a 21 a 32 a 13 a 22 a 31 aei afh bdi + bfg + cdh ceg Fact 3: (a) Assume the matrix B is obtained from A C n n by interchanging two rows or two columns then det(b) det(a) (b) Assume the matrix B is obtained from A C n n by multiplying one row or one column by a constant γ then det(b) γ det(a) (c) Assume the matrix A has two identical rows or two identical columns then det(a) 0 (d) Let A designate the transposed of matrix A defined so that the entry ij of A is the entry ji of matrix A Then det(a ) det(a) For (a) note that the interchange modifies the index of every permutation by one Fact (b) is obvious Fact (c) follows from (a) For fact (d) consider the term α(p) a 1p1 a npn in det(a) That term appears in det(a ) : det(b) as b p11 b pnn Let us rearrange the terms (b p11 b pnn) so that they are in increasing order of the rows To do this we need to perform s(p) transpositions We end up with the terms b 1q1 b nqn But then we know that s(p) transpositions of the terms q (q 1 q n ) bring them back in the order (1 2 n) That is s(q) s(p) Accordingly the term a 1p1 a npn that appears with the sign s(p) in det(a) appears with the sign s(q) s(p) in det(a ) and we see that det(a) det(a ) Definition 3: Let A C n n For i j {1 n} the matrix A ij C (n 1) (n 1) is obtained from A by deleting row i and column j We then define the cofactor of the entry a ij of matrix A as Fact 4: c ij ( 1) i+j det(a ij ) det(a) a ik c ik a kj c kj for all i j k k Consider a generic term in a ik c ik Such a term is β : ( 1) i+k a 1p1 a i 1pi 1 a i+1pi+1 a npn ( 1) s(p) where p (p 1 p n ) is a permutation of the numbers (1 2 n) from which k has been removed Consequently β a 1p1 a i 1pi 1 a ik a i+1pi+1 a npn ( 1) s(p)+(i+k) We claim that ( 1) s(p)+(i+k) ( 1) s(p1pi 1kpi+1pn) Let us first perform i 1 transpositions of (p 1 p i 1 k p i+1 p n ) to get (k p 1 p i 1 p i+1 p n ) We then perform s(p) transpositions to get (k 1 k 1 k + 1 n)

5 Finally with k 1 other transpositions we get (1 2 k 1 k k + 1 n) That is we can reorder the terms (p 1 p i 1 k p i+1 p n ) with s(p) + i + k 2 transpositions We know that this may not be the minimum number of transpositions but the difference with the minimum number must be even as we explained when we introduced the index of permutations This proves the claim It follows from this observation that the terms in a ik c ik as k ranges over all possible values are all the terms in det(a) Fact 5: Let B be a matrix obtained from A by subtracting from one row a multiple of a different row Then det(b) det(a) Assume that all the rows of B are the same as the rows of A except that row i is equal to row i of A minus α times row j of A for some i j Let c ik be the cofactor of a ik and c ik be the cofactor of b ik Then c ik c ik since these cofactors involve only elements of the matrices that are not on row i The expansion of the determinants gives det(a) a ik c ik and det(b) (a ik αa jk )c ik k k Now k a jkc ik is the determinant of the matrix obtained from A by replacing row i by a copy of row j Since this matrix has two identical rows its determinant is zero We conclude that det(a) det(b) Fact 6: Let A B C n n Then det(ab) det(a) det(b) The trick in the proof is to reduce the matrices to a row echelon form by performing simple row operations where we subtract from one row a multiple of a row above For instance say that we replace row 2 in matrix A by row 2 minus α times row 1 We then obtain a matrix A with Note that a ij a ij αa 1j 1{i 2} j 1 n (A B) ik a ijb jk (a ij αa 1j 1{i 2})b jk j j (AB) ik α(ab) 1k 1{i 2} That is the rows of A B are those of AB except that α times row 1 is subtracted from row 2 That is the elementary row operation performed on A results in the same row operation on AB We know from Fact 5 that such row operations do not modify the determinant of a matrix Similarly if we interchange two rows in matrix A then the corresponding rows of AB are interchanged Indeed row i of AB is equal to row i multiplied by B Such an operation multiplies the determinant of A and that of AB by 1 Let us then perform elementary row operations on A to reduce it to a row echelon form The determinant of the reduced matrix A is nonzero only if the reduced matrix has a triangular form That is if the diagonal elements are nonzero and the terms below the diagonal are zero The determinant of a matrix in triangular form is the product of the diagonal elements as is easy to see by induction on the size of the matrix from Fact 4 These operations do not modify the identity between the determinants of A and of AB We now perform elementary column operations on B to reduce it to row echelon form These operations correspond to the same operations on AB For instance if b jk b jk αb j1 1{k 2} then (AB ) ik a i j(b jk αb j1 1{k 2}) j (AB) ik α(ab) i1 1{k 2} Once again the determinant of B is nonzero only if after reduction B is triangular so that B is also triangular But now both A and B are triangular and it is immediate that AB is triangular Moreover the diagonal terms of AB are the product of the corresponding diagonal terms of A and B That is the determinant of AB is the product of the determinants of A and B Since the identity between the determinant of AB and those of A and B has not been modified by the elementary row and column operations we conclude that det(ab) det(a) det(b) for the original matrices V INVERSE Consider the matrix A C n n We know that the span of A span(a) : {Ax x C n } is a linear space with dimension rank(a) If the columns of A are linearly independent ie if rank(a) n span(a) C n and for every y C n there is some x C n such that Ax y Moreover that x must be unique since we know that the representation of a vector as a linear combination of basis vectors is unique We can then define that unique x to be the inverse of y under A and we designate it by x A 1 y If rank(a) < n then span(a) is a proper subset of C n so that there are some y C n for which there is no x such that Ax y Also if y is in span(a) then there are infinitely many x such that Ax y and any two such values of x differ by an element in the null space of A We now discuss the calculation of A 1 in terms of determinants Theorem 4: Let A C n n Then rank(a) n if and only if det(a) 0 Moreover in that case there is a unique matrix A 1 C n n such that AA 1 I where I designates the identity matrix ie the matrix whose elements are I ij 1{i j} That matrix has entries A 1 1 ij det(a) c ji where c ji is the cofactor of a ji in A Define B to be the matrix with entries b ij c ji We show that AB det(a)i First we check the diagonal elements of

6 AB We find (AB) ii k a ik b ki k a ik c ik det(a) by Fact 4 Second we check the off-diagonal terms Thus let i j Then (AB) ij a ik b kj a ik c jk k k Now consider the matrix D obtained from A by replacing row j of A by a copy of row i of A Note that the cofactor of d jk is not affected by this replacement since that cofactor involves terms that are not on row j Accordingly that cofactor is c jk Hence we can write using Fact 4 det(d) k d jk c jk k a ik c jk But we know that det(d) 0 because that matrix has two identical rows (see Fact 3(b)) Putting these conclusions together we see that AB det(a)i This shows that if det(a) 0 then the matrix A 1 : B/ det(a) is such that AA 1 I It follows that Ax y has a unique solution x A 1 y so that the column of A must be linearly independent and rank(a) n Now assume that rank(a) n We want to show that det(a) 0 Since rank(a) n for every i {1 2 n} there must be some v i C n such that Av i e i where e i (j) 1{i j} The matrix D with columns v i must then be such that AD I Since det(ad) det(a) det(d) this implies that det(a) 0 Theorem 5: Let A C n n Then Ax 0 has a nonzero solution if and only if det(a) 0 If det(a) 0 then we know that A has an inverse A 1 so that Ax 0 implies x 0 Assume that det(a) 0 By performing elementary row operations one converts A to a row echelon form B with det(b) 0 Now det(b) is the product of the diagonal elements of B Consequently B has a zero diagonal element which corresponds to a nonzero x i solving Bx 0 and therefore Ax 0 VI EIGENVALUES AND EIGENVECTORS These concepts are very useful We start with an example A Example Consider the matrix A 4 3 1 2 An eigenvector of A is a nonzero vector v such that Av is proportional to v; that is Av λv The constant λ is called the eigenvalue associated with the eigenvector v You can check that 1 3 v 1 : and v 1 2 : 1 are such that Av 1 v 1 and Av 2 5v 2 Accordingly v 1 and v 2 are two eigenvectors of A with respective eigenvalues λ 1 1 and λ 2 5 This concept is useful because we can write any other vector x as a linear combination of v 1 and v 2 For instance x1 y x 1 v 1 + y 2 v 2 2 with y 1 ( x 1 + 3x 2 )/4 and y 2 (x 1 + x 2 )/4 We then find that Ax A(y 1 v 1 + y 2 v 2 ) y 1 Av 1 + y 2 Av 2 y 1 λ 1 v 1 + y 2 λ 2 v 2 We can write the above calculations in matrix form We have y1 1/4 3/4 x V y v 1 v 2 where y V 1 x y 2 1/4 1/4 so that Ax AV y AV V 1 x λ 1 v 1 λ 2 v 2 V 1 x ΛV V 1 x where Λ diag(λ 1 λ 2 ) is the diagonal matrix with diagonal elements λ 1 λ 2 Repeating these operations n times we find where Λ n diag(λ n 1 λ n 2 ) B General Case A n x Λ n V V 1 x Definition 4: Let A C n An eigenvector of A is a nonzero v C n such that Av λv The constant λ C is called the eigenvalue associated with v Fact 7: Av λv for some v 0 if and only if det(a λi) 0 (A λi)v 0 admits a nonzero solution v if and only if det(a λi) 0 by Theorem 5 The fact above tells us how to find the eigenvalues One can then find the eigenvectors corresponding to an eigenvalue λ by solving the homogeneous equations (A λi)v 0 One procedure to do this is to reduce the matrix to row echelon form Fact 8: Assume that A admits the linearly independent eigenvectors {v 1 v n } with corresponding eigenvalues {λ 1 λ n } Then V 1 AV Λ : diag(λ 1 λ n ) where V v 1 v n This is identical to the example we explained earlier Fact 9: Assume that the eigenvalues of A are distinct Then the corresponding eigenvectors are linearly independent Assume otherwise so that n j1 c jv j 0 for some nonzero c j Then 0 A( c j v j ) c j λ j v j j1 j1

7 It follows that 0 c j λ j v j λ n j1 n j1 n 1 c j v j c j (λ j λ n )v j j1 Hence the eigenvectors {v 1 v 2 v n 1 } are linearly dependent We can repeat the argument and show that the eigenvectors {v 1 v 2 v n 2 } are linearly dependent Continuing in this way shows that the eigenvector v 1 must be linearly dependent clearly a contradiction VII ROTATION AND PROJECTION The length of a vector x C n is defined as x : ( x 2 i ) 1/2 (x x) 1/2 i1 Picture a vector x and imagine that you rotate it around the origin by some angle Intuitively this operation is linear It should therefore correspond to some matrix R The rotation must preserve the length and also the angles between vectors In particular the rotated axes must be orthogonal and have a unit length Since the rotated axes are the columns of the matrix R this implies that R R I In other words R R 1 By definition a rotation matrix is a real matrix with the property above It is immediate that the product of two rotation matrices ia again a rotation matrix Not surprisingly one can represent an arbitrary rotation matrix as a product of rotations around the axes The concept of projection is also important Definition 5: Assume that V is a linear subspace of C n Let x C n The projection of x onto V is the vector v V that is the closest to x ie that achieves min{ x v st v V} We write v x V if v is the projection of x onto V Fact 10: (a) v x V if and only if v V and x v V ie (x v) w 0 w V (b) The projection is unique (c) The projection is a linear operation (d) Assume that V span(v ) span(v 1 v k ) where the column vectors of V are linearly independent Then x V V Mx where M (V V ) 1 V (a) Take any w V so that v + λw V Then x (v + λw) 2 (x v λw) (x v λw) x v 2 2λ(x v) w + λ 2 w 2 Taking the derivative with respect to λ at λ 0 we find that the value of λ 0 achieves the minimum if and only if (x v) w 0 (b) Assume that both v and w achieve the minimum distance to x in V We claim that v w Note that x v V and x w V It follows that w v (x v) (x w) V But w v V Hence 0 (w v) (w v) w v 2 so that v w (c) Assume v i x i V for i 1 2 We show that To show this we verify that This follows from a 1 v 1 + a 2 v 2 (a 1 x 1 + a 2 x 2 ) V a 1 x 1 + a 2 x 2 (a 1 v 1 + a 2 v 2 ) V a 1 x 1 +a 2 x 2 (a 1 v 1 +a 2 v 2 ) v a 1 (x 1 v 1 ) v+a 2 (x 2 v 2 ) v 0 (d) Note that V Mx V Moreover we observe that for any v V z V (x V Mx) V z x V z x M V V z x V z x V (V V ) 1 V V z 0 A little example might help Let v 1 (1 2 3) and v 2 (1 1 2) The V span(v 1 v 2 ) is a linear subspace of C 3 that consists of all the vectors of the form z 1 v 1 +z 2 v 2 V z where V is the matrix with columns v 1 and v 2 and z (z 1 z 2 ) Note that so that or V V M V (V V ) 1 1 3 We conclude that 3 5 3 4 0 1 M 1 3 x V V Mx 14 9 9 6 1 1 2 1 3 2 1 3 3 3 0 5 4 1 1 1 2 1 3 2 1 3 For instance if x (2 1 1) then x V v 1 + 7 3 v 2 V 6 9 9 14 3 3 0 5 4 1 x Also if we choose some v V say v V z then (x x V ) v 2 1 1 4 1 1 1 2 1 z 0 3 1 5 3 2

8 VIII SINGULAR VALUE DECOMPOSITION A Some Terminology A matrix U C n n is said to be unitary if U U I where U is the complex conjugate of the transposed of U The matrix U is said to be orthogonal if it is unitary and real A matrix H C n n is called Hermitian if H H; moreover it is positive semidefinite if x Hx 0 for all x C n ; it is positive definite if x Hx > 0 for all nonzero x C n B Decomposition of Hermitian Matrices Theorem 6: Let H C n n be a Hermitian matrix (a) The eigenvalues λ 1 λ n of H are real (they are not necessarily distinct); (b) Eigenvectors u i and u j that correspond to distinct eigenvalues are orthogonal ie u i u j 0 (c) H has n orthonormal eigenvectors {u 1 u n } that form a basis for C n That is u i u j 1{i j} (d) If P u 1 u n then and P HP Λ diag(λ 1 λ n ) H P ΛP λ i u i u i i1 (e) H is positive semidefinite (resp definite) if and only if λ i 0 (resp > 0) for all i (f) One has max {x x 1} x Hx max{λ i } and min {x x 1} x Hx min{λ i } (a) The eigenvalues of H are the zeros of det(λi H) This polynomial of degree n has n zeros (not necessarily distinct) We show that every eigenvalue λ i must be real Since H H we see that (u i Hu i) u i H u i u i Hu i so that u i Hu i is real However u i Hu i λ i u i u i and u i u i u i 2 is real It follows that λ i is also real (b) Assume that λ i λ j and if Hu i λ i u i and Hu j λ j u j Observe that u i Hu j λ j u i u j so that by taking the complex conjugate λ j u j u i (u i Hu j ) u j Hu i λ i u j u i which shows that (λ i λ j )u j u i 0 Since λ i λ j it follows that u i u j 0 (c) We show that H has n linearly independent eigenvectors Let u 1 be such that Hu 1 λ 1 u 1 and u 1 1 Let also V 1 be the space of vectors orthogonal to u 1 Note that if x V 1 then Hx V 1 Indeed (u 1Hx) x H u 1 x Hu 1 λ 1 x u 1 0 Pick an orthornormal basis {b 2 b n } for V 1 Let P u 1 b 2 b n Any x C n can be written uniquely as P y with y P x since P P I Also HP y λ 1 u 1 y 1 + H( b j y j ) λ 1 u 1 y 1 + b j z j j2 because H( n j2 b jy j ) V 1 By linearity z 2 y 2 z 3 M y 3 z n y n so that HP P H where H λ1 0 0 M j2 Note that M M We claim that the eigenvalues of M are the eigenvalues of H other than λ 1 Indeed det(λi H) det(λi P HP ) det(p (λi H)P ) det(λi H) because det(p ) det(p ) 1 since P P I Now det(λi H) (λ λ 1 ) det(λi n 1 M) Let v 2 be an eigenvector of M with eigenvalue λ 2 That is Mv 2 λ 2 v 2 Let also w 2 0v 2 Note that so that Hw 2 λ 2 w 2 HP w 2 P Hw 2 λ 2 P w 2 which shows that u 2 P w 2 is an eigenvector of H with eigenvalue λ 2 Moreover u 2 V 1 so that u 2 is orthogonal to u 1 We can normalize u 2 so that u 2 1 Continuing in this way we define V 2 to be the subspace of C n orthogonal to u 1 and u 2 Repeating the previous steps we find a collection of vectors {u 1 u 2 u n } that are orthonormal and such that Hu i λ i u i (d) This is immediate (e) and (f) follow from (d) C Illustration of SVD The goal of this section is to illustrate that an m n matrix A can be decomposed as UΣV where Σ is diagonal and U V are unitary This decomposition called the singular value decomposition of A enables us to view the action of A as a combination of scaling and rotations We use that result to explain the transformation of a sphere into an ellipsoid and to show how volumes gets mapped which is essential in calculus Consider the matrix 1 3 A 2 0 Then A 1 2 AA 4 2 3 0 2 4 A 5 3 A 3 3

9 Fig 2 v 1 2 05 u 2 u 2 v 2 u 1 A A 6 05 u 1 The action of A combines rotations and scaling By solving det(λi AA ) 0 one finds the eigenvalues σ1 2 6 and σ2 2 2 of AA These are also the eigenvalues of A A Solving AA u j σj 2u j and A Av j σj 2v j for j 1 2 one finds the following orthonormal eigenvectors of AA and A A: U u 1 u 2 1 1 1 2 1 1 V v 1 v 2 1 2 3 1 1 3 You can verify that A UΣV with Σ diag{σ 1 σ 2 } diag{ 6 2} Since A UΣV it follows that AV UΣ That is Av j u j σ j which shows that A rotates v j into u j and scales it by σ j For instance consider the sphere S {x C 2 x 2 1} Thus S {α 1 v 1 + α 2 v 2 α1 2 + α2 2 1} The mapping under A of S is AS {Ax x S} Thus AS {AV α α 2 1} {UΣα α 2 1} {σ 1 α 1 u 1 + σ 2 α 2 u 2 α 2 1 + α 2 2 1} We conclude that AS is an ellipsoid with principal axes along u 1 and u 2 and of lengths σ 1 and σ 2 The mapping S AS is illustrated in Figure 2 As another application consider the transformation of the square Q {α 1 v 1 +α 2 v 2 α 1 α 2 0 1} under the mapping A As the figure shows AQ {β 1 σ 1 u 1 + β 2 σ 2 u 2 β 1 β 2 0 1} We conclude that A maps the square Q with area 1 into a rectangle AQ with area σ 1 σ 2 det(a) We can write this result differentially as Adv det(a) dv where dv {x x j (v j v j + dv j ) j 1 2} and dv dv 1 dv 2 This identity states that A maps a small area dv into an area that is multiplied by det(a) We now turn to the derivation of that decomposition in the general case D SVD of a matrix Theorem 7: Let A C m n be a matrix of rank r The matrix A has a singular value decomposition where A UΣV with Σ diag{σ 1 σ r 0 0} σ 1 σ 2 σ r > 0 are the square roots of the common positive eigenvalues of A A and AA ; V V 1 V 2 is unitary; the columns of V 1 are a basis of R(A ) and those of V 2 are a basis of N(A); the columns of V are a basis of eigenvectors of A A; U 1 : AV 1 Σ 1 1 ; U U 1 U 2 is unitary; the columns of U 1 are a basis of R(A) and those of U 2 are a basis of N(A ); the columns of U are a basis of eigenvectors of AA The matrix H A A is Hermitian and positive semidefinite since x Hx (Ax) (Ax) 0 Moreover H has rank r because R(A A) R(A) by Lemma 1 By Theorem 6 H has the eigenvalues σi 2 with σ 2 1 σ 2 2 σ 2 r > 0 σ 2 r+1 σ 2 n to which corresponds an orthonormal basis of eigenvectors {v 1 v n } of A A Let V v 1 v n V 1 V 2 where V 1 v 1 v r so that V V I Also by Lemma 1 R(A A) R(A ) N(A A) N(A) and R(A ) N(A) It follows that V 1 is a basis of R(A ) and V 2 a basis of N(A) With Σ 1 diag{σ 1 σ r } one sees that A AV 1 V 1 Σ 2 1 Let U 1 : AV 1 Σ 1 1 It follows that U 1 U 1 I r Moreover AA U 1 U 1 Σ 2 1 Let {u 1 u r } be the columns of U 1 We conclude that u i u j 1{i j} and AA u i σ 2 i u i But AA and A A have exactly the same r nonzero eigenvalues Indeed if A Ay λy and x Ay then AA x AA Ay λay λx so that the eigenvalues of A A are eigenvalue of AA By symmetry A A and AA have the same eigenvalue It follows that the columns of U 1 form an orthonormal basis for R(AA ) R(A) Define now an m (m r) matrix U 2 with orthonormal columns such that U2 U 1 0 Then U U 1 U 2 is a unitary matrix with C m R(U 1 ) R(U 2 ) Since C m R(A) N(A ) and R(U 1 ) R(A) it follows that R(U 2 ) N(A ) with the columns of U 2 forming an orthonormal basis for N(A ) We conclude that the columns of U form a basis of eigenvectors of AA Finally since U 1 AV 1 Σ 1 we find that and UΣV U 1 U 2 U 1 Σ 1 V 1 AV 1 Σ 1 Σ 1 V 1 A Σ1 0 0 0 which completes the proof V 1 V 2 U 1 Σ 1 V 1 A

10 IX NOTES ON MATLAB MATLAB is a software package that provides many mathematical functions and visualization tools It is particularly suited for matrix operations We illustrate some useful functions It is not a bad idea to become familiar with MATLAB even though we will not require it for this version of the course A Matrix Notation The matrix B is written in MATLAB as 3 4 2 5 1 3 1 4 2 B 3 4 2; 5 1 3; 1 4 2 The product of two matrices B and C with compatible dimensions is written as B*C C 0 05000 05774-02887 and you can verify that A*C ans 1 0 0 1 D Singular Value Decomposition Here is the code you need to calculate the singular value decomposition of matrix A in Section VIII-C U S V svd(1 3ˆ05; 2 0) B Eigenvectors We find the eigenvalues of matrix A as follows: eig(a) which returns ans 24272-14272 To find the eigenvectors we write V D eig(a) which returns V 07718-05809 06359 08140 U S V That function returns -07071-07071 -07071 07071 24495 0 0 14142-08660 05000-05000 -08660 D C Inverse 24272 0 0-14272 The inverse of A is obtained as follows: C inv(a) which returns X EXERCISES Calculations can be done in MATLAB However it is useful to know the steps to understand what is going on We solve some of the problems and we let you work on the others Exercise 1: Calculate the inverse of the following matrices: Solutions 1 2 3 1 2 2 3 1 2 5 4 2 3 2 3 1 2 5 4 2 3 2 1 3 1 4 1 3 1 3 1 1 3 4 7 2 5

11 Let A 2 1 3 1 4 1 3 1 3 The matrix C of cofactors of A is 11 0 11 C 0 3 1 11 1 7 The determinant of A can be found using Fact 4 We get by expanding over the first column det(a) 2 11 + 1 0 + 3 ( 11) 11 Finally we get A 1 1 det(a) C 1 11 11 0 11 0 3 1 11 1 7 Exercise 2: Perform the elementary row operations to reduce the following matrices to row echelon form: 5 3 1 2 3 1 2 2 3 1 2 A 2 4 2 4 4 2 3 4 6 2 3 2 3 6 2 3 6 1 1 2 1 2 Solution: For matrix A the first step is r 2 : r 2 2 5 r 1 02802 The second step is to cancel the first two elements of r 3 The first element is canceled as follows: r 3 r 3 2 5 r 1 01852 We cancel the second element by subtracting a multiple of r 2: r 3 r 3 18 28 r 2 r 3 014r 1 064r 2 0046 Thus we perform the operation 1 0 0 04 1 0 014 064 1 A 5 3 1 0 28 16 0 0 46 We let you perform the same steps for the other matrices Exercise 3: Perform the elementary row operations and the elementary column operations step by step to explain that the determinant of the product of the following two matrices is the product of their determinants: A 4 3 3 2 and B 5 4 3 3 Indeed elementary row operations LAB do not modify the determinant of AB Also elementary column operations LABU do not modify the determinant of LAB Now LABU (LA)(BU ) But 4 3 0 025 1 4 0 3 4 25 0 075 det(a) det(la) (4)( 025) det(b) det(bu ) (1)(3) Moreover so that det((la)(bu )) (4)( 025 3) det(ab) det(a) det(b) The same argument goes for the other examples Exercise 4: Repeat the previous exercise for the following two matrices: 4 2 3 5 2 1 2 3 5 and 1 3 1 2 4 7 3 2 6 Exercise 5: Find a basis for the span of the following vectors: (1 1 3 2) (2 3 1 2) (2 1 2 3) Exercise 6: Find the rank and the dimension of the null space of the following matrices: 3 1 2 2 2 4 1 1 2 4 2 3 5 7 2 4 2 3 5 1 2 and 4 2 3 5 3 2 2 6 0 1 6 3 3 5 0 Exercise 7: Find x V where V span(v ) for the following values of x and V : 3 1 2 2 2 4 1 1 2 V : 4 2 3 5 7 2 4 2 3 5 1 2 and 4 2 3 5 3 2 2 6 0 1 6 3 3 5 0 and x (1 3 1 3) (2 1 4 2) and (2 2 1 1) Exercise 8 (Optional): Use MATLAB to find the decomposition H P ΛP of the following Hermitian matrices: 4 2 3 2 1 5 and 5 2 1 2 3 2 3 5 7 1 2 6 Solution: Note that det(ab) det(labu ) where L 1 0 075 1 and U 1 0 1 1

12 Solution Here are the steps >> V D eig(4 2 3;2 1 5;3 5 7) V -00553 09009 04304 08771-01622 04520-04771 -04025 07813 D -18455 0 0 0 22997 0 0 0 115458 Hence H V DV REFERENCES 1 F M Callier and C A Desoer: Linear System Theory Springer Verlag 1991; Appendix Ab 2 B Noble and J W Daniel: Applied Linear Algebra Prentice Hall 1997