Knowledge Base: Vectors

by Bram de Greve
this is a part of the 3D Geometry Primer (http://www.flipcode.com/geometry)
hosted by FlipCode (http://www.flipcode.com)

For all vectors U, V and W; and for all real values r, s and t:

(i) Scalar Products & Negations:

r*(s*V) = (r*s)*V = (s*r)*V = s*(r*V) 
‑(s*V) = (‑s)*V = s*(‑V)
‑(‑V) = V
0*V = O 
r*O = O

–V(v1, v2, v3) = R(–v1, –v2, –v3)
r*V(v1, v2, v3) = R(r*v1, r*v2, r*v3)

(ii) Sums & Subtractions:

U+V = V+U
 (U+V)+W = U+(V+W) = U+V+W
(r*V)+(s*V) = (r+s)*V
t*(r*U+s*V) = (t*r)*U+(t*s)*V

U(u1, u2, u3) + V(v1, v2, v3) = R(u1+v1, u2+v2, u3+v3)
r*U(u1, u2, u3) +s*V(v1, v2, v3) = R(r*u1+s*v1, r*u2+s*v2, r*u3+s*v3)

(iii) Dot Product

U·V = 0 Û U and V are perpendicular to each other (U ^ V)
V·V = V² = ||V||² > 0 for each vector V ¹ O
V·V = 0 Û V = O

U·V = V·U
(r*U)·(s*V) = (s*U)·(r*V) = (r*s)*(U·V)
(U+V)·W = (U·W)+(V·W)
(U+V)·(W+D) = U·(W+D)+V·(W+D)

I·J=0;  J·K=0;  K·I=0
I·I=1;  J·J=1;  K·K=1

U(u1, u2, u3) · V(v1, v2, v3) = u1*v1 + u2*v2 + u3*v3

(iv) Cross Product

U×V = 0 Û U and V are linair dependent (U // V)

U×V = ‑(V×U)
(r*U)×(s*V) = (s*U)×(r*V) = (r*s)*(U×V)
U×(V+W) = (U×V)+(U×W)
(V+W)×U = (V×U)+(W×U)

I×J=K;  J×K=I;  K×I=J  (notice the cyclic permutation: IJ; JK and KI)
I×I=0;  J×J=0;  K×K=0

U(u1, u2, u3) × V(v1, v2, v3) = R(u2*v3–u3*v2, u3*v1–u1*v3, u1*v2–u2*v1)

Identity of Lagrange for 4 vectors:

Identity of Lagrange for 2 vectors:

(v) Mixed Product (Triple Product)

definition: (U V W) = U·(V×W)
(U V W) = 0 Û U, V and W are linear dependent (W=r*U+s*V)

(U V W) = (V W U) = (W U V) = ‑(U W V) = ‑(V U W) = ‑(W V U)
((r*U) V W) = (U (r*V) W) = (U V (r*W)) = r*(U V W)
((r*U) (s*V) (t*W)) = (r*s*t)*(U V W)
(U V (W+Z)) = (U V W) + (U V Z) (same thing for the 1st and 2nd argument)

(I J K) = 1

(vi) Double Cross Product

 (U×V)×W = (U·W)*V ‑ (V·W)*U
In general: (U×V)×W ¹ U×(V×W)

(I×J)×K=0;  (J×K)×I=0;  (K×I)×J=0  (cf. I×J=K, ... and K×K=0, ...)

(vii) And The Last One...

(U×V)×(W×Z) = (U W Z)*V ‑ (V W Z)*U = ‑(U V W)*Z + (U V Z)*W