import numpy as np
import matplotlib.pyplot as plt
v1 = np.array([-6,4,2,8,12])
v2 = np.array([9,11,3,14,6])
v3 = np.array([22,1,4,-7,0])
v4 = np.array([8,-3,5])
print("v1 = ",v1,"\n")
print("v2 = ",v2,"\n")
print("v3 = ",v3,"\n")
print("Linear weighted combination (3 vectors):\n")
print(v4[0]*v1 + v4[1]*v2 + v4[2]*v3)
v5 = np.array([2,8,9,-4,1])
v4 = np.array([8,-3,5,2])
print("\nLinear weighted combination (4 vectors):\n")
print(v4[0]*v1 + v4[1]*v2 + v4[2]*v3 + v4[3]*v5)
v1 = [-6 4 2 8 12] v2 = [ 9 11 3 14 6] v3 = [22 1 4 -7 0] Linear weighted combination (3 vectors): [ 35 4 27 -13 78] Linear weighted combination (4 vectors): [ 39 20 45 -21 80]