Linear Algebra Chapter 4 General Vector Spaces 4
Linear Algebra Chapter 4 General Vector Spaces 大葉大學 資訊 程系 黃鈴玲
4. 1 General Vector Spaces and Subspaces Our aim in this section will be to focus on the algebraic properties of Rn. We draw up a set of axioms (公理) based on the properties of Rn. Any set that satisfies these axioms will have similar algebraic properties to the vector space Rn. Definition A vector space is a set V of elements called vectors, having operations of addition and scalar multiplication defined on it that satisfy the following conditions. (u, v, and w are arbitrary elements of V, and c and d are scalars. ) Closure Axioms (最重要!) 1. The sum u + v exists and is an element of V. (V is closed under addition. ) 2. cu is an element of V. (V is closed under scalar Ch 04_2 multiplication. )
補充範例 (1) V={ …, -3, -1, 1, 3, 5, 7, …} (所有奇數構成的集合) V is not closed under addition because 1+3=4 V. (2) Z={ …, -2, -1, 0, 1, 2, 3, 4, …} (所有整數構成的集合) Z is closed under addition because for any a, b Z, a + b Z. Z is not closed under scalar multiplication because ½ is a scalar, for any odd a Z, (½)a Z. 隨堂作業: 14 Ch 04_3
Definition of Vector Space (continued) Addition Axioms 3. u + v = v + u (commutative property) 4. u + (v + w) = (u + v) + w (associative property) 5. There exists an element of V, called the zero vector, denoted 0, such that u + 0 = u. 6. For every element u of V there exists an element called the negative of u, denoted -u, such that u + (-u) = 0. Scalar Multiplication Axioms 7. c(u + v) = cu + cv 8. (c + d)u = cu + du 9. c(du) = (cd)u 10. 1 u = u Ch 04_4
A Vector Space in R 3 補充: Proof Let Prove that W is a vector space. , for some a, b R. Axiom 1: u + v W. Thus W is closed under addition. Axiom 2: W. Thus W is closed under scalar multiplication. Axiom 5: Let 0 = (0, 0, 0) = 0(1, 0, 1), then 0 W and 0+u = u+0 = u for any u W. Axiom 6: For any u = a(1, 0, 1) W. Let -u = -a(1, 0, 1), then -u W and (-u)+u = 0. 隨堂作業: 5 Axiom 3, 4 and 7~10: trivial Ch 04_5
Vector Spaces of Matrices Prove that M 22 is a vector space. Proof Let Axiom 1: u + v is a 2 2 matrix. Thus M 22 is closed under addition. Axiom 3 and 4: From our previous discussions we know that 2 2 matrices are communicative and associative under addition (Theorem 2. 2). Ch 04_6
Axiom 5: The 2 2 zero matrix is , since Axiom 6: 推廣:The set of m n matrices, Mmn, is a vector space. 隨堂作業: 7 Ch 04_7
Vector Spaces of Functions (跳過) Prove that V={ f | f: R R } is a vector space. Let f, g V, c R. For example: f: R R, f(x)=2 x, 2+1. g: R R, g(x)=x Axiom 1: f + g is defined by (f + g)(x) = f(x) + g(x). f + g : R R f + g V. Thus V is closed under addition. Axiom 2: cf is defined by (cf)(x) = c f(x). cf : R R cf V. Thus V is closed under scalar multiplication. Ch 04_8
Vector Spaces of Functions (跳過) Axiom 5: Let 0 be the function such that 0(x) = 0 for every x R. 0 is called the zero function. We get (f + 0)(x) = f(x) + 0 = f(x) for every x R. Thus f + 0 = f. 0 is the zero vector. Axiom 6: Let the function –f defined by (-f )(x) = -f (x). Thus [f + (-f )] = 0, -f is the negative of f. 隨堂作業: 13 V={ f | f(x)=ax 2+bx+c for some a, b, c R} Ch 04_9
The Complex Vector Space Cn (跳過) It can be shown that Cn with these two operations is a complex vector space. Ch 04_10
Theorem 4. 1 Let V be a vector space, v a vector in V, 0 the zero vector of V, c a scalar, and 0 the zero scalar. Then (a) 0 v = 0 (b) c 0 = 0 (c) (-1)v = -v (d) If cv = 0, then either c = 0 or v = 0. Proof (a) 0 v + 0 v = (0 + 0)v = 0 v (0 v + 0 v) + (-0 v) = 0 v + (-0 v) 0 v + [0 v + (-0 v)] = 0, 0 v + 0 = 0, 0 v = 0 (c) (-1)v + v = (-1)v + 1 v = [(-1) + 1]v = 0 Ch 04_11
Subspaces In general, a subset of a vector space may or may not satisfy the closure axioms. However, any subset that is closed under both of these operations satisfies all the other vector space properties. Definition Let V be a vector space and U be a nonempty subset of V. If U is a vector space under the operations of addition and scalar multiplication of V it is called a subspace of V. Note. U只要有加法與純量乘法的封閉性,其他axiom都會滿足。 Ch 04_12
Example 1 Let W be the subset of R 3 consisting of all vectors of the form (a, a, b). Show that W is a subspace of R 3. Solution Let (a, a, b), (c, c, d) W, and let k R. We get (a, a, b) + (c, c, d) = (a+c, b+d) W k(a, a, b) = (ka, kb) W Thus W is a subspace of R 3. Ch 04_13
Example 1’ Let W be the set of vectors of the form (a, a 2, b). Show that W is not a subspace of R 3. Solution Let (a, a 2, b), (c, c 2, d) W. (a, a 2, b) + (c, c 2, d) = (a+ c, a 2 + c 2, b + d) (a + c, (a + c)2, b + d) Thus (a, a 2, b) + (c, c 2, d) W. W is not closed under addition. W is not a subspace. 隨堂作業: 18(a), 20(b) Ch 04_14
Example 2 Prove that the set U of 2 2 diagonal matrices is a subspace of the vector space M 22 of 2 2 matrices. Solution (+) Let U. We get u + v U. U is closed under addition. ( ) Let c R. We get cu U. U is closed under scalar multiplication. U is a subspace of M 22. 隨堂作業: 27(a) Ch 04_15
Example 3 (跳過) Let Pn denoted the set of real polynomial functions of degree n. Prove that Pn is a vector space if addition and scalar multiplication are defined on polynomials in a pointwise manner. Solution Let f and g Pn, where (+) (f + g)(x) is a polynomial of degree n. Thus f + g Pn. Pn is closed under addition. Ch 04_16
(跳過) ( ) Let c R, (cf)(x) is a polynomial of degree n. Thus cf Pn. Pn is closed under scalar multiplication. By (+) and ( ), Pn is a subspace of the vector space V of functions. Therefore Pn is a vector space. Ch 04_17
Theorem 4. 2 Let U be a subspace of a vector space V. U contains the zero vector of V. Proof Let u be an arbitrary vector in U and 0 be the zero vector of V. Let 0 be the zero scalar. By Theorem 4. 5(a) we know that 0 u = 0. Since U is closed under scalar multiplication, this means that 0 is in U. Note. Let 0 be the zero vector of V, U is a subset of V. If 0 U U is not a subspace of V. If 0 U check (+)( ) to determine if U is a subspace of V. Ch 04_18
Example 4 Let W be the set of vectors of the form (a, a, a+2). Show that W is not a subspace of R 3. Solution If (a, a, a+2) = (0, 0, 0), then a = 0 and a + 2 = 0. (0, 0, 0) W. W is not a subspace of R 3. 隨堂作業: 24(a, b), 27(b) Ch 04_19
Homework Exercise 4. 1: 5, 7, 14, 18, 19, 20, 24, 27 Ch 04_20
4. 2 Linear Combinations W={(a, a, b) | a, b R} R 3 (a, a, b) = a (1, 1, 0) + b (0, 0, 1) W中的任何向量都可以用 (1, 1, 0) 及 (0, 0, 1)來表示 e. g. , (2, 2, 3) = 2 (1, 1, 0) + 3 (0, 0, 1) (-1, 7) = -1 (1, 1, 0) + 7 (0, 0, 1) Definition Let v 1, v 2, …, vm be vectors in a vector space V. The vector v in V is a linear combination (線性組合) of v 1, v 2, …, vm if there exist scalars c 1, c 2, …, cm such that v can be written v = c 1 v 1 + c 2 v 2 + … + cmvm W中的任何向量都是 (1, 1, 0) 及 (0, 0, 1) 的 linear combination. Ch 04_21
Example The vector (7, 3, 2) is a linear combination of the vector (1, 3, 0) and (2, -3, 1) since (7, 3, 2) = 3(1, 3, 0) + 2(2, -3, 1) The vector (3, 4, 2) is not a linear combination of (1, 1, 0) and (2, 3, 0) because there are no values of c 1 and c 2 for which (3, 4, 2) = c 1(1, 1, 0) + c 2(2, 3, 0) is true. Ch 04_22
Example 1 Determine whether or not the vector (8, 0, 5) is a linear combination of the vectors (1, 2, 3), (0, 1, 4), and (2, -1, 1). Solution Suppose c 1(1, 2, 3)+c 2(0, 1, 4)+c 3(2, -1, 1)=(8, 0, 5). Thus (8, 0, 5) is a linear combination of (1, 2, 3), (0, 1, 4), and (2, -1, 1). 隨堂作業: 2(a) Ch 04_23
v決定一個向量是否是某些向量的linear combination 求解聯立方程式 唯一解表示 linear combination 的係數唯一 無限多解表示 linear combination 的係數不唯一 無解表示不是 linear combination Ch 04_24
Example 2 Determine whether the vector (4, 5, 5) is a linear combination of the vectors (1, 2, 3), (-1, 1, 4), and (3, 3, 2). Solution Suppose Thus (4, 5, 5) can be expressed in many ways as a linear combination of (1, 2, 3), (-1, 1, 4), and (3, 3, 2): Ch 04_25
Example 2’ Show that the vector (3, -4, -6) cannot be expressed as a linear combination of the vectors (1, 2, 3), (-1, -2), and (1, 4, 5). Solution Suppose This system has no solution. Thus (3, -4, -6) is not a linear combination of (1, 2, 3), (-1, -2), and (1, 4, 5). 隨堂作業: 2(c) Ch 04_26
Spanning a Vector Space Definition Let v 1, v 2, …, vm be vectors in a vector space V. These vectors span V if every vector in V can be expressed as a linear combination of them. {v 1, v 2, …, vm} is called a spanning set of V. Ch 04_27
Example 3 Show that the vectors (1, 2, 0), (0, 1, -1), and (1, 1, 2) span R 3. Solution Let (x, y, z) be an arbitrary element of R 3. Suppose The vectors (1, 2, 0), (0, 1, -1), and (1, 1, 2) span R 3. 隨堂作業: 4(a) Ch 04_28
Theorem 4. 3 Let v 1, …, vm be vectors in a vector space V. Let U be the set consisting of all linear combinations of v 1, …, vm. Then U is a subspace of V spanned the vectors v 1, …, vm. U is said to be the vector space generated by v 1, …, vm. It is denoted Span{v 1, …, vm}. Proof (+) Let u 1 = a 1 v 1 + … + amvm and u 2 = b 1 v 1 + … + bmvm U. Then u 1 + u 2 = (a 1 v 1 + … + amvm) + (b 1 v 1 + … + bmvm) = (a 1 + b 1) v 1 + … + (am + bm) vm u 1 + u 2 is a linear combination of v 1, …, vm. u 1 + u 2 U. U is closed under vector addition. Ch 04_29
( )Let c R. Then cu 1 = c(a 1 v 1 + … + amvm) = ca 1 v 1 + … + camvm) cu 1 is a linear combination of v 1, …, vm. cu 1 U. U is closed under scalar multiplication. Thus U is a subspace of V. By the definition of U, every vector in U can be written as a linear combination of v 1, …, vm. Thus v 1, …, vm span U. Ch 04_30
Example 4 Consider the vectors (-1, 5, 3) and (2, -3, 4) in R 3. Let U =Span{(-1, 5, 3), (2, -3, 4)}. U will be a subspace of R 3 consisting of all vectors of the form c 1(-1, 5, 3) + c 2(2, -3, 4). The following are examples of some of the vectors in U, which are obtained by given c 1 and c 2 various values. We can visualize U. U is made up of all vectors in the plane defined by the vectors (-1, 5, 3) and (2, -3, 4). Ch 04_31
Figure 4. 1 Ch 04_32
We can generalize this result. Let v 1 and v 2 be vectors in the space R 3. The subspace U generated by v 1 and v 2 is the set of all vectors of the form c 1 v 1 + c 2 v 2. If v 1 and v 2 are not colinear, then U is the plane defined by v 1 and v 2. Figure 4. 2 Ch 04_33
Example 5 Let v 1 and v 2 span a subspace U of a vector V. Let k 1 and k 2 be nonzero scalars. Show that k 1 v 1 and k 2 v 2 also span U. Solution Choose any vector v U. Since v 1 and v 2 span U, There exist a, b R such that v = av 1 + bv 2 We can write k 1 v 1 and k 2 v 2 span U. 隨堂作業: 20 Ch 04_34
Example 6 Determine whether the matrix of the matrices is a linear combination in the vector space M 22 of 2 2 matrices. Solution Suppose Then Ch 04_35
This system has the unique solution c 1 = 3, c 2 = -2, c 3 = 1. Therefore Ch 04_36
Example 7 (跳過) Show that the function h(x) =4 x 2+3 x-7 lies in the space Span{f, g} generated by f(x) = 2 x 2 -5 and g(x) = x+1. Solution Suppose Then Therefore the function h(x) lies in Span{f, g}. Ch 04_37
Homework Exercise 4. 2: 2, 4, 6, 18, 20 Ch 04_38
4. 3 Linear Dependence and Independence The concepts of dependence and independence of vectors are useful tools in constructing “efficient” spanning sets for vector spaces – sets in which there are no redundant vectors. Definition (a) The set of vectors { v 1, …, vm } in a vector space V is said to be linearly dependent (線性相依) if there exist scalars c 1, …, cm, not all zero, such that c 1 v 1 + … + cmvm = 0 (b) The set of vectors { v 1, …, vm } is linearly independent (線性 獨立) if c 1 v 1 + … + cmvm = 0 can only be satisfied when c 1 = 0, …, cm = 0. Ch 04_39
Example 1 Determine whether the set{(1, 2, 0), (0, 1, -1), (1, 1, 2)} is linearly dependent in R 3. Solution Suppose c 1 = 0 c 2 = 0 is the unique solution. c 3 = 0 Thus the set of vectors is linearly independent. Note. 不需真的求解,只需判斷是唯一解或無限多解,故當係數矩陣是方陣時, 求算係數矩陣的行列式即可。 此題行列式 0 唯一解 線性獨立 若行列式=0 無限多解 線性相依 隨堂作業: 1(c, e) Ch 04_40
Example 2 (跳過) (a) Show that the set {x 2+1, 3 x– 1, – 4 x+1} is linearly independent in P 2. (b) Show that the set {x+1, x– 1, –x+5} is linearly dependent in P 1. Solution (a) Suppose c 1(x 2 + 1) + c 2(3 x – 1) + c 3(– 4 x + 1) = 0 c 1 x 2 +(3 c 2 – 4 c 3)x + c 1 – c 2 + c 3 = 0 c 1 = 0, c 2 = 0, c 3 = 0 is the unique solution linearly independent (b) Suppose c 1(x+1) + c 2(x – 1) + c 3(–x+5) = 0 (c 1+ c 2 – c 3)x + c 1 – c 2 +5 c 3 = 0 many solutions linearly dependent Ch 04_41
Theorem 4. 4 A set consisting of two or more vectors in a vector space is linearly dependent if and only if it is possible to express one of the vectors as a linearly combination of the other vectors. Proof ( ) Let the set { v 1, v 2, …, vm } be linearly dependent. Therefore, there exist scalars c 1, c 2, …, cm, not all zero, such that c 1 v 1 + c 2 v 2 + … + cmvm = 0 Assume that c 1 0. The above identity can be rewritten Thus, v 1 is a linear combination of v 2, …, vm. Ch 04_42
( ) Conversely, assume that v 1 is a linear combination of v 2, …, vm. Therefore, there exist scalars d 2, …, dm, such that v 1 = d 2 v 2 + … + dmvm Rewrite this equation as 1 v 1 + (- d 2)v 2 + … + (-dm)vm = 0 Thus the set {v 1, v 2, …, vm} is linearly dependent, completing the proof. Ch 04_43
Linear Dependence of {v 1, v 2} linearly dependent; vectors lie on a line {v 1, v 2} linearly independent; vectors do not lie on a line Figure 4. 3 Linear dependence and independence of {v 1, v 2} in R 3. Ch 04_44
Linear Dependence of {v 1, v 2, v 3} linearly dependent; vectors lie in a plane {v 1, v 2, v 3} linearly independent; vectors do not lie in a plane Figure 4. 4 Linear dependence and independence of {v 1, v 2, v 3} in R 3. Ch 04_45
Theorem 4. 5 Let V be a vector space. Any set of vectors in V that contains the zero is linearly dependent. Proof Consider the set {0, v 2, …, vm}, which contains the zero vectors. Let us examine the identity We see that the identity is true for c 1 = 1, c 2 = 0, …, cm = 0 (not all zero). Thus the set of vectors is linearly dependent, proving theorem. Ch 04_46
Theorem 4. 6 Let the set {v 1, …, vm} be linearly dependent in a vector space V. Any set of vectors in V that contains these vectors will also be linearly dependent. Proof Since the set {v 1, …, vm} is linearly dependent, there exist scalars c 1, …, cm, not all zero, such that Consider the set of vectors {v 1, …, vm+1, …, vn}, which contains the given vectors. There are scalars, not all zero, namely c 1, …, cm, 0, …, 0 such that Thus the set {v 1, …, vm+1, …, vn} is linearly dependent. Ch 04_47
Example 3 Let the set {v 1, v 2} be linearly independent. Prove that {v 1 + v 2, v 1 – v 2} is also linearly independent. Solution Suppose (1) We get Since {v 1, v 2} is linearly independent 隨堂作業: 12 Thus system has the unique solution a = 0, b = 0. Returning to identity (1) we get that {v 1 + v 2, v 1 – v 2} is linearly independent. Ch 04_48
Homework Exercise 4. 3: 1, 3, 8, 12 Ch 04_49
4. 4 Properties of Bases Theorem 4. 7 Let the vectors v 1, …, vn span a vector space V. Each vector in V can be expressed uniquely as a linear combination of these vectors if and only if the vectors are linearly independent. Proof (a) ( ) Assume that v 1, …, vn are linearly independent. Let v V. Since v 1, …, vn span V, we can express v as a linear combination of these vectors. Suppose we can write Since v 1, …, vn are linearly independent, a 1 – b 1 = 0, …, an – bn = 0, implying that a 1 = b 1, …, an = bn. unique 得證 Ch 04_50
(b) ( ) Let v V. Assume that v can be written in only one way as a linear combination of v 1, …, vn. Note that 0 v 1+ …+ 0 vn= 0. If c 1 v 1+ …+ cnvn= 0, it implies that c 1 = 0, c 2 = 0, …, cn = 0. v 1, …, vn are linearly independent. Definition A finite set of vectors {v 1, …, vm} is called a basis for a vector space V if the set spans V and is linearly independent. Ch 04_51
Theorem 4. 8 Let {v 1, …, vn } be a basis for a vector space V. If {w 1, …, wm} is a set of more than n vectors in V, then this set is linearly dependent. Proof Suppose (1) We will show that values of c 1, …, cm are not all zero. The set {v 1, …, vn} is a basis for V. Thus each of the vectors w 1, …, wm can be expressed as a linear combination of v 1, …, vn. Let Ch 04_52
Substituting for w 1, …, wm into Equation (1) we get Rearranging, we get Since v 1, …, vn are linear independent, Since m > n, there are many solutions in this system. Thus the set {w 1, …, wm} is linearly dependent. 隨堂作業: 6(b) Ch 04_53
Theorem 4. 9 Any two bases for a vector space V consist of the same number of vectors. Proof Let {v 1, …, vn} and {w 1, …, wm} be two bases for V. By Theorem 4. 8, m n and n m Thus n = m. Definition If a vector space V has a basis consisting of n vectors, then the dimension of V is said to be n. We write dim(V) for the dimension of V. • V is finite dimensional if such a finite basis exists. • V is infinite dimensional otherwise. Ch 04_54
Example 1 Consider the set {{1, 2, 3), (-2, 4, 1)} of vectors in R 3. These vectors generate a subspace V of R 3 consisting of all vectors of the form The vectors (1, 2, 3) and (-2, 4, 1) span this subspace. Furthermore, since the second vector is not a scalar multiple of the first vector, the vectors are linearly independent. Therefore {{1, 2, 3), (-2, 4, 1)} is a basis for V. Thus dim(V) = 2. We know that V is, in fact, a plane through the origin. Ch 04_55
Theorem 4. 10 (a) The origin is a subspace of R 3. The dimension of this subspace is defined to be zero. (b) The one-dimensional subspaces of R 3 are lines through the origin. (c) The two-dimensional subspaces of R 3 are planes through the origin. Figure 4. 5 One and two-dimensional subspaces of R 3 Ch 04_56
Proof (a) Let V be the set {(0, 0, 0)}, consisting of a single elements, the zero vector of R 3. Let c be the arbitrary scalar. Since (0, 0, 0) + (0, 0, 0) = (0, 0, 0) and c(0, 0, 0) = (0, 0, 0) V is closed under addition and scalar multiplication. It is thus a subspace of R 3. The dimension of this subspaces is defined to be zero. (b) Let v be a basis for a one-dimensional subspace V of R 3. Every vector in V is thus of the form cv, for some scalar c. We know that these vectors form a line through the origin. (c) Let {v 1, v 2}be a basis for a two-dimensional subspace V of R 3. Every vector in V is of the form c 1 v 1 + c 2 v 2. V is thus a plane through the origin. 隨堂作業: 16(a) Ch 04_57
Theorem 4. 11 Let V be a vector space of dimension n. (a) If S = {v 1, …, vn} is a set of n linearly independent vectors in V, then S is a basis for V. (b) If S = {v 1, …, vn} is a set of n vectors V that spans V, then S is a basis for V. 整理: Let V be a vector space, S = {v 1, …, vn} is a set of vectors in V. 若以下三點有兩點成立,則另一點也成立。 (a) dim(V) = |S|. (b) S is a linearly independent set. S is a basis of V. (c) S spans V. Ch 04_58
Example 2 Prove that the set B={(1, 3, -1), (2, 1, 0), (4, 2, 1)} is a basis for R 3. Solution Since dim(R 3)=|B|=3. It suffices to show that this set is linearly independent or it spans R 3. Let us check for linear independence. Suppose This identity leads to the system of equations This system has the unique solution c 1 = 0, c 2 = 0, c 3 = 0. Thus the vectors are linearly independent. The set {(1, 3, -1), (2, 1, 0), (4, 2, 1)} is therefore a basis for R 3. 隨堂作業: 5(a), 20(c), 21 Ch 04_59
Theorem 4. 12 Let V be a vector space of dimension n. Let {v 1, …, vm} be a set of m linearly independent vectors in V, where m < n. Then there exist vectors vm+1, …, vn such that {v 1, …, vm+1, …, vn } is a basis of V. Ch 04_60
Example 3 State (with a brief explanation) whether the following statements are true or false. (a) The vectors (1, 2), (-1, 3), (5, 2) are linearly dependent in R 2. (b) The vectors (1, 0, 0), (0, 2, 0), (1, 2, 0) span R 3. (c) {(1, 0, 2), (0, 1, -3)} is a basis for the subspace of R 3 consisting of vectors of the form (a, b, 2 a -3 b). (d) Any set of two vectors can be used to generate a twodimensional subspace of R 3. Solution (a) True: The dimension of R 2 is two. Thus any three vectors are linearly dependent. (b) False: The three vectors are linearly dependent. Thus they cannot span a three-dimensional space. Ch 04_61
(c) True: The vectors span the subspace since (a, b, 2 a, -3 b) = a(1, 0, 2) + b(0, 1, -3) The vectors are also linearly independent since they are not colinear. (d) False: The two vectors must be linearly independent. Ch 04_62
Homework Exercise 4. 4: 5, 6, 7, 16, 20, 21, 23, 25 Ch 04_63
4. 5 Rank enables one to relate matrices to vectors, and vice versa. Definition Let A be an m n matrix. The rows of A may be viewed as row vectors r 1, …, rm, and the columns as column vectors c 1, …, cn. Each row vector will have n components, and each column vector will have m components, The row vectors will span a subspace of Rn called the row space of A, and the column vectors will span a subspace of Rm called the column space of A. Ch 04_64
Example 1 Consider the matrix (1) The row vectors of A are These vectors span a subspace of R 4 called the row space of A. (2) The column vectors of A are These vectors span a subspace of R 3 called the column space of A. Ch 04_65
Theorem 4. 13 The row space and the column space of a matrix A have the same dimension. Proof Let u 1, …, um be the row vectors of A. The ith vector is Let the dimension of the row space be s. Let the vectors v 1, …, vs form a basis for the row space. Let the jth vector of this set be Each of the row vectors of A is a linear combination of v 1, …, vs. Let Ch 04_66
Equating the ith components of the vectors on the left and right, we get This may be written This implies that each column vector of A lies in a space spanned by a single set of s vectors. Since s is the dimension of the row space of A, we get dim(column space of A) dim(row space of A) Ch 04_67
By similar reasoning, we can show that dim(row space of A) dim(column space of A) Combining these two results we see that dim(row space of A) = dim(column space of A), proving theorem. Definition The dimension of the row space and the column space of a matrix A is called the rank (秩) of A. The rank of A is denoted rank(A). Ch 04_68
Example 2 Determine the rank of the matrix Solution The third row of A is a linear combination of the first two rows: (2, 5, 8) = 2(1, 2, 3) + (0, 1, 2) Hence three rows of A are linearly dependent. The rank of A must be less than 3. Since (1, 2, 3) is not a scalar multiple of (0, 1, 2), these two vectors are linearly independent. These vectors form a basis for the row space of A. Thus rank(A) = 2. Ch 04_69
Theorem 4. 14 The nonzero row vectors of a matrix A that is in reduced echelon form are a basis for the row space of A. The rank of A is the number of nonzero row vectors. Proof Let A be an m n matrix with nonzero row vectors of r 1, …, rt. Consider the identity Where k 1, …, kt are scalars. The first nonzero element of r 1 is 1. r 1 is the only one of the row to have a nonzero number in this component. Thus, on adding the vectors we get a vector whose first component is k 1. On equating this vector to zero, we get k 1 = 0. The identity then reduced to Ch 04_70
The first nonzero element of r 2 is 1, and it is the only of these remaining row vectors with a nonzero number in this component. Thus k 2 = 0. Similarly, k 3, …, kt are all zero. The vector r 1, …, rt are therefore linearly independent. These vectors span the row space of A. They thus form a basis for the row space of A. The dimension of the row space is t. The rank of A is t, the number of nonzero row vectors in A. Ch 04_71
Example 3 Find the rank of the matrix This matrix is in reduced echelon form. There are three nonzero row vectors, namely (1, 2, 0, 0), (0, 0, 1, 0), and (0, 0, 0, 1). According to the previous theorem, these three vectors form a basis for the row space of A. Rank(A) = 3. Ch 04_72
Theorem 4. 15 Let A and B be row equivalent matrices. Then A and B have the same the row space. rank(A) = rank(B). Theorem 4. 16 Let E be a reduced echelon form of a matrix A. The nonzero row vectors of E form a basis for the row space of A. The rank of A is the number of nonzero row vectors in E. Note: If A … E, 且E是reduced echelon form, then (a) 將E的每一非零列視為向量, 這些列形成一個A的列空間的basis。 (b) rank(A) = E的非零列個數 Ch 04_73
Example 4 Find a basis for the row space of the following matrix A, and determine its rank. Solution Use elementary row operations to find a reduced echelon form of the matrix A. We get The two vectors (1, 0, 7), (0, 1, -2) form a basis for the row space of A. Rank(A) = 2. 隨堂作業: 5(b), 12 Ch 04_74
Example 5 Find a basis for the column space of the following matrix A. Solution The column space of A becomes the row space of At. Let us find a basis for the row space of At. form a basis for the column space of A. Ch 04_75
Example 6 Find a basis for the subspace V of R 4 spanned by the vectors (1, 2, 3, 4), (-1, -4, -2), (3, 4, 11, 8) Solution Let . (1, 0, 5, 0) and (0, 1, -1, 2) form a basis for the subspace V. dim(V) = 2. 隨堂作業: 7(b) Ch 04_76
Theorem 4. 17 Consider a system AX=B of m equations in n variables (a) If the augmented matrix and the matrix of coefficients have the same rank r and r = n, the solution is unique. (b) If the augmented matrix and the matrix of coefficients have the same rank r and r < n, there are many solutions. (c) If the augmented matrix and the matrix of coefficients do not have the same rank, a solution does not exist. 隨堂作業: 10(a, b, c) 僅做(i)(ii) Ch 04_77
Theorem 4. 18 Let A be an n n matrix. The following statements are equivalent. (a) |A| 0 (A is nonsingular). (b) A is invertible. (c) A is row equivalent to In. (d) The system of equations AX = B has a unique solution. (e) rank(A) = n. (f) The column vectors of A form a basis for Rn. Ch 04_78
Homework Exercise 4. 5: 5, 7, 10, 12 Ch 04_79
4. 6 Orthonormal Vectors and Projections Definition A set of vectors in a vector space V is said to be an orthogonal ( 正交) set if every pair of vectors in the set is orthogonal. The set is said to be an orthonormal set if it is orthogonal and each vector is a unit vector. Ch 04_80
Example 1 Show that the set is an orthonormal set. Solution (1) orthogonal: (2) unit vector: Thus the set is thus an orthonormal set. 隨堂作業: 1, 3(a) Ch 04_81
Theorem 4. 19 An orthogonal set of nonzero vectors in a vector space is linearly independent. Proof Let {v 1, …, vm} be an orthogonal set of nonzero vectors in a vector space V. Let us examine the identity c 1 v 1 + c 2 v 2 + … + cmvm = 0 Let vi be the ith vector of the orthogonal set. Take the dot product of each side of the equation with vi and use the properties of the dot product. We get Since the vectors v 1, …, v 2 are mutually orthogonal, vj‧vi = 0 unless j = i. Thus Since vi is a nonzero, then vi‧vi 0. Thus ci = 0. Letting i = 1, …, m, we get c 1 = 0, cm = 0, proving that the vectors are linearly independent. Ch 04_82
Definition A basis is an orthogonal set is said to be an orthogonal basis. A basis that is an orthonormal set is said to be an orthonormal basis. Standard Bases • R 2: {(1, 0), (0, 1)} • R 3: {(1, 0, 0), (0, 1, 0), (0, 0, 1)} orthonormal bases • Rn: {(1, …, 0), …, (0, …, 1)} Theorem 4. 20 Let {u 1, …, un} be an orthonormal basis for a vector space V. Let v be a vector in V. v can be written as a linearly combination of these basis vectors as follows: Ch 04_83
Example 2 The following vectors u 1, u 2, and u 3 form an orthonormal basis for R 3. Express the vector v = (7, -5, 10) as a linear combination of these vectors. Solution Thus 隨堂作業: 4 Ch 04_84
Orthogonal Matrices An orthogonal matrix is an invertible matrix that has the property A-1 = At Theorem 4. 21 (Orthogonal Matrix Theorem) The following statements are equivalent. (a) A is orthogonal. (b) The column vectors of A form an orthonormal set. (c) The row vectors of A form an orthonormal set. Proof (a bc) A is orthogonal A-1 = At At. A= I and AAt= I The column vectors of A form an orthonormal set, and the row vectors of A form an orthonormal set. 反之亦然 Ch 04_85
Theorem 4. 22 If A is an orthogonal matrix, then (a) |A| = 1. (b) A-1 is an orthogonal matrix. Proof (a) AAt= I |AAt| = |A||A-1| = 1 |A| = 1 (b) (A-1)t (A-1)= AAt= I A-1 is an orthogonal matrix 隨堂作業: 9 Ch 04_86
Projection of One vector onto Another Vector Let v and u be vectors in Rn with angel a (0 a p) between them. Figure 4. 7 OA : the projection of v onto u So we define Ch 04_87
Definition The projection (投影) of a vector v onto a nonzero vector u in Rn is denoted projuv and is defined by O Figure 4. 8 Ch 04_88
Example 3 Determine the projection of the vector v = (6, 7) onto the vector u = (1, 4). Solution Thus The projection of v onto u is (2, 8). 隨堂作業: 14(b) Ch 04_89
Theorem 4. 23 The Gram-Schmidt Orthogonalization Process Let {v 1, …, vn} be a basis for a vector space V. The set of vectors {u 1, …, un} defined as follows is orthogonal. To obtain an orthonormal basis for V, normalize each of the vectors u 1, …, un. Figure 4. 9 Ch 04_90
Example 4 The set {(1, 2, 0, 3), (4, 0, 5, 8), (8, 1, 5, 6)} is linearly independent in R 4. The vectors form a basis for a three-dimensional subspace V of R 4. Construct an orthonormal basis for V. Solution Let v 1 = (1, 2, 0, 3), v 2 = (4, 0, 5, 8), v 3 = (8, 1, 5, 6)}. Use the Gram-Schmidt process to construct an orthogonal set {u 1, u 2, u 3} from these vectors. Ch 04_91
The set {(1, 2, 0, 3), (2, -4, 5, 2), (4, 1, 0, -2)} is an orthogonal basis for V. Normalize them to get an orthonormal basis: orthonormal basis for V: 隨堂作業: 16(a) Ch 04_92
Projection of a Vector onto a Subspace Definition Let W be a subspace of Rn, Let {u 1, …, um} be an orthonormal basis for W. If v is a vector in Rn, the projection of v onto W is denoted proj. Wv and is defined by Figure 4. 11 Ch 04_93
Theorem 4. 24 Let W be a subspace of Rn. Every vector v in Rn can be written uniquely in the form v = w + w where w is in W and w is orthogonal to W. The vectors w and w are w = proj. Wv and w = v – proj. Wv Figure 4. 12 Ch 04_94
Example 5 Consider the vector v = (3, 2, 6) in R 3. Let W be the subspace of R 3 consisting of all vectors of the form (a, b, b). Decompose v into the sum of a vector that lies in W and a vector orthogonal to W. Solution We need an orthonormal basis for W. We can write an arbitrary vector of W as follows (a, b, b) = a(1, 0, 0) + b( 0, 1, 1) The set {(1, 0, 0), (0, 1, 1)} spans W and is linearly independent. It forms a basis for W. The vectors are orthogonal. Normalize each vector to get an orthonormal basis {u 1, u 2} for W, where Ch 04_95
We get and Thus the desired decomposition of v is (3, 2, 6) = (3, 4, 4) + (0, -2, 2) In this decomposition the vector (3, 4, 4) lies in W and the vector (0, -2, 2) is orthogonal to W. 隨堂作業: 21(a) Ch 04_96
Distance of a Point from a Subspace The distance of a point from a subspace is the distance of the point from its projection in the subspace. Figure 4. 13 Ch 04_97
Example 6 Find the distance of the point x = (4, 1, -7) of R 3 from the subspace W consisting of all vectors of the form (a, b, b). Solution The previous example tells us that the set {u 1, u 2} where is an orthonormal basis for W. We compute proj. Wx Thus, the distance from x to W is 隨堂作業: 26 Ch 04_98
Homework Exercise 4. 9: 1, 3, 4, 6, 9, 14, 16, 21, 26 Ch 04_99
- Slides: 99