Math: Combining Vectors Zero Robotics: The SPHERES Challenge Combining Vectors Resultants, Crosses, and Dots, Oh My! While vectors can be useful by themselves, often it is best to use them in combination with other vectors. Using vector addition can combine paths into one smooth line. Vector subtraction can give us the distance between two points. Dot products can help determine the angle between two vectors. Finally, cross products produce a third vector which is perpendicular to the first two. 1 Vector Addition Very rarely are travel paths in a straight line. More often, they involve several twists and turns- which in turn means the traveler uses several different vectors in order to reach their final destination- each having their own magnitude and direction. By adding the vectors together, it is possible to tell where the final spot is in relation to the beginning point, and the vector which covers the most direct path between the points. This is the result of vector addition. Vector addition is easiest to picture by placing the tail of each vector at the arrow of the one previous. You keep adding vectors in sequence. The final step is to draw a vector that is at the beginning point and heads to the end point. However, this can be easily calculated by adding the components of the vector to the corresponding component in the other. For example, if we had a vector [4, 3] and another vector [2, -4], the sum of the two would simply be [6, -1]. The x-components would sum 4+2=6, and the y would sum 3+ -4=-1. Draw the vectors [1, 2] and [1, -2] tail to head to form a continuous chain, and draw the resultant vector. What is the value of the resultant vector? Can you show why using component addition? Do the same for the vectors [3, 3], [-1, 1] and [0,3]. 1 August 12, 2011 Math: Combining Vectors 2 Zero Robotics: The SPHERES Challenge Vector Subtraction Vector subtraction is performed in a similar way to vector addition. Each of the components of a vector are subtracted from the components of another vector. However, vector subtraction, instead of combining the path of two vectors, creates a resultant vector which points from the second vector to the first. This can be useful when trying to determine what direction to point from one object to another. For instance, if we were attempting to point at Opulens while located at [0.15,- 0.15, -0.15]. We would subtract each of the coordinates individually from the location of Opulens [0, -0.35, -0.2]. The x-components would be 0 - 0.15=-0.15, the y components would be -0.35 - -0.15=-0.2, and the z -0.2 - -0.15=-0.05. The resultant vector is [-0.15, -0.2, -0.05]. This vector effectively completes a triangle, and points from the SPHERES Satellite’s location to Opulens. 3 Dot Product The dot product is another way to combine two vectors. However, instead of giving us the vector between the two endpoints, the dot product gives us information on the angle between the two vectors. A dot product is taken by multiplying the corresponding components of a vector and adding the sums together. For example, the dot product of [2,2] and [3,4] is 2*3+2*4=6+8=14. We can also take the dot product of two 3-D vectors: [4,-2,1] // [2, 3,-4]=(4*2)s+(3*-2)+(1*-4)=8-6-4=-2 Notice that 14 and -2 are scalars, not vectors. However, this scalar is very useful in determining information about the relationships between the two original vectors. Here is why: a • b = (cos θ)(|a|)(|b|) |a| = magnitude of vector a θ= angle between vector a and b Essentially, if we know the magnitude of the two vectors we took the cross product of, we can easily find the angle between them. There are three angles that we will always know without taking the inverse cosine. The first is if the angle is 0 - essentially the vectors lie right on top of each other. Then the dot product will simply be the multiplication of the two magnitudes, with no factor of cosine, as cos(0)=1. The second is a separation of 180 degrees. This means they are pointing directly away from one another. In this case, the dot product is 2 August 12, 2011 Math: Combining Vectors Zero Robotics: The SPHERES Challenge the negative of both of their magnitudes multiplied together. Finally, if the vectors are separated by 90 degrees, the dot product is 0, as cos(90)=0. So no matter what their magnitude, the answer is always 0. What is the dot product of [0, 2] and [3,0]? What angle is there between these vectors? What is the dot product of [2, 2] and [2, 2]? What angle is between them? Is is true that dotting a vector with itself gives you the square of the magnitude? I want to know if my vectors are separated by 180 degrees. How do I check? What is the dot product of [1,2,3] and [4,5,6]? How about [-1,-2,-3] and [-4,-5,-6]? Explain why they are the same. 3 August 12, 2011 Math: Combining Vectors 4 Zero Robotics: The SPHERES Challenge Cross Product Cross Product is a method by which you can obtain a vector that is perpendicular to both vectors which are crossed. In order for this vector to point the right direction, it is important that vectors be in a specified order. The resultant vector is then found through multiplying the components of the two vectors in a pattern that is easier visualized than explained. If were were to take the cross product of two vectors [a,b,c] and [d,e,f], the method would look something like this: Essentially, we take the determinant of a 3x3 matrix, where the first line is the coordinate axes, and the second and third lines contain the vectors that we are crossing. For those of you who are not familiar with matrices, you may just want to remember the bolded answer at the bottom, and substitute the numbers you want for a,b,c,d,e, and f. For those who are familiar with matrices, the easiest way to take a determinant in the case of a cross product is to break the matrix down into cofactor matrices, as shown above, and taking the determinant of each of those cofactor matrices. This will give you the same answer as at the bottom of the above picture, but may be easier to remember than the formula. 4 August 12, 2011 Math: Combining Vectors Zero Robotics: The SPHERES Challenge What is the result of [1,0,0] x [0,1,0]? Did you expect this answer? What is the result of [1,1,0]x[0,1,1]? How can you verify that the resulting vector is perpendicular to both of the vectors you crossed? Why can’t you cross vectors in two dimensions? 5 August 12, 2011
© Copyright 2026 Paperzz