170 likes | 388 Views
Addition and Subtraction of Vectors. Lecture V1.1 Example 1 Moodle. Vectors have a magnitude and direction. Addition of Vectors. The resultant vector R = A + B. Shift B. Shift A. R = A + B = B + A. commutative law. A + B + C. D = A + B + C.
E N D
Addition and Subtraction of Vectors Lecture V1.1 Example 1 Moodle
Addition of Vectors The resultant vector R = A + B Shift B Shift A R = A + B = B + A commutative law
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
Subtraction of Vectors R = A + B R + (-A) = B R - A = B
Unit Vectors and Coordinate Systems Ay = Ayj A = Axi + Ayj. Ax = Axi Ax = A cos q Ay = A sin q
Addition of Vectors by Components R = Rxi + Ryj = (Ax+ Bx)i + (Ay+ By)j Rx = Ax+ Bx Ry = Ay+ By
3-Dimensional Vectors A = Axi + Ayj + Azk
3-Dimensional Vectors Ax = R cos f Ay = R sin f Az = A cosq R = A sin q Ax = A sin q cos f Ay = A sin q sin f Az = A cos q
Matlab Example 1 Given the vectors A = i – 2j + 4k and B = 3i + j - 2k, find R = A + B. >> A = [1 -2 4] A = 1 -2 4 >> B = [3 1 -2] B = 3 1 -2 >> R = A + B R = 4 -1 2 >>
Use column vectors >> A = [1; -2; 4] A = 1 -2 4 >> B = [3; 1; -2] B = 3 1 -2 >> R = A + B R = 4 -1 2 >>
Matlab Example 2 FindA = |A| andB = |B| for the vectors A = i – 2j + 4k and B = 3i + j - 2k >> A = [1 -2 4] A = 1 -2 4 >> magA = norm(A) magA = 4.5826 >> B = [3 1 -2] B = 3 1 -2 >> magB = norm(B) magB = 3.7417 >>
Matlab Example 3 Find the unit vector lA in the direction of the vector A = i – 2j + 4k >> A = [1 -2 4] A = 1 -2 4 >> lambdaA = A/norm(A) lambdaA = 0.2182 -0.4364 0.8729 >>
Matlab Example 4 Find the direction cosines of thevector A = i – 2j + 4k >> A = [1 -2 4] A = 1 -2 4 >> l = A(1)/norm(A) l = 0.2182 >> m = A(2)/norm(A) m = -0.4364 >> n = A(3)/norm(A) n = 0.8729 >>