Unit 6: Matrix Algebra
Chapter 31: Vectors as Arrows
Section 31.3: the cross product
Copyright
Copyright * 2001 by Addison Wesley Longman, Inc.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of the publisher. Printed in the United States of America.
Initializations
> restart;
>
with(linalg):
with(plots):
with(plottools):
read(`C:/Program Files/Maple 6.01/pvac.txt`):
Warning, the protected names norm and trace have been redefined and unprotected
Warning, the name changecoords has been redefined
>
Derivation of Formula (12.5) for the Cross Product
Formula (12.5) in Section 12.4 can be derived from the three properties that A x B , the cross product of the vectors A and B , is orthogonal to both A and B , forms a right-handed system with A and B , and has length given by
||
A
x
B
|| = ||
A
|| ||
B
|| sin
where
in
is the angle between
A
and
B
. To do this, let the vectors
A
,
B
, and
C
be given respectively by
>
A := vector([seq(a[k],k=1..3)]):
B := vector([seq(b[k],k=1..3)]):
C := vector([seq(c[k],k=1..3)]):
print(A,B,C);
>
The condition that C be perpendicular to both A and B yields the two equations
>
q1 := dotprod(A,C,orthogonal) = 0;
q2 := dotprod(B,C,orthogonal) = 0;
>
Then,
||
A
x
B
|| = ||
A
|| ||
B
|| sin
yields the third equation
which we obtain in Maple with
>
normA := simplify(norm(A,2),symbolic);
normB := simplify(norm(B,2),symbolic);
normC := simplify(norm(C,2),symbolic);
> q3 := normC = normA*normB*sin(angle(A,B));
>
Solving these three equations for
gives
> q4 := solve({q||(1..3)},{c[1],c[2],c[3]});
>
There are two solutions, namely,
>
C1 := subs(q4[1],op(C));
C2 := subs(q4[2],op(C));
>
that is,
and
A simple test with the unit vectors { i , j , k } shows the first solution obeys the right-hand rule and points in the appropriate direction. The other solution is its negative. Consequently, orthogonality, the length condition, and the right-hand rule determine the cross product which we write more compactly as
A
x
B
=
in terms of the determinant of a 3 x 3 matrix. (See Section 12.4 for a discussion of determinants.)
In Maple, we could perform this test via
>
subs(a[1]=1,a[2]=0,a[3]=0, b[1]=0,b[2]=1,b[3]=0, op(C1));
subs(a[1]=1,a[2]=0,a[3]=0, b[1]=0,b[2]=1,b[3]=0, op(C2));
>
The first vector is consistent with the right-handed i x j = k .
Alternatively, comparing to Maple's built-in crossprod command,
> crossprod(A,B);
>
is another way we might select the correct solution from the two solutions found.
>
Example 31.6
If
A
= 2
i
2
j
k
and
B = i + j + k
that is, if
>
A := vector([2, -2, -1]);
B := vector([1, 1, 1]);
>
then
A
x
B
= det
that is,
> AxB := crossprod(A, B);
>
with A , B , and A x B shown in FIgure 31.10.
>
p1 := arrow([0,0,0], A, [1,1,1], .1,.3,.2, color=black):
p2 := arrow([0,0,0], B, [1,0,1], .1,.3,.2, color=black):
p3 := arrow([0,0,0], AxB, [2,1,1], .1,.3,.2, color=black):
p4 := textplot3d({[1,-1.5,-.7,`A`], [.5,.7,.9,`B`], [-.5,-1,2.1,`AxB`]}, color = black, font=[TIMES,ROMAN,14]):
p5 := spacecurve({[[0,0,0],[2,0,0],[2,-3,0],[0,-3,0],[0,0,0]], [[0,0,0],[0,0,4]]}, color=black, linestyle=2):
display([p||(1..5)], orientation=[-30,75], axes=boxed, scaling=constrained, labels=[`x `,` y`,`z `], labelfont=[TIMES,ITALIC,12], tickmarks=[4,4,5]);
>
Additional Properties of the Cross Product
A compendium of formulas for the cross product is listed in Table 31.3, the contents of which are the following.
1. Scalar Multiplication ( a A ) x ( b B ) = ab ( A x B )
2. Distributive Laws A x ( B + C ) = A x B + A x C
( B + C ) x A = B x A + C x A
3. Anti-Commutation
B
x
A
=
A
x
B
4. Non-Associative
A
x
(
B
x
C
) = (
A
.
C
)
B
(
A
.
B
)
C
(
A
x
B
)
x
C
= (
A
.
C
)
B
(
B
.
C
)
A
_______________________________________________________________
Table 31.3
The first two laws suggest the cross product obeys some of the rules of ordinary algebra. However, the failure of the commutative law (3) and of the associative laws (4) points out the singular nature of the cross product.
>
Additional Examples (Not in Text)
The non-associativity of the cross product illustrated in the following computation involving the vectors
>
A := vector([seq(a[k], k = 1..3)]):
B := vector([seq(b[k], k = 1..3)]):
C := vector([seq(c[k], k = 1..3)]):
print(A,B,C);
>
Computing A x ( B x C ) and ( A x B ) x C , we find
>
q1 := crossprod(A, crossprod(B,C));
q2 := crossprod(crossprod(A,B), C);
>
That these are not equal is established by
> map(simplify,evalm(q1-q2));
>
If A x ( B x C ) = ( A x B ) x C , then the difference just computed would have been the zero vector.
On the other hand, compare
A
x (
B
x
C
) with
A
x
(
B
x
C
) = (
A
.
C
)
B
(
A
.
B
)
C
, that is, with
> Q1 := evalm(dotprod(A,C,orthogonal)*B - dotprod(A,B,orthogonal)*C);
>
via the subtraction
> map(simplify,evalm(q1-Q1));
>
and compare (
A
x
B
) x
C
with (
A
x
B
)
x
C
= (
A
.
C
)
B
(
B
.
C
)
A
, that is, with
> Q2 := evalm(dotprod(A,C,orthogonal)*B - dotprod(B,C,orthogonal)*A);
>
via the subtraction
> map(simplify,evalm(q2-Q2));
>