Theory — Operations with vectors
Vector operations are built from the idea that a vector has both magnitude and direction. In Cartesian form, a vector is written
using components. In 2D we write \(A=(A_x,A_y)\), and in 3D we write \(A=(A_x,A_y,A_z)\). Once the components are known, the
most common operations are vector addition, vector subtraction, and scalar multiplication. These are fundamental in mechanics,
especially when several forces act at the same time and must be combined into one resultant vector.
Addition
Vector addition is performed component-wise. This means that you add the x-components together, then the y-components together,
and in 3D you also add the z-components together.
2D vector addition.
\[
\begin{aligned}
A + B &= (A_x + B_x,\ A_y + B_y)
\end{aligned}
\]
3D vector addition.
\[
\begin{aligned}
A + B &= (A_x + B_x,\ A_y + B_y,\ A_z + B_z)
\end{aligned}
\]
Geometrically, addition can be shown in two equivalent ways. In the head-to-tail method, the second vector starts where
the first vector ends. The resultant goes from the start of the first vector to the end of the second. In the
parallelogram method, both vectors start at the same origin, and the resultant is the diagonal of the parallelogram formed
by the translated copies of the vectors.
Subtraction
Subtraction is also component-wise:
Vector subtraction.
\[
\begin{aligned}
A - B &= (A_x - B_x,\ A_y - B_y) \\
B - A &= (B_x - A_x,\ B_y - A_y)
\end{aligned}
\]
In 3D the same pattern extends by including the z-components. A useful way to interpret subtraction is to rewrite it as addition
of the opposite vector:
Subtraction as addition of an opposite.
\[
\begin{aligned}
A - B &= A + (-B)
\end{aligned}
\]
This matters in graphs, because the subtraction picture can be constructed with the head-to-tail method by reversing the vector
being subtracted and then adding it.
Scalar multiplication
Scalar multiplication changes the size of a vector and may also reverse its direction. If \(k\) is a scalar, then multiplying a
vector by \(k\) means multiplying every component by that same number.
Scalar multiplication.
\[
\begin{aligned}
kA &= (kA_x,\ kA_y) \\
kA &= (kA_x,\ kA_y,\ kA_z)
\end{aligned}
\]
If \(k>1\), the vector gets longer. If \(0
Magnitudes and the angle between vectors
When vectors are compared, it is often useful to know their magnitudes and the angle between them. The magnitude comes from the
Pythagorean theorem:
Magnitude formulas.
\[
\begin{aligned}
|A| &= \sqrt{A_x^2 + A_y^2} \\
|A| &= \sqrt{A_x^2 + A_y^2 + A_z^2}
\end{aligned}
\]
The angle between vectors comes from the dot product:
Dot product and angle.
\[
\begin{aligned}
A \cdot B &= A_xB_x + A_yB_y + A_zB_z \\
\cos\theta &= \frac{A \cdot B}{|A|\cdot|B|}
\end{aligned}
\]
The calculator reports the smaller angle between \(A\) and \(B\). This is often useful in force-resultant problems, because the
size and direction of the resultant depend strongly on whether two vectors point in similar or opposite directions.
Worked example
Let \(A=\langle 3,4\rangle\), \(B=\langle 1,-2\rangle\), and \(k=2\). Then
Addition example.
\[
\begin{aligned}
A + B &= (3+1,\ 4+(-2)) \\
&= (4,\ 2)
\end{aligned}
\]
Scalar multiplication example.
\[
\begin{aligned}
2A &= (2\cdot 3,\ 2\cdot 4) \\
&= (6,\ 8)
\end{aligned}
\]
So the sum \(A+B\) gives the combined effect of the two vectors, while \(2A\) gives a vector in the same direction as \(A\) but
with twice the magnitude.
These rules are simple, but they are the basis for a large part of classical mechanics and applied mathematics. Whenever several
quantities with direction must be combined, vector operations provide the correct algebraic and geometric framework.