Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
1.2 Vector Operations Row and column vectors, matrices, functions and directed line segments are all regarded as vectors because they can be added, negated and multiplied by numbers. Subtraction of vectors is sometimes regarded as a secondary operation because it can be expressed in terms of addition and negation, i.e. (1) v - w = v + (- w) In this section we look at these operations for row and column vectors, matrices, functions and directed line segments. 1.2.1. Addition, negation and subtraction Row and column vectors and matrices. One adds and negates row and column vectors and matrices by adding and negating corresponding components. Subtraction is defined in terms of addition by (1). The result is that one subtracts row and column vectors and matrices also by subtracting corresponding components. In order to add or subtract vectors of these types they have to have the same size. This means the same number of components for row and column vectors and the same number of rows and columns for matrices. For example, for triples one has v1 v = v2 v3 and w1 w = w2 w3 v1 + w1 v + w = v2 + w2 v3 + w3 v 1 - v = - v2 - v3 v1 w1 v1 - w1 v - w = v + (- w) = v2 + - w2 = v2 + - w2 = v3 w3 v3 - w3 v1 - w1 v2 - w2 v3 - w3 2 1 Example 1. If v = -4 and w = 2 then 3 -3 2 + 1 3 v + w = -4 + 2 = -2 3 + (-3) 0 -2 - v = 4 -3 2 - 1 1 v - w = -4 - 2 = -6. 3 - (-3) 6 In general, for row and column vectors, the ith component of v + w is the sum of the ith component of v and the ith component of w, the ith component of - v is the negative of the 1.2 - 1 ith component of v and the ith component of v - w is the difference of the ith component of v and the ith component of w i.e. (v + w)i = vi + wi (-v)i = - (vi) (v - w)i = (v + (-w))i = vi + (- w)i = vi + (- (wi)) = = vi - wi for i = 1, …, n where n is the number of components in v and w. For 32 matrices addition, negation and subtraction look like the following. a11 a12 A = a21 a22 B a31 a32 a11+b11 a12+b12 A + B = a21+b21 a22+b22 a31+b31 a32+b32 a11 A - B = A + (- B) = a21 a31 a -b a -b 11 11 12 12 = a21-b21 a22-b22 a31-b31 a32-b32 b11 b12 = b21 b22 b31 b32 -a11 -a12 - A = -a21 -a22 -a31 -a32 a12 b11 b12 a11 a12 - b11 - b12 a22 + - b21 b22 = a21 a22 + - b21 - b22 a31 a32 - b31 - b32 a32 b31 b32 Example 2. 5 7 A = 2 3 2 -1 B = 4 -6 5+2 7+(-1) 7 6 A + B = 2+4 3+(-6) = 6 -3 -5 -7 - A = -2 -3 5-2 7-(-1) 3 8 A - B = 2-4 3-(-6) = -2 9 For general matrices (A + B)ij = Aij + Bij (-A)ij = - (Aij) (A - B)ij = (A + (-B))ij = Aij + (- B)ij = Aij + (- (Bij)) = Aij - Bij for i = 1, …, m and j = 1, …, n where m is the number of rows in A and B and n is the number of columns. 1.2 - 2 For row and column vectors and matrices the zero vector is the vector all of whose 0 0 0 0 components are 0. The zero vector is denoted by 0. For example, 0 = and 0 = 0 0 0 0 0 are the zero vectors for triples and 32 zero matrices. Functions. One adds and negates functions by adding and negating their values for each value in the domain. Again, subtraction is defined in terms of addition by (1). The result is that one subtracts functions also by subtracting their values for each value in the domain. In order to add or subtract two functions they must have the same domain. If f and g are two functions with the same domain S, then the sum f + g, negative - f and difference f - g are defined by (f + g)(x) = f(x) + g(x) (- f)(x) = - (f(x)) (f - g)(x) = (f + (- g))(x) = f(x) + ((- g)(x)) = f(x) + (- g(x)) = f(x) - g(x) for x in S. Example 3. If f(x) = 4x2 – 2x + 3 and g(x) = 2x2 + x - 5 then (f + g)(x) = 6x2 – x – 2 (- f)(x) = - 6x2 + x + 2 (f - g)(x) = 2x2 – 3x + 8. 2 3 t t Example 4. If f(t) = sint t and g(t) = cos2t t then e e 2 3 t +t t (f + g)(t) = sin tt + cos e + e2t 2 -t (- f)(t) = - sint t -e 2 3 t -t t . (f - g)(t) = sin tt - cos e - e2t Note that the definition of addition, negation and subtraction of row and column vectors and matrices is consistent with the definition of addition, negation and subtraction of 1.2 - 3 functions when row and column vectors and matrices are viewed as functions on their index set. Directed line segments. Let’s assume that directed line segments with the same length and direction represent the same vector. y First consider addition. Suppose u = PQ u + v = PT and v = RS are directed line segments. The sum u + v is defined as follows. v = QT W Consider the directed line segments PW S u - v = QW and QT starting at P and Q respectively and having the same length and direction T v = PW Q v = RS as RS. So v = PW = QT also. Then PQTW is a parallelogram and the diagonal P u = PQ R x PT of the parallelogram is the sum of u and v, i.e. u + v = PT . Putting it another way, u + v = PT is the third side of the triangle, two of whose sides are u = PQ and v = QT It is not hard to show that this geometric definition of addition corresponds to the definition of addition of the numeric vectors corresponding to u and v. If u = PQ is a directed line segment, then - u is the directed line segment QP . Again this geometric definition of negation corresponds to the definition of negation of the numeric vector corresponding to u. Subtraction is again defined in terms of addition and negation by (1). In terms of the notation in the definition of addition, v – u = QU is the directed line segment from the tip of u to the tip of v. For directed line segments, the zero vector is just a directed line segment which ends where it starts, i.e. 0 = PP . These definitions of addition, negation and subtraction of directed line segments are consistent with the definitions of addition, negation and subtraction of ordered pairs and triples when one associates ordered pairs and triples with directed line segments by means of a coordinate system. 1.2.2. Multiplication of a vector by a number 1.2 - 4 The product tv of a number t and a vector v is a vector of the same type as v and is often called a scalar multiple of v. Row and column vectors and matrices. One multiplies a row or column vector or a matrix by a number by multiplying each component by t. For example, for triples one has v1 v = v2 v3 tv1 tv = tv2 tv3 Example 5. 2 v = -4 5 (3)(2) 6 tv = (3)(-4) = -12 (3)(5) 15 t=3 In general, (tv)i = t(vi) for i = 1, …, n where n is the number of components of v. For 32 matrices one has a11 a12 A = a21 a22 a31 a32 ta11 ta12 tA = ta21 ta22 ta31 ta32 Example 6. A = 2 3 5 7 3A = 35 37 15 21 32 33 = 6 9 For general matrices (tA)ij = t(Aij) for i = 1, …, m and j = 1, …, n where m is the number of rows in A and B and n is the number of columns. Functions. One multiplies a functions by a number by multiplying its value by the number for each value in the domain. If f is a function, then the product tf is defined by (tf)(x) = t(f(x)) for x in S. Example 7. If f(x) = 4x2 – 2x + 3 and t = 3 then (3f)(x) = 12x2 – 3x + 9. 1.2 - 5 2 2 t 3t Example 8. If f(t) = sint t and t = 3 then (3f)(t) = 3 sint t then e 3e The definition of multiplication by a number for row and column vectors and matrices is consistent with the definition of multiplication by a number for functions when row and column vectors and matrices are viewed as functions on their index set. Geometric / physical vectors. Multiplication of geometric / physical vectors by a number is defined as y follows. Suppose u = PQ and t is a number. Then tu has the same direction as u if t 0 and the opposite direction of u if t < 0. The length of tu is |t| times the length of u. It is not hard to show that this geometric definition multiplication of a vector by a number t corresponds to the definition of multiplication of the numeric vector corresponding to u by the number t. R Q u = PQ tu = PR P x This definition of multiplication of a directed line segments by a number is consistent with the definitions of multiplication ordered pairs and triples by a number when one associates ordered pairs and triples with directed line segments by means of a coordinate system. 1.2.3. Linear combinations (or superpositions) A linear combination (or superposition) of vectors is just a sum of scalar multiples of the vectors. More specifically, if u1, u2, …, un are vectors and t1, t2, …, tn are numbers, then, then the vector v = t1u1 + t2u2 + … + tnun is called a linear combination (or superposition) of u1, u2, …, un. As we go on we shall see many situations when we want to write a given vector v as a linear combination of other given y vectors. 7 () v = 2u1 + 3u2 = 8 8 2 Example 9. Suppose u1 = 1 7 1 and u2 = 2 and t1 = 2 and t2 = 3. 6 Then the corresponding superposition is 5 v = t1u1 + t2u2 2 1 = 2 1 + 3 2 4 3 7 = 2 + 6 = 8 3 3u2 = 6 () 4 3 u2 = (12) 1 4 2u1 = 2 () u1 = 1.2 - 6 1 (21) x 2 3 4 5 6 7 1.2 - 7