Vector Operations
Now that you know what vectors are and how to represent them, we will start to cover some of the calculations that can be used on them.
Addition and Subtraction
The simplest calculations between two vectors is addition/subtraction and is most easily done when vectors are represented in Cartesian form.
Say for example, you have two vectors:
P = 2i + 3j - k
and
Q = i - 6j + 3k
if you want to add the vectors together, you will get a new vector. for example: R = P + Q, so:
R = 2i + 3j - k + i - 6j + 3k
what we do now is collect like terms to get:
R = 3i - 3j + 2k
It is just that simple, and subtraction is exactly the same eg: S = P - Q gives:
S = 2i + 3j - k - (i - 6j + 3k)
S = 2i + 3j - k - i + 6j - 3k
S = i + 9j - 4k
Multiplication and Division (with scalars)
Firstly we will start with the multiplication and division of vectors by a scalar. when you have a vector and you multiply or divide it by a scalar, you multiply or divide all components by that value. For a vector in Polar form, you just multiply/divide the magnitude. For vectors in Cartesian form you multiply/divide each component.
Polar Example: P = [math]15\angle 30^{\circ}[/math]
Division: P/3 = [math]\frac{15}{3} \angle 30^{\circ}[/math] = [math]5\angle 30^{\circ}[/math]
Multiplication: 2P = [math]2\times 15 \angle 30^{\circ}[/math] = [math]30\angle 30^{\circ}[/math]
Cartesian Example: P = 12i + 4j
Division: P/2 = (12i + 4j)/2 = 6i + 2j
Multiplication: 3P = 36i + 12j
Vector Dot Product
The Dot product is a vector operation that produces a scalar from two vectors and is defined by this simple formula:
[math]\mathbf{P}\cdot\mathbf{Q}[/math] = [math]P_1 Q_1 + P_2 Q_2 + ... + P_n Q_n[/math]
So for two simple 3D vectors such as:
P = 2i + 3j - k and Q = i - 6j + 3k
[math]\mathbf{P}\cdot\mathbf{Q}[/math] = [math](2\times 1) + (3\times -6) + (-1\times 3)[/math]
[math]\mathbf{P}\cdot\mathbf{Q}[/math] = 2 - 18 - 3
[math]\mathbf{P}\cdot\mathbf{Q}[/math] = -19
Vector Cross Product
The vector cross product is an operation between two 3D vectors (for example: P and Q). it is denoted by the multiplication sign: [math]\times[/math], the result of this calculation is another vector which is perpendicular to both of the original vectors with its direction given by the right hand rule and its magnitude given by:
|A||B|[math]\sin (\theta)[/math]
where [math]\theta[/math] is the smallest angle between the two vectors. using this formula is simple to use with vectors defined on the XY plane because the angle between the two vectors is easy to find and the resultant vector is always along the Z axis, but for two 3D vectors it becomes more difficult so we have another method to calculate it.
Solving the Cross Product with a matrix
The cross product can be described as the determinant of a 3[math]\times[/math]3 matrix:
[math]\mathbf{P}\times\mathbf{Q} = \begin{array}{| l c r |} \hat{i} & \hat{j}&\hat{k} \\ P_x & P_y & P_z \\ Q_x & Q_y & Q_z \\ \end{array}[/math]