Adding and Subtracting Vectors

This is a very simple post and a very simple subject, but every once in a while even the experts need to be reminded how to do simple addition and subtraction with vectors. Let’s go ahead and specify a couple vectors that we can work with.

Vector

In MATLAB: >>A = [1 2 4];

Vector

In MATLAB: >>B = [2 3 4];

When you add vectors together, you add each individual directional component (). Subtraction works the exact same way. Lets go ahead and do a few, C will represent the vector that results from the addition and subtraction.

These vectors are all in 3-dimensional space with a X, Y and Z component. The number in front of each directional component is the weight or magnitude of that particular directional component of the vector. There it is, short and sweet 🙂