Linear Algebra Prof. J. Saxl Michaelmas 2005 LATEXed by Sebastian Pancratz ii These notes are based on a course of lectures given by Prof. J. Saxl in Part IB of the Mathematical Tripos at the University of Cambridge in the academic year 2005(cid:21)2006. ThesenoteshavenotbeencheckedbyProf.J.Saxlandshouldnotberegardedaso(cid:30)cial notes for the course. In particular, the responsibility for any errors is mine (cid:22) please email Sebastian Pancratz (sfp25) with any comments or corrections. Contents 1 Vector spaces 1 2 Linear maps, matrices 7 2.1 Basic de(cid:28)nitions and properties . . . . . . . . . . . . . . . . . . . . . . . 7 2.2 The space of linear maps . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.3 Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.4 Change of bases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.5 Rank . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.6 Calculations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3 Determinant and trace 15 4 Endomorphisms, matrices, eigenvectors 23 5 Dual spaces 33 6 Bilinear forms 37 7 Inner product spaces 45 Chapter 1 Vector spaces Remark. Write F for the (cid:28)eld R or C. The crucial properties of F are as follows. • F is an abelian group under +, with additive identity 0. • F\{0} is an abelian group under ·, with multiplicative identity 1. • Multiplication is distributive over addition, a(b+c) = ab+ac for all a,b,c ∈ F. De(cid:28)nition. The set V is a vector space over F if the following holds. (A) V is an abelian group under an operation +. (A0) + : V → V, (v ,v ) 7→ v +v ∈ V; 1 2 1 2 (A1) For all v ,v ,v ∈ V, (v +v )+v = v +(v +v ); 1 2 3 1 2 3 1 2 3 (A2) For all v ,v ∈ V, v +v = v +v ; 1 2 1 2 2 1 (A3) There exists 0 ∈ V such that v+0 = v for all v ∈ V. (A4) For each v ∈ V there exists −v ∈ V such that −v+v = 0. (B) There exists a multiplication · by scalars on V. (B0) · : F×V → V, (λ,v) 7→ λv; (B1) For all λ ∈ F,v ,v ∈ V, λ(v +v ) = λv +λv ; 1 2 1 2 1 2 (B2) For all λ ,λ ∈ F,v ∈ V, (λ +λ )v = λ v+λ v; 1 2 1 2 1 2 (B3) For all λ ,λ ∈ F,v ∈ V, (λ λ )v = λ (λ v); 1 2 1 2 1 2 (B4) For all v ∈ V, 1v = v. Lemma 1.1. Let V be a vector space over F and let v ∈ V,λ ∈ F. Then (i) 0·v = 0, λ·0 = 0; (ii) −v = (−1)·v; (iii) if λv = 0 then either λ = 0 or v = 0. Proof. (i) 0·v = (0+0)·v = 0·v+0·v, so 0 = 0·v. (ii) −v+v = 0 = 0v = (−1+1)v = (−1)v+1v = (−1)v+v, so −v = (−1)v. 2 Vector spaces (iii) Let λv = 0 and suppose λ 6= 0. Then λ−1 exists and λ−1(λv) = λ−10 = 0 but λ−1(λv) = (λ−1λ)v = 1v = v so v = 0. Example. (i) The space Fn of n-tuples with entries in F. (ii) Let X be any set. The set FX of all functions X → F is a vector space over F addition and multiplication de(cid:28)ned pointwise. De(cid:28)nition. LetV beavectorspaceoverF. AsubsetU ⊂ V isasubspaceofV, written U ≤ V if • 0 ∈ U; • u ,u ∈ U =⇒ u +u ∈ U; 1 2 1 2 • λ ∈ F,u ∈ U =⇒ λu ∈ U. Equivalently, U 6= ∅ and U is closed under linear combinations. Lemma 1.2. If V is a vector space over F and U ≤ V then U is a vector space over F under the restriction of the operations + and · on V to U. Example. (i) RR is a vector space over R. The set C(R) of continuous real functions is a subspace, and hence a real vector space. (ii) Similarly, one can also consider the subspaces D(R) and P(R)) of di(cid:27)erentiable and polynomial functions, respectively. Remark. If n ∈ N , λ ,...,λ ∈ F, v ,...,v ∈ V write Pn λ v for the linear 0 1 n 1 n i=1 i i combination λ v +···+λ v . By convention, P0 λ v = 0. Also note that all linear 1 1 n n i=1 i i P combinations are (cid:28)nite. If S ⊂ V, the linear combination λ v has only (cid:28)nitely v∈S v many v such that λ 6= 0. v De(cid:28)nition. The vector v ,...,v in V span (or generate) V over F if any v ∈ V is a 1 n linear combination of v ,...,v . Write V = hv ,...,v i. 1 n 1 n More generally, if S ⊂ V then S spans V if n X ∀v ∈ V ∃n ∈ N ∃v ,...,v ∈ V ∃λ ,...,λ ∈ F v = λ v . 0 1 n 1 n i i i=1 Example. (i) P (R) is spanned by 1,x,x2. 2 (ii) P(R) is not (cid:28)nite-dimensional. De(cid:28)nition. The vectors v ,...,v are linearly independent in V over F if whenever 1 n λ v + ···λ v = 0 then λ = ··· = λ = 0. Otherwise, the vectors are linearly 1 1 n n 1 n dependent. More generally, if S ⊂ V then S is linearly independent precisely if every (cid:28)nite subset of S is linearly independent. Remark. 0 is never contained in a linearly independent set as 1·0 = 0. Remark. (i) V = C is a vector space over R and 1,i are linearly independent. 3 (ii) V = C is also a vector space over C. In this case, 1,i are linearly dependent. De(cid:28)nition. The vectors v ,...,v form a basis of V if they both span V over F and 1 n are linearly independent. Example. (i) P (R) has standard basis 1,x,x2. 2 (ii) Fn has standard basis e ,...,e where e = (0,...,1,...,0)T. 1 n i (iii) {0} has basis ∅. Lemma 1.3. v ,...,v ∈ V form a basis of V over F if and only if each element v ∈ V 1 n can be written uniquely as v = Pn λ v with λ ∈ F. i=1 i i i Proof. Let v ∈ V. v ,...,v span V so v = Pn λ v for some λ ∈ F. If also 1 n i=1 i i i v = Pn µ v then 0 = Pn (λ −µ )v , so as v ,...,v are linearly independent, we i=1 i i i=1 i i i 1 n have λ = µ for i = 1,...,n. i i Conversely, since each v ∈ V is a linear combination of v ,...,v , we have v ,...,v 1 n 1 n span V over F. They are linearly dependent since if Pn λ v = 0 = Pn 0v then i=1 i i i=1 i λ = 0 for i = 1,...,n by uniqueness. i Lemma 1.4. if v ,...,v span V over F, some subset of {v ,...,v } is a basis of V. 1 n 1 n Proof. If v ,...,v are linearly independent, we are done. Otherwise, for some k, there 1 n exist α ,...,α ∈ F with v = α v + ··· + α v . (If λ v + ··· + λ v = 0 1 k−1 k 1 1 k−1 k−1 1 1 n n with not all λ = 0, take k maximal with λ 6= 0 and let α = −λi.) Then i k i λ k v ,...,v ,v ,...,v stillspanV sincewheneverv = Pn λ v thenv = Pk−1(α + 1 k−1 k+1 n i=1 i i i=1 i λ )v +Pn λ v . Continue deleting until we have a basis. i i i=k+1 i i Theorem 1.5 (Steinitz Exchange Lemma). Let V be a (cid:28)nite dimensional vector space over F. Let v ,...,v be linearly independent and let w ,...,w span V over F. Then 1 m 1 n m ≤ n, and reordering the w if necessary, the vectors v ,...,v ,w ,...,w span V. i 1 m m+1 n Proof. Supposewehavereplacedr ≥ 0ofthew already,renumberingthew ifnecessary, i i wehavev ,...,v ,w ,...,w spanV. Ifr = m, wearedone. Soassumer < m. Then 1 r r+1 n r n X X v = α v + β w r+1 i i i i i=1 i=r+1 for some α ,β ∈ F. Note that β 6= 0 for some i since v ,...,v ,v are linearly i i i 1 r r+1 independent. After reordering w ,...,w we have β 6= 0. Then r+1 n r+1 r X −αi 1 X −βi w = v + v + w . r+1 i r+1 i β β β r+1 r+1 r+1 i=1 i=r+2 It follows that V is spanned by v ,...,v ,v ,w ,...,w . After m steps, we shall 1 r r+1 r+2 n have replaced m of the w by the v , retaining the spanning property. It follows that i i m ≤ n. Theorem 1.6. If V is a (cid:28)nite dimensional vector space over F, any two bases have the same size, the dimension of V over F, dimFV. 4 Vector spaces Proof. Let v ,...,v and w ,...,w be two bases. Then m ≤ n since the v are linearly 1 m 1 n i independent and the w span V. Also n ≤ m since the w are linearly independent and i i the v span V. i Example. (i) dimFFn = n; (ii) dimRP2(R) = 3; (iii) dimRC = 2; (iv) dimFF = 1. Lemma 1.7. IfV isa(cid:28)nitedimensionalvectorspaceoverF,andifthevectorsv ,...,v 1 k are linearly independent for some k ≥ 0, there exists a basis v ,...,v ,v ,...,v of 1 k k+1 n V. Proof. If v ,...,v span V, we are done. Otherwise, take v ∈ V \hv ,...,v i. Then 1 k k+1 1 k v ,...,v are linearly independent. We shall obtain a basis after dimV −k steps. 1 k+1 Remark. If V is (cid:28)nite dimensional then whenever U ≤ V then dimU ≤ dimV with equality if and only if U = V. Lemma 1.8. Let V be a vector space over F with dimV = n. (i) An independent set has at most n vectors, with equality if and only if it as basis. (ii) A spanning set has at least n vectors, with equality if and only if it a basis. Proof. (i) This follows from Lemma 1.7 and Theorem 1.6. (ii) This follows from Lemma 1.4 and Theorem 1.6. Lemma 1.9. Let dimFV = n. The following are equivalent. (i) v ,...,v form a basis. 1 n (ii) v ,...,v are linearly independent. 1 n (iii) v ,...,v span V. 1 n Lemma 1.10. Let S ⊂ V. There is a unique smallest subspace U of V containing S, denoted by U = hSi, the subspace generated by S. In fact, U consists of linear combinations of elements of S. Proof. If we write U for the set of linear combinations of elements of S then U is a subspace of V. On the other hand, U as de(cid:28)ned above has to be in any subspace containing S. Example. Let V = RR and S = {1,x,x2,...}. Then hSi = P(R), the subspace of polynomial functions. Remark. (i) The intersection of any collection of subspaces is a subspace. (ii) If U,W ≤ V de(cid:28)ne U +W = {u+w : u ∈ U,w ∈ W}. Then U +W ≤ V. 5 (iii) Note that U ∪W is a subspace if and only if U ⊂ W or W ⊂ U. Theorem 1.11. If U, W are (cid:28)nite dimensional subspaces of V then U+W is also (cid:28)nite dimensional and dimU +W = dimU +dimW −dimU ∩W. Proof. Let v ,...,v be a basis for U ∩ W. Extend this to v ,...,v ,u ,...,u 1 k 1 k 1 l a basis for U and to v ,...,v ,w ,...,w a basis for W. We claim 1 k 1 m v ,...,v ,u ,...,u ,w ,...,w is a basis for U +W. 1 k 1 l 1 m P P • If v ∈ U +W, then v = u+w for some u ∈ U, w ∈ W. Now u = α v + β u i i i i for some α ,β ∈ F and w = Pα0v +Pγ w for some α0,γ ∈ F, and therefore i i i i i i i i X X X v = (α +α0)v + β u + γ w . i i i i i i i P P P • Suppose α v + β u + γ w = 0. Then i i i i i i X X X α v + β u = − γ w i i i i i i X = δ v i i for some δ ∈ F, using that the LHS is in U and the RHS is in W, so both vectors i are in U ∩W. Then X X (α −δ )v + β u = 0, i i i i i and as v ,...,v ,u ,...,u form a basis of U, we have that all β are 0. But then 1 k 1 l i X X α v + γ w = 0, i i i i and as v ,...,v ,w ,...,w form a basis of W, we have that all α ,γ are 0. 1 k 1 m i i De(cid:28)nition. Let V be a vector space over F and suppose U,W ≤ V. Then V = U ⊕W if every element v of V can be written uniquely as v = u+w with u ∈ U and w ∈ W. If so, we say W is the complement (or complementary subspace) of U in V. Lemma 1.12. Suppose U,W ≤ V. Then V = U ⊕W if and only if U +W = V and U ∩W = {0}. Lemma 1.13. If V is a (cid:28)nite dimensional vector space over F and U ≤ V, then U has a complement in V. (Note this is not at all unique unless U = {0} or U = V.) Proof. Take v ,...,v a basis for U and extend to a basis u ,...,u ,w ,...,w for 1 k 1 k k+1 n V. Then W = hw ,...,w i is a complement of U in V. k+1 n P P Lemma 1.14. Suppose V ,...,V ≤ V and let V = { v : v ∈ V } ≤ V. The sum 1 k i i i i L P is direct, written as V , if each v ∈ V is uniquely expressible as v with v ∈ V . i i i i Lemma 1.15. Let V ,...,V ≤ V. The following are equivalent. 1 k P (i) V is direct. i 6 Vector spaces (ii) If B is a basis for V then B = Sk B is a basis for PV . i i i=1 i i P (iii) For each i, V ∩ V = {0}. i j6=i j Note that in (iii), if k > 2 it is not enough to assume V ∩V = {0} for all i 6= j. i j Proof. We show (i) =⇒ (ii). Let B be a basis for V , let B = Sk B . If v ∈ PV i i i=1 i i then v = Pk v , and v can be written as a linear combination of vectors in B , so i=1 i i i substitute for each v and obtain v as a linear combination of B. If we have a linear i combination of vectors in B equal to 0, collect together terms in each V , let v denote i i the part in V . Then v +···+v = 0. By uniqueness of expression for 0, we have v = 0. i 1 k i Now B is linear independent, so all coe(cid:30)cients are 0. i