The following article describes vector additions using vectors of two or three elements.
Basically, vectors can contain any number of elements.

Vectors can be added by adding the individual elements. However, vectors can only be added
if they have the same number of dimensions and the same orientation (columns or row-oriented).

The following vectors can be added. They have the same number of elements and orientation.

\(\left[\matrix{X_a\\Y_a}\right] + \left[\matrix{X_b\\Y_b}\right]\)
and \(\left[\matrix{X_a\\Y_a\\Z_a}\right] + \left[\matrix{X_b\\Y_b\\Z_b}\right]\)

The following vectors can not be added because they have different numbers of elements.

First the line of the first vector (red) is drawn from the zero point to the position \(x = 2, y = 4\)

Then, from the top of the first vector, the second vector (yellow) is drawn to the position
by 4 units to the right and two units to the top.

The sum vector (blue) is determined by the line from the base point of the first to
the peak of the second vector

The subtraction of vectors is identical to the addition of vectors, but with negative operator. For the vector subtraction,
the same rules apply as for the addition of the vector.

More information about vector subtraction you can find here.