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 A = u_{x} + 2 u_{y} + 3 u_{z}

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

Vector B = 2 u_{x} + 3 u_{y} + 4 u_{z}

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

When you add vectors together, you add each individual directional component (u_{x}, u_{y}, u_{z} ).  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.

C = A + B = (2 + 1) u_{x} + (2 + 3) u_{y} + (3 + 4) u_{z} = 3 u_{x} + 5 u_{y} + 7 u_{z} C = A - B = (2 - 1) u_{x} + (2 - 3) u_{y} + (3 - 4) u_{z} = u_{x} - u_{y} - u_{z}

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

Leave a Reply

Your email address will not be published. Required fields are marked *