## Arithmetic Operations on Vectors

You can perform many of the same arithmetic operations
on vectors that you can on scalar quantities. Adding two
vectors involves adding the second vector’s components to
the first vector’s components.

v1 = < x1, y1, z1 > v2 = < x2, y2, z2 >
v1 + v2 = < x1 + x2, y1 + y2, z1 + z2 >

If you have two vectors, v1 and v2

v1 = < 7, -2, 4 > v2 = < 1, 5, 6 >

The sum of v1 and v2 is

v1 + v2 = < 7 + 1, -2 + 5, 4 + 6 >
v1 + v2 = < 8, 3, 10 >

Subtracting two vectors involves subtracting each of the
second vector’s components from the first vector’s
components.

v1 = < x1, y1, z1 > v2 = < x2, y2, z2 >
v1 - v2 = < x1 - x2, y1 - y2, z1 - z2 >

If you have two vectors, v1 and v2

v1 = < 3, 7, -1 > v2 = < 4, 2, 5 >

Subtracting v2 from v1 yields

v1 - v2 = < 3 - 4, 7 - 2, -1 - 5 >
v1 - v2 = < -1, 5, -6 >

Next section I cover the dot product, which is the
result of multiplying two vectors. You can easily multiply
a vector by a scalar value. If you multiply a vector v

v = < x, y, z >

by a scalar s, you get the result

v * s = < x * s, y * s, z * s >

Multiplying the vector v

v = < -2, 5, 7 >

by the scalar value 5 gives you the result

5v = < -2 * 5, 5 * 5, 7 * 5 >
5v = < -10, 25, 35 >

Next (Dot Product)

Previous (Vector Length)