Introduction
- Vectors can be added and subtracted to produce new vectors.
- This is only possible if the vectors have the same number of elements.
- To add (or subtract) two vectors, you add (or subtract) the corresponding elements.
Mathematical Definition
Example
code (Python)
import numpy as np
a = [3, 6, 2]
b = [1, 3, 10]
c = np.add(a, b)
print(c) # prints: [4, 9, 12]