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

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

The following vectors can be subtracted. They have the same number of elements and same 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 subtracted because they have a different number of elements.

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

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

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

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

More information about vector addition you can find here.