Addition and Subtraction of Vectors Lecture V1.1 Example 1 Moodle
Vectors have a magnitude and direction
The resultant vector R = A + B Shift BShift A R = A + B = B + A commutative law Addition of Vectors
A + B + C D = A + B + C D = (A + B) + C D = A + (B + C) D = A + B + C = (A + B) + C = A + (B + C) associative law
R = A + B R + (-A) = B R - A = B Subtraction of Vectors
D = A - B
Unit Vectors and Coordinate Systems A x = A x i A y = A y j A = A x i + A y j. A x = A cos A y = A sin
Addition of Vectors by Components R = R x i + R y j = (A x + B x ) i + (A y + B y ) j R x = A x + B x R y = A y + B y
3-Dimensional Vectors A = A x i + A y j + A z k
3-Dimensional Vectors A x = R cos A y = R sin A z = A cos R = A sin A x = A sin cos A y = A sin sin A z = A cos
Direction Cosines = 1
Given the vectors A = i – 2j + 4k and B = 3i + j - 2k, find R = A + B. Matlab Example 1 >> A = [1 -2 4] A = >> B = [3 1 -2] B = >> R = A + B R = >>
Use column vectors >> A = [1; -2; 4] A = >> B = [3; 1; -2] B = >> R = A + B R = 4 2 >>
Find A = |A| and B = |B| for the vectors A = i – 2j + 4k and B = 3i + j - 2k Matlab Example 2 >> A = [1 -2 4] A = >> magA = norm(A) magA = >> B = [3 1 -2] B = >> magB = norm(B) magB = >>
Find the unit vector A in the direction of the vector A = i – 2j + 4k Matlab Example 3 >> A = [1 -2 4] A = >> lambdaA = A/norm(A) lambdaA = >>
Find the direction cosines of the vector A = i – 2j + 4k Matlab Example 4 >> A = [1 -2 4] A = >> l = A(1)/norm(A) l = >> m = A(2)/norm(A) m = >> n = A(3)/norm(A) n = >>