Appendix C VectororCrossProduct Final
Appendix C VectororCrossProduct Final
Appendix C
(C.1)
and the commutative law does not hold for the cross product.
C
B
A
Figure C.1 A B = C
(C.2)
Appendix C
= kAD sin( )
= kAD ( sin cos cos sin )
But since B = D cos and C = D sin
A ( B + C ) = kAB sin + kAC cos
= ( A B ) + ( A C)
y
A
D
x
B
Figure C.2 A ( B + C ) = ( A B ) + ( A C )
direction of the cross product is given by the right-hand rule. In particular i j is in the
direction of k (rotate i into j with the fingers of your right hand and watch your thumb)
and has a magnitude of unity. But this is just the unit vector k. Thus, in a similar way,
i j = k
j i = k
k i = j
i k = j
j k = i
k j = i
y
i
x
Figure C.3 C = A B
) (
= ( Ax Bx i i ) + ( Ax By i j) + ( Ax Bz i k )
+ ( Ay Bx j i ) + ( Ay By j j) + ( Ay Bz j k )
+ ( Az Bx k i ) + ( Az By k j) + ( Az Bz k k )
Using the above results to evaluate the cross products of the unit vectors, we can write
C = AB
C = Ay Bz Az By i + ( Az Bx Ax Bz ) j + Ax By Ay Bx k
= Cx i + C y j + Cz k
C y = Az Bx Ax Bz
C z = Ax By Ay Bx
Appendix C
j
Ay
k
Az
Bx
By
Bz
(C.3)
(C.4)
as can be seen by the simple example shown in Fig. C.4. Since A and B are parallel,
( A B ) C = 0 . ( B C ) is a vector directed along the +z axis (out of the paper),
however, so that A ( B C ) is a nonzero vector directed along the -y axis.
y
A
B
x
Figure C.4 A ( B C ) ( A B ) C
h
A
Figure C.5
Consider the parallelepiped with its sides formed by the vectors A, B, and C as
shown in Fig. C.6. The volume of the parallelepiped is (area of parallelogram formed by
A and B) (height h) = ( A B ) ( C n ) , where n is a unit vector parallel to A B . Since
A B = A B n , then in terms of A, B, and C the volume of the parallelepiped is given
by ( A B ) C .
h
B
A
Figure C.6
D ( A B ) = Dx ( Ay Bz Az By ) + Dy ( Az Bx Ax Bz ) + Dz ( Ax By Ay Bx )
Note that the scalar triple product can be written as the determinant
Dx
Dy
Dz
D A B = Ax
Bx
Ay
By
Az
Bz
(C.5)
Appendix C
C.7 Example C1
Given the vectors A = i 2 j + 4k and B = 3i + j 2k find A B and A B .
Answer 1:
i
A B = 1 2 4
3 1 2
= i (4 4) + j(12 + 2) + k (1 + 6)
= 14j + 7k
A B = 196 + 49 = 245 = 15.7
Answer 2: In Matlab the cross product of vectors A and B can be written as cross(A,B)
as shown in Matlab Example C1.
Matlab Example C1
>> A = [1 -2 4]
A =
1
-2
>> B = [3 1 -2]
B =
3
-2
>> C = cross(A,B)
C =
0
14
C.8 Example C2
Use A B = AB sin to find the angle between A and B in Example 5g, and
compare with the result of Example 4e.
Answer 1:
sin =
AB
AB
245
= 0.915
21 14
Answer 2: In Matlab the solution can be found by writing the single Matlab equation
shown in Matlab Example C2.
Matlab Example C2
>> A = [1 -2 4]
A =
1
-2
>> B = [3 1 -2]
B =
3
-2
Note carefully the need to use parentheses in the equation for phi. The Matlab
function asin for the arc sine gives the answer in radians. Thus, that result must be
multiplied by 180/ to give the answer in degrees. Also note that the angle phi is greater
than 90 degrees (as can be determined by plotting the vectors) and therefore the arc sine
result must be subtracted from 180 degrees.
Appendix C
Problems
Where appropriate use Matlab to find the answers to the following problems.
C-1 If A = 5i j 2k and B = 2i + 3j k , find
(a) A B and B A
(b) A B
(c) sin and where is the smaller angle between A and B.
C-2 If A = 5i j 2k and B = 2i + 3j k , find A B , ( A B ) B , and ( A B ) A .
C-3 If A = 3i 2 j + 4k , B = 2i 4 j + 5k , and C = i + j 2k , find
(a) A ( B C )
(b) ( A B ) C
C-4 Evaluate
(a) 2i ( 3 j 4k )
(b)
(c )
( i + 2 j) k
( 2i 4 j ) ( i + k )