Vector Spaces
CS 130: Mathematical Methods in Computer Science Vector Spaces and Linear Systems Nestine Hope S. Hernandez Algorithms and Complexity Laboratory Department of Computer Science University of the Philippines, Diliman nshernandez@dcs.upd.edu.ph Day 4
Vector Spaces
Vector Spaces and Linear Systems
Vector Spaces A Real Vector Space Subspaces Linear Independence
Vector Spaces
Vector Spaces and Linear Systems
Vector Spaces A Real Vector Space Subspaces Linear Independence
Vector Spaces
Definition
A real vector space is a set of elements V together with two operations ⊕ and satisfying the following properties:
Vector Spaces
Definition
A real vector space is a set of elements V together with two operations ⊕ and satisfying the following properties: • If ~ u and ~v are any elements of V , then ~u ⊕ ~v is in V .
(a) ~u ⊕ ~v = ~v ⊕ ~u, for ~u and ~v in V . (b) ~u ⊕ (~v ⊕ w) ~ = (~u ⊕ ~v ) ⊕ w, ~ for ~u, ~v and w ~ in V . (c) There is an element ~0 in V such that ~u ⊕ ~0 = ~0 ⊕ ~u = ~u for all ~u in V . (d) For each ~u in V , there is an element −~u in V such that ~u ⊕ −~u = ~0.
Vector Spaces
Definition A real vector space is a set of elements V together with two operations ⊕ and satisfying the following properties: • If ~ u is any element of V and c is any real number, then c ~u is in
V. (e) c (~u ⊕ ~v ) = (c ~u) ⊕ (c ~v ), for all real numbers c and all ~u and ~v in V . (f) (c + d) ~u = (c ~u) ⊕ (d ~u), for all real numbers c and d, and all ~u in V . (g) c (d ~u) = (cd ~u), for all real numbers c and d, and all ~u in V . (h) 1 ~u = ~u, for all ~u in V .
Vector Spaces
Definition A real vector space is a set of elements V together with two operations ⊕ and satisfying the following properties: • If ~ u is any element of V and c is any real number, then c ~u is in
V. (e) c (~u ⊕ ~v ) = (c ~u) ⊕ (c ~v ), for all real numbers c and all ~u and ~v in V . (f) (c + d) ~u = (c ~u) ⊕ (d ~u), for all real numbers c and d, and all ~u in V . (g) c (d ~u) = (cd ~u), for all real numbers c and d, and all ~u in V . (h) 1 ~u = ~u, for all ~u in V . The elements of V are called vectors; the real numbers are called scalars.
Vector Spaces
Definition A real vector space is a set of elements V together with two operations ⊕ and satisfying the following properties: • If ~ u is any element of V and c is any real number, then c ~u is in
V. (e) c (~u ⊕ ~v ) = (c ~u) ⊕ (c ~v ), for all real numbers c and all ~u and ~v in V . (f) (c + d) ~u = (c ~u) ⊕ (d ~u), for all real numbers c and d, and all ~u in V . (g) c (d ~u) = (cd ~u), for all real numbers c and d, and all ~u in V . (h) 1 ~u = ~u, for all ~u in V . The elements of V are called vectors; the real numbers are called scalars. The operation ⊕ is called vector addition; the operation is called scalar multiplication.
Vector Spaces
Definition A real vector space is a set of elements V together with two operations ⊕ and satisfying the following properties: • If ~ u is any element of V and c is any real number, then c ~u is in
V. (e) c (~u ⊕ ~v ) = (c ~u) ⊕ (c ~v ), for all real numbers c and all ~u and ~v in V . (f) (c + d) ~u = (c ~u) ⊕ (d ~u), for all real numbers c and d, and all ~u in V . (g) c (d ~u) = (cd ~u), for all real numbers c and d, and all ~u in V . (h) 1 ~u = ~u, for all ~u in V . The elements of V are called vectors; the real numbers are called scalars. The operation ⊕ is called vector addition; the operation is called scalar multiplication. The vector ~0 in property (c) is called a zero vector.
Vector Spaces
Definition A real vector space is a set of elements V together with two operations ⊕ and satisfying the following properties: • If ~ u is any element of V and c is any real number, then c ~u is in
V. (e) c (~u ⊕ ~v ) = (c ~u) ⊕ (c ~v ), for all real numbers c and all ~u and ~v in V . (f) (c + d) ~u = (c ~u) ⊕ (d ~u), for all real numbers c and d, and all ~u in V . (g) c (d ~u) = (cd ~u), for all real numbers c and d, and all ~u in V . (h) 1 ~u = ~u, for all ~u in V . The elements of V are called vectors; the real numbers are called scalars. The operation ⊕ is called vector addition; the operation is called scalar multiplication. The vector ~0 in property (c) is called a zero vector. ~ in property (d) is called a negative of ~u. The vector −u
Vector Spaces
Note: If V is a vector space, then • 0 ~ u = ~0, for every ~u in V . ~ • c 0 = ~0, for every scalar c. • If c ~ u = ~0, then c = 0 or ~u = ~0.
~ for every ~u in V . • (−1) ~ u = −u,
Vector Spaces
Note: If V is a vector space, then • 0 ~ u = ~0, for every ~u in V . ~ • c 0 = ~0, for every scalar c. • If c ~ u = ~0, then c = 0 or ~u = ~0.
~ for every ~u in V . • (−1) ~ u = −u, A real vector space is a set of “vectors” together with rules for vector addition and scalar multiplication. The addition and multiplication must produce vectors that are within the space, and they must satisfy the eight conditions.
Vector Spaces
Examples n
1. lR where n ∈ Z+ .
Vector Spaces
Examples n
1. lR where n ∈ Z+ . Its vectors are column(row) vectors.
Vector Spaces
Examples n
1. lR where n ∈ Z+ . Its vectors are column(row) vectors. 2. The space of 3 by 2 matrices, M32 .
Vector Spaces
Examples n
1. lR where n ∈ Z+ . Its vectors are column(row) vectors. 2. The space of 3 by 2 matrices, M32 . In this case, the “vectors” are 3 × 2 matrices!
Vector Spaces
Examples n
1. lR where n ∈ Z+ . Its vectors are column(row) vectors. 2. The space of 3 by 2 matrices, M32 . In this case, the “vectors” are 3 × 2 matrices! (Note: Any choice of m and n would give, as a similar example, the vector space of all m × n matrices, Mmn .)
Vector Spaces
Examples n
1. lR where n ∈ Z+ . Its vectors are column(row) vectors. 2. The space of 3 by 2 matrices, M32 . In this case, the “vectors” are 3 × 2 matrices! (Note: Any choice of m and n would give, as a similar example, the vector space of all m × n matrices, Mmn .) 3. The space of functions f (x) defined on a fixed interval, say 0 ≤ x ≤ 1.
Vector Spaces
Examples n
1. lR where n ∈ Z+ . Its vectors are column(row) vectors. 2. The space of 3 by 2 matrices, M32 . In this case, the “vectors” are 3 × 2 matrices! (Note: Any choice of m and n would give, as a similar example, the vector space of all m × n matrices, Mmn .) 3. The space of functions f (x) defined on a fixed interval, say 0 ≤ x ≤ 1. 4. The vector space consisting of all polynomials of degree ≤ n and the zero polynomial, Pn .
Vector Spaces
Examples n
1. lR where n ∈ Z+ . Its vectors are column(row) vectors. 2. The space of 3 by 2 matrices, M32 . In this case, the “vectors” are 3 × 2 matrices! (Note: Any choice of m and n would give, as a similar example, the vector space of all m × n matrices, Mmn .) 3. The space of functions f (x) defined on a fixed interval, say 0 ≤ x ≤ 1. 4. The vector space consisting of all polynomials of degree ≤ n and the zero polynomial, Pn . t 5. The set of 2 × 1 matrices of the form for all t ∈ lR. t
Vector Spaces
Definition Let V be a vector space and W a nonempty subset of V . If W is a vector space with respect to the operations in V , then W is called a subspace of V .
Vector Spaces
Definition Let V be a vector space and W a nonempty subset of V . If W is a vector space with respect to the operations in V , then W is called a subspace of V . Note: Every vector space has at least two subspaces, itself and the subspace {~0} consisting only of the zero vector.
Vector Spaces
Definition Let V be a vector space and W a nonempty subset of V . If W is a vector space with respect to the operations in V , then W is called a subspace of V . Note: Every vector space has at least two subspaces, itself and the subspace {~0} consisting only of the zero vector. The subspace {~0} is called the zero subspace.
Vector Spaces
W is a subspace of V Let V be a vector space with operations ⊕ and and let W be a nonempty subset of V . Then W is a subspace of V if and only if the following conditions hold: • If ~ u and ~v are any vectors in W , then ~u ⊕ ~v is in W . • If c is any real number and ~ u is any vector in W , then c ~u is in W.
Vector Spaces
W is a subspace of V Let V be a vector space with operations ⊕ and and let W be a nonempty subset of V . Then W is a subspace of V if and only if the following conditions hold: • If ~ u and ~v are any vectors in W , then ~u ⊕ ~v is in W . • If c is any real number and ~ u is any vector in W , then c ~u is in W.
Example 1.
t t
: ∀t ∈ lR
is a subspace of lR2
Vector Spaces
W is a subspace of V Let V be a vector space with operations ⊕ and and let W be a nonempty subset of V . Then W is a subspace of V if and only if the following conditions hold: • If ~ u and ~v are any vectors in W , then ~u ⊕ ~v is in W . • If c is any real number and ~ u is any vector in W , then c ~u is in W.
Example
t 1. : ∀t ∈ lR is a subspace of lR2 t 2. The set of lower triangular 3 Ă— 3 matrices is a subspace of M33 .
Vector Spaces
W is a subspace of V Let V be a vector space with operations ⊕ and and let W be a nonempty subset of V . Then W is a subspace of V if and only if the following conditions hold: • If ~ u and ~v are any vectors in W , then ~u ⊕ ~v is in W . • If c is any real number and ~ u is any vector in W , then c ~u is in W.
Example
t 1. : ∀t ∈ lR is a subspace of lR2 t 2. The set of lower triangular 3 Ă— 3 matrices is a subspace of M33 . 3. The set of symmetric n Ă— n matrices is a subspace of Mnn .
Vector Spaces
W is a subspace of V Let V be a vector space with operations ⊕ and and let W be a nonempty subset of V . Then W is a subspace of V if and only if the following conditions hold: • If ~ u and ~v are any vectors in W , then ~u ⊕ ~v is in W . • If c is any real number and ~ u is any vector in W , then c ~u is in W.
Example
t 1. : ∀t ∈ lR is a subspace of lR2 t 2. The set of lower triangular 3 Ă— 3 matrices is a subspace of M33 . 3. The set of symmetric n Ă— n matrices is a subspace of Mnn . 4. P2 is a subspace of P3 . In general, Pn is a subspace of Pn+1 .
Vector Spaces
W is a subspace of V Let V be a vector space with operations ⊕ and and let W be a nonempty subset of V . Then W is a subspace of V if and only if the following conditions hold: • If ~ u and ~v are any vectors in W , then ~u ⊕ ~v is in W . • If c is any real number and ~ u is any vector in W , then c ~u is in W.
Example
t 1. : ∀t ∈ lR is a subspace of lR2 t 2. The set of lower triangular 3 Ă— 3 matrices is a subspace of M33 . 3. The set of symmetric n Ă— n matrices is a subspace of Mnn . 4. P2 is a subspace of P3 . In general, Pn is a subspace of Pn+1 . 5. Let V be the set of polynomials of degree exactly = 2.
Vector Spaces
W is a subspace of V Let V be a vector space with operations ⊕ and and let W be a nonempty subset of V . Then W is a subspace of V if and only if the following conditions hold: • If ~ u and ~v are any vectors in W , then ~u ⊕ ~v is in W . • If c is any real number and ~ u is any vector in W , then c ~u is in W.
Example
t 1. : ∀t ∈ lR is a subspace of lR2 t 2. The set of lower triangular 3 Ă— 3 matrices is a subspace of M33 . 3. The set of symmetric n Ă— n matrices is a subspace of Mnn . 4. P2 is a subspace of P3 . In general, Pn is a subspace of Pn+1 . 5. Let V be the set of polynomials of degree exactly = 2. V is a subset of P2 but it is not a subspace of P2 .
Vector Spaces
W is a subspace of V Let V be a vector space with operations ⊕ and and let W be a nonempty subset of V . Then W is a subspace of V if and only if the following conditions hold: • If ~ u and ~v are any vectors in W , then ~u ⊕ ~v is in W . • If c is any real number and ~ u is any vector in W , then c ~u is in W.
Example
t 1. : ∀t ∈ lR is a subspace of lR2 t 2. The set of lower triangular 3 Ă— 3 matrices is a subspace of M33 . 3. The set of symmetric n Ă— n matrices is a subspace of Mnn . 4. P2 is a subspace of P3 . In general, Pn is a subspace of Pn+1 . 5. Let V be the set of polynomials of degree exactly = 2. V is a subset of P2 but it is not a subspace of P2 . 6. Is W = {(a, b, 1) : a, b ∈ lR} a subspace of lR3 ?
Vector Spaces
An important example of a subspace Consider the homogeneous system A~x = ~0, where A is an m Ă— n matrix.
Vector Spaces
An important example of a subspace Consider the homogeneous system A~x = ~0, where A is an m Ă— n matrix. Let W be the subset of lRn consisting of all solutions to the homogeneous system.
Vector Spaces
An important example of a subspace Consider the homogeneous system A~x = ~0, where A is an m Ă— n matrix. Let W be the subset of lRn consisting of all solutions to the homogeneous system. Note that W is not empty since A~0 = ~0.
Vector Spaces
An important example of a subspace Consider the homogeneous system A~x = ~0, where A is an m Ă— n matrix. Let W be the subset of lRn consisting of all solutions to the homogeneous system. Note that W is not empty since A~0 = ~0. Verify that W is a subspace of lRn .
Vector Spaces
An important example of a subspace Consider the homogeneous system A~x = ~0, where A is an m Ă— n matrix. Let W be the subset of lRn consisting of all solutions to the homogeneous system. Note that W is not empty since A~0 = ~0. Verify that W is a subspace of lRn . W is called the solution space of the homogeneous system, or the null space of A.
Vector Spaces
An important example of a subspace Consider the homogeneous system A~x = ~0, where A is an m Ă— n matrix. Let W be the subset of lRn consisting of all solutions to the homogeneous system. Note that W is not empty since A~0 = ~0. Verify that W is a subspace of lRn . W is called the solution space of the homogeneous system, or the null space of A. Remark: The set of all solutions to the linear system A~x = ~b, where A is m Ă— n, is not a subspace of lRn if ~b 6= ~0.
Vector Spaces
Linear Combination and Span Let v~1 , v~2 , · · · , v~k be vectors in a vector space V . A vector ~v in V is called a linear combination of v~1 , v~2 , · · · , v~k if ~v = c1 v~1 + c2 v~2 + · · · + ck v~k for some real numbers c1 , c2 , · · · , ck .
Vector Spaces
Linear Combination and Span Let v~1 , v~2 , · · · , v~k be vectors in a vector space V . A vector ~v in V is called a linear combination of v~1 , v~2 , · · · , v~k if ~v = c1 v~1 + c2 v~2 + · · · + ck v~k for some real numbers c1 , c2 , · · · , ck . If S = {v~1 , v~2 , · · · , v~k } is a set of vectors in a vector space V , then the set of all vectors in V that are linear combinations of vectors in S is denoted by span S or span {v~1 , v~2 , · · · , v~k }.
Vector Spaces
Linear Combination and Span Let v~1 , v~2 , · · · , v~k be vectors in a vector space V . A vector ~v in V is called a linear combination of v~1 , v~2 , · · · , v~k if ~v = c1 v~1 + c2 v~2 + · · · + ck v~k for some real numbers c1 , c2 , · · · , ck . If S = {v~1 , v~2 , · · · , v~k } is a set of vectors in a vector space V , then the set of all vectors in V that are linear combinations of vectors in S is denoted by span S or span {v~1 , v~2 , · · · , v~k }. Let S = {v~1 , v~2 , · · · , v~k } be a set of vectors in a vector space V . Then span S is a subspace of V .
Vector Spaces
Examples 3
1. In lR , let v1 = (1, 2, 1), v2 = (1, 0, 2), v3 = (1, 1, 0). Determine whether the vector v = (2, 1, 5) belongs to the span{v1 , v2 , v3 }.
Vector Spaces
Examples 3
1. In lR , let v1 = (1, 2, 1), v2 = (1, 0, 2), v3 = (1, 1, 0). Determine whether the vector v = (2, 1, 5) belongs to the span{v1 , v2 , v3 }. 2. In P2 , let v1 = 2t2 + t + 2, v2 = t2 − 2t, v3 = 5t2 − 5t + 2, v4 = −t2 − 3t − 2. Determine whether the vector u = t2 + t + 2 belongs to the span{v1 , v2 , v3 , v4 }.
Vector Spaces
Examples 3
1. In lR , let v1 = (1, 2, 1), v2 = (1, 0, 2), v3 = (1, 1, 0). Determine whether the vector v = (2, 1, 5) belongs to the span{v1 , v2 , v3 }. 2. In P2 , let v1 = 2t2 + t + 2, v2 = t2 − 2t, v3 = 5t2 − 5t + 2, v4 = −t2 − 3t − 2. Determine whether the vector u = t2 + t + 2 belongs to the span{v1 , v2 , v3 , v4 }. In general, to determine if a specific vector v belongs to spanS, we investigate the consistency of an appropriate linear system.
Vector Spaces
Linear Independence
The vectors v~1 , v~2 , · · · , v~k in a vector space V are said to be linearly dependent if there exist constant c1 , c2 , · · · , ck , not all zero, such that c1 v~1 + c2 v~2 + · · · + ck v~k = 0. Otherwise, v~1 , v~2 , · · · , v~k are called linearly independent.
Vector Spaces
Linear Independence
The vectors v~1 , v~2 , · · · , v~k in a vector space V are said to be linearly dependent if there exist constant c1 , c2 , · · · , ck , not all zero, such that c1 v~1 + c2 v~2 + · · · + ck v~k = 0. Otherwise, v~1 , v~2 , · · · , v~k are called linearly independent. That is, S = v~1 , v~2 , · · · , v~k are linearly independent if whenever c1 v~1 + c2 v~2 + · · · + ck v~k = 0, we must have c1 = c2 = · · · = ck = 0.
Vector Spaces
Examples
1. Are the vectors v1 = (1, 0, 1, 2), v2 = (0, 1, 1, 2) and v3 = (1, 1, 1, 3) in lR4 linearly dependent or linearly independent? 2. Are the vectors v1 = (1, 2, −1), v2 = (1, −2, 1), v3 = (−3, 2, −1) and v4 = (2, 0, 0) in lR3 linearly dependent or linearly independent? 3. Consider the vectors p1 (t) = t2 + t + 2, p2 (t) = 2t2 + t, p3 (t) = 3t2 + 2t + 2 of P2 . Are they linearly dependent or linearly independent? How about S = {t2 + 1, t − 1, 2t + 2}?
Vector Spaces
Examples
1. Are the vectors v1 = (1, 0, 1, 2), v2 = (0, 1, 1, 2) and v3 = (1, 1, 1, 3) in lR4 linearly dependent or linearly independent? 2. Are the vectors v1 = (1, 2, −1), v2 = (1, −2, 1), v3 = (−3, 2, −1) and v4 = (2, 0, 0) in lR3 linearly dependent or linearly independent? 3. Consider the vectors p1 (t) = t2 + t + 2, p2 (t) = 2t2 + t, p3 (t) = 3t2 + 2t + 2 of P2 . Are they linearly dependent or linearly independent? How about S = {t2 + 1, t − 1, 2t + 2}? Note: Every set of vectors containing the zero vector is linearly dependent.
Vector Spaces
Questions? See you next meeting!