freeCodeCamp/guide/english/mathematics/adding-and-subtracting-vectors/index.md

1008 B

title
Adding and Subtracting Vectors

Adding and Subtracting Vectors

In linear algebra, the sum A+B of two vectors (A and B) is equivalent to the sum of the corresponding components of A and B. For instance, if Vector A is {1, 3, 4} and Vector B is {2, 5, 9}, the sum A+B is {1+2, 3+5, 4+9} = {3, 8, 13}.

A visualization of vector addition.1

Similarly, the difference A-B between two vectors (again, A and B) is equal to the difference between the corresponding components of A and B. The difference A-B with the above vectors is {1-2, 3-5, 4-9} = {-1, -2, -5}.

More Information:

Vector Addition on Wolfram Mathworld Vector Addition and Subtraction on Wikipedia

Sources:

  1. Vector Addition on Wolfram Mathworld