I need help coding vectors.?
Please enter the x-component of vector a:
Given the vectors a = 〈4, 3〉 and b = 〈2, -1〉
Let’s calculate the vector 2a + b:
2a + b = 11.18 @ 26.57°
2a + b = 〈10, 5〉
The unit vector in the direction of 2a+b is
u = 〈10/sqrt(125), 5/sqrt(125)〉
u = 10/sqrt(125)*i + 5/sqrt(125)*j
That is the output of the equation except we ask the user to input the values.