User:Brews ohare/Sandbox10

Vector algebra relations
The relations below apply to vectors in a three-dimensional Euclidean space. Some, but not all of them, extend to vectors of higher dimensions. In particular, the cross product of two vectors is not available in all dimensions. See Seven-dimensional cross product.

Magnitudes
The magnitude of a vector A is determined by its three components along three orthogonal directions using Pythagoras' theorem:


 * $$\|\mathbf A \|^2 = A_1^2 + A_2^2 +A_3^2 \ $$

The magnitude also can be expressed using the dot product:


 * $$\|\mathbf A \|^2 = (\mathbf {A \cdot A}) \ $$

Inequalities

 * $$\frac{ \mathbf{A \cdot B}}{\|\mathbf A \| \|\mathbf B \|} \le 1 \ $$; Cauchy–Schwarz inequality  in three dimensions
 * $$\|\mathbf{A + B}\| \le \| \mathbf{A}\| + \|\mathbf{B}\| $$; the triangle inequality in three dimensions
 * $$\|\mathbf{A - B}\| \ge \| \mathbf{A}\| - \|\mathbf{B}\| $$; the reverse triangle inequality

Here the notation (A&thinsp;·&thinsp;B) denotes the dot product of vectors A and B.

Angles
The vector product and the scalar product of two vectors define the angle between them, say θ:


 * $$\sin \theta =\frac{ \mathbf{A \times B}}{\|\mathbf A \| \|\mathbf B \|} \ \ ( -\pi < \theta \le \pi ) $$

To satisfy the right-hand rule, for positive θ, vector B is counter-clockwise from A, and for negative θ it is clockwise.
 * $$\cos \theta = \frac{ \mathbf{A \cdot B}}{\|\mathbf A \| \|\mathbf B \|} \ \ ( -\pi < \theta \le \pi )$$

Here the notation A&thinsp;×&thinsp;B denotes the vector cross product of vectors A and B. The Pythagorean trigonometric identity then provides:


 * $$ \|\mathbf{A \times B}\|^2 +(\mathbf{A \cdot B})^2 = \|\mathbf A \|^2   \|\mathbf B \|^2 $$

If a vector A = (Ax, Ay, Az) makes angles α, β, γ with an orthogonal set of x-, y- and z-axes, then:


 * $$ \cos \alpha = \frac{ A_x }{ \sqrt {A_x^2 +A_y^2 +A_z^2} } = \frac {A_x} {\| \mathbf A \|} \, $$

and analogously for angles β, γ. Consequently:
 * $$\mathbf A = \|\mathbf A \|\left( \cos \alpha \ \hat{\mathbf  i}  +  \cos \beta\  \hat{\mathbf  j} +  \cos \gamma \ \hat{\mathbf  k}  \right) \ ,$$

with $$\hat{\mathbf i}, \ \hat{\mathbf  j}, \ \hat{\mathbf  k}$$ unit vectors along the axis directions.

Areas and volumes
The area Σ of a parallelogram with sides A and B containing the angle θ is:
 * $$ \Sigma = AB \ \sin \theta \, $$

which will be recognized as the magnitude of the vector cross product of the vectors A and B lying along the sides of the parallelogram. That is:
 * $$\Sigma = \|\mathbf { A \times B } \| = \sqrt{ \|\mathbf A\|^2 \|\mathbf B\|^2 -(\mathbf{A \cdot B} )^2} \ . $$

The square of this expression is:
 * $$\Sigma^2 = (\mathbf{A \cdot A })(\mathbf{B \cdot B })-(\mathbf{A \cdot B })(\mathbf{B \cdot A })=\Gamma(\mathbf A,\ \mathbf B ) \, $$

where Γ(A, B) is the Gram determinant of A and B defined by:


 * $$\Gamma(\mathbf A,\ \mathbf B )=\begin{vmatrix} \mathbf{A\cdot A} & \mathbf{A\cdot B} \\

\mathbf{B\cdot A} & \mathbf{B\cdot B} \end{vmatrix} \. $$ In a similar fashion, the squared volume V of a parallelpiped spanned by the three vectors A, B and C is given by the Gram determinant of the three vectors:
 * $$V^2 =\Gamma ( \mathbf A ,\ \mathbf B ,\ \mathbf C ) = \begin{vmatrix} \mathbf{A\cdot A} & \mathbf{A\cdot B} & \mathbf{A\cdot C} \\\mathbf{B\cdot A} & \mathbf{B\cdot B} & \mathbf{B\cdot C}\\

\mathbf{C\cdot A} & \mathbf{C\cdot B} & \mathbf{C\cdot C} \end{vmatrix} \. $$ This process can be extended to n-dimensions.

Addition and multiplication of vectors
Some of the following algebraic relations refer to the dot product and the cross product of vectors. These relations can be found in a variety of sources, for example, see Albright. A_{x} & A_{y} & A_{z}\\ B_{x} & B_{y} & B_{z}\\ C_{x} & C_{y} & C_{z}\end{array}\right| $$; scalar triple product
 * $$ c (\mathbf{A}+\mathbf{B})=c\mathbf{A}+c\mathbf{B} $$; distributivity of multiplication by a scalar and addition
 * $$ \mathbf{A}+\mathbf{B}=\mathbf{B}+\mathbf{A} $$; commutativity of addition
 * $$ \mathbf{A}+(\mathbf{B}+\mathbf{C})=(\mathbf{A}+\mathbf{B})+\mathbf{C} $$; associativity of addition
 * $$ \mathbf{A}\cdot\mathbf{B}=\mathbf{B}\cdot\mathbf{A} $$; commutativity of scalar (dot) product
 * $$ \mathbf{A}\times\mathbf{B}=\mathbf{-B}\times\mathbf{A} $$; anticommutativity of vector cross product
 * $$ \left(\mathbf{A}+\mathbf{B}\right)\cdot\mathbf{C}=\mathbf{A}\cdot\mathbf{C}+\mathbf{B}\cdot\mathbf{C} $$; distributivity of addition wrt scalar product
 * $$ \left(\mathbf{A}+\mathbf{B}\right)\times\mathbf{C}=\mathbf{A}\times\mathbf{C}+\mathbf{B}\times\mathbf{C} $$; distributivity of addition wrt vector cross product
 * $$ \mathbf{A}\cdot\left(\mathbf{B}\times\mathbf{C}\right)=\mathbf{B}\cdot\left(\mathbf{C}\times\mathbf{A}\right)=\mathbf{C}\cdot\left(\mathbf{A}\times\mathbf{B}\right)=\left|\begin{array}{ccc}
 * $$ \mathbf{A\times}\left(\mathbf{B}\times\mathbf{C}\right)=\left(\mathbf{A}\cdot\mathbf{C}\right)\mathbf{B}-\left(\mathbf{A}\cdot\mathbf{B}\right)\mathbf{C} $$; vector triple product
 * $$ \mathbf{\left(A\times B\right)\cdot}\left(\mathbf{C}\times\mathbf{D}\right)=\left(\mathbf{A}\cdot\mathbf{C}\right)\left(\mathbf{B}\cdot\mathbf{D}\right)-\left(\mathbf{B}\cdot\mathbf{C}\right)\left(\mathbf{A}\cdot\mathbf{D}\right) $$; Binet–Cauchy identity in three dimensions
 * In particular, when A = C and B = D, the above reduces to:
 * $$\mathbf{(A \times B)^2   =    (A \cdot A) (B \cdot B)-(A \cdot B)^2 } $$; Lagrange's identity in three dimensions


 * A vector quadruple product, which is also a vector, can be defined, which satisfies the following identities:
 * $$(\mathbf{A} \times \mathbf{B}) \times (\mathbf{C} \times \mathbf{D}) = [\mathbf{A},\mathbf{B}, \mathbf{D}]\mathbf{C}-[\mathbf{A},\mathbf{B}, \mathbf{C}]\mathbf{D}=

[\mathbf{A},\mathbf{C}, \mathbf{D}]\mathbf{B}-[\mathbf{B}, \mathbf{C},\mathbf{D}]\mathbf{A}$$


 * where [A, B, C] is the scalar triple product A · (B × C).


 * Given three arbitrary vectors not in the same plane, A, B, C, any other vector D can be expressed in terms of these as:
 * $$\mathbf D = \frac{\mathbf{D \cdot (B \times C)}}{[\mathbf {A,\ B, \ C}]}\ \mathbf A +\frac{\mathbf{D \cdot (C \times A)}}{[\mathbf {A,\ B, \ C}]}\ \mathbf B + \frac{\mathbf{D \cdot (A \times B)}}{[\mathbf {A,\ B, \ C}]}\ \mathbf C \ .$$