kill(all)$
load(vect)$
load(lrats)$

appendix : dot product , cross product ,'version 1.0'.
peter.vlasschaert@gmail.com,23/08/2018

rem : dot product ( = scalar product) , cross product (= vectorial product).
==============================================================
wikipedia :https://en.wikipedia.org/wiki/Dot_product
                    https://en.wikipedia.org/wiki/Cross_product
==============================================================

see website : rocket science , motion stays in one plane , 'version 1.0'
==========================================================
------------------------------------------------------------------------------------------------------------------------
=> ' inner product , outer product ' also used for 'dot product , cross product '.
------------------------------------------------------------------------------------------------------------------------

given vectors A,B.
===============

A:[a1,a2,a3];
B:[b1,b2,b3];
C:[c1,c2,c3];

ai,bi,ci   are components :  i = 1,2,3
-------------------------------------------------

Dot product ( = inner product)
=========================

p1: A*B;
p1a:express(p1);

p2:B*A;
p2a:express(p2);

rule : A.B = B.A 
operator :  '.' =  dot operator
-------------------------------------------
math : dot
-------------------------------------------
result :scalar

rem :  'i' be any dimension for dot product

Vectorial product ( = outer product)
==============================

rem : use for cross product  operator  = ' ~ '

p3: A~B;

p4:express(p3);

p5:B~A;
p6:express(p5);

rule : A ~B = (-1)*B=A 
operator :  '~' =  cross operator
------------------------------------------------
math : cross
------------------------------------------------
result : other vector

p7:A~A;
p8:B~B;

p9:express(p7);
p10:express(p8);

rule : A ~A = B ~ B = 0
operator :  '~' =  cross operator
------------------------------------------------
math :  cross
------------------------------------------------
result : other vector

example : with three vectors
========================

p11:C*(A~B);

p11a:express(p11);

example : numbers, 'p11c';
=======================

p12:[1,2,3];
p13:[4,5,6];
p14:[7,8,9];

p15:(p12~p13).p14;

p16:express(p15);

rem : combination : 1e) vector product.                                  =  A ~ B
                                     2e)  vector product with dot product.  = (A ~ B).C
                                     -------------------------------------------------------------------------
                                     =>  result : number 

----------------------------------------------------------------------------------------------------------

rem : A = 'p12', B = 'p13',C='p14'.

----------------------------------------------------------------------------------------------------------