# This Quantum World/Appendix/Vectors
### Vectors (spatial)

A vector is a quantity that has both a magnitude and a direction. Vectors can be visualized as arrows. The following figure shows what we mean by the components $(a_{x},a_{y},a_{z})$ of a vector $\mathbf {a} .$
The sum $\mathbf {a} +\mathbf {b}$ of two vectors has the components $(a_{x}+b_{x},a_{y}+b_{y},a_{z}+b_{z}).$
* Explain the addition of vectors in terms of arrows.
The dot product of two vectors is the number
    $\mathbf {a} \cdot \mathbf {b} =a_{x}b_{x}+a_{y}b_{y}+a_{z}b_{z}.$
Its importance arises from the fact that it is invariant under rotations. To see this, we calculate
    $(\mathbf {a} +\mathbf {b} )\cdot (\mathbf {a} +\mathbf {b} )=(a_{x}+b_{x})^{2}+(a_{y}+b_{y})^{2}+(a_{z}+b_{z})^{2}=$
    $a_{x}^{2}+a_{y}^{2}+a_{z}^{2}+b_{x}^{2}+b_{y}^{2}+b_{z}^{2}+2\,(a_{x}b_{x}+a_{y}b_{y}+a_{z}b_{z})=\mathbf {a} \cdot \mathbf {a} +\mathbf {b} \cdot \mathbf {b} +2\,\mathbf {a} \cdot \mathbf {b} .$
According to Pythagoras, the magnitude of $\mathbf {a}$ is $a={\sqrt {a_{x}^{2}+a_{y}^{2}+a_{z}^{2}}}.$ If we use a different coordinate system, the components of $\mathbf {a}$ will be different: $(a_{x},a_{y},a_{z})\rightarrow (a'_{x},a'_{y},a'_{z}).$ But if the new system of axes differs only by a rotation and/or translation of the axes, the magnitude of $\mathbf {a}$ will remain the same:
    ${\sqrt {a_{x}^{2}+a_{y}^{2}+a_{z}^{2}}}={\sqrt {(a'_{x})^{2}+(a'_{y})^{2}+(a'_{z})^{2}}}.$
The squared magnitudes $\mathbf {a} \cdot \mathbf {a} ,$ $\mathbf {b} \cdot \mathbf {b} ,$ and $(\mathbf {a} +\mathbf {b} )\cdot (\mathbf {a} +\mathbf {b} )$ are invariant under rotations, and so, therefore, is the product $\mathbf {a} \cdot \mathbf {b} .$
* Show that the dot product is also invariant under translations.
Since by a scalar we mean a number that is invariant under certain transformations (in this case rotations and/or translations of the coordinate axes), the dot product is also known as (a) scalar product. Let us prove that
    $\mathbf {a} \cdot \mathbf {b} =ab\cos \theta ,$
where $\theta$ is the angle between $\mathbf {a}$ and $\mathbf {b} .$ To do so, we pick a coordinate system ${\mathcal {F}}$ in which $\mathbf {a} =(a,0,0).$ In this coordinate system $\mathbf {a} \cdot \mathbf {b} =ab_{x}$ with $b_{x}=b\cos \theta .$ Since $\mathbf {a} \cdot \mathbf {b}$ is a scalar, and since scalars are invariant under rotations and translations, the result $\mathbf {a} \cdot \mathbf {b} =ab\cos \theta$ (which makes no reference to any particular frame) holds in all frames that are rotated and/or translated relative to ${\mathcal {F}}.$
We now introduce the unit vectors $\mathbf {\hat {x}} ,\mathbf {\hat {y}} ,\mathbf {\hat {z}} ,$ whose directions are defined by the coordinate axes. They are said to form an orthonormal basis. Ortho because they are mutually orthogonal:
    $\mathbf {\hat {x}} \cdot \mathbf {\hat {y}} =\mathbf {\hat {x}} \cdot \mathbf {\hat {z}} =\mathbf {\hat {y}} \cdot \mathbf {\hat {z}} =0.$
Normal because they are unit vectors:
    $\mathbf {\hat {x}} \cdot \mathbf {\hat {x}} =\mathbf {\hat {y}} \cdot \mathbf {\hat {y}} =\mathbf {\hat {z}} \cdot \mathbf {\hat {z}} =1.$
And basis because every vector $\mathbf {v}$ can be written as a linear combination of these three vectors — that is, a sum in which each basis vector appears once, multiplied by the corresponding component of $\mathbf {v}$ (which may be 0):
    $\mathbf {v} =v_{x}\mathbf {\hat {x}} +v_{y}\mathbf {\hat {y}} +v_{z}\mathbf {\hat {z}} .$
It is readily seen that $v_{x}=\mathbf {\hat {x}} \cdot \mathbf {v} ,$ $v_{y}=\mathbf {\hat {y}} \cdot \mathbf {v} ,$ $v_{z}=\mathbf {\hat {z}} \cdot \mathbf {v} ,$ which is why we have that
    $\mathbf {v} =\mathbf {\hat {x}} \,(\mathbf {\hat {x}} \cdot \mathbf {v} )+\mathbf {\hat {y}} \,(\mathbf {\hat {y}} \cdot \mathbf {v} )+\mathbf {\hat {z}} \,(\mathbf {\hat {z}} \cdot \mathbf {v} ).$
Another definition that is useful (albeit only in a 3-dimensional space) is the cross product of two vectors:
    $\mathbf {a} \times \mathbf {b} =(a_{y}b_{z}-a_{z}b_{y})\,\mathbf {\hat {x}} +(a_{z}b_{x}-a_{x}b_{z})\,\mathbf {\hat {y}} +(a_{x}b_{y}-a_{y}b_{x})\,\mathbf {\hat {z}} .$
* Show that the cross product is antisymmetric: $\mathbf {a} \times \mathbf {b} =-\mathbf {b} \times \mathbf {a} .$
As a consequence, $\mathbf {a} \times \mathbf {a} =0.$
* Show that $\mathbf {a} \cdot (\mathbf {a} \times \mathbf {b} )=\mathbf {b} \cdot (\mathbf {a} \times \mathbf {b} )=0.$
Thus $\mathbf {a} \times \mathbf {b}$ is perpendicular to both $\mathbf {a}$ and $\mathbf {b} .$
* Show that the magnitude of $\mathbf {a} \times \mathbf {b}$ equals $ab\sin \alpha ,$ where $\alpha$ is the angle between $\mathbf {a}$ and $\mathbf {b} .$ Hint: use a coordinate system in which $\mathbf {a} =(a,0,0)$ and $\mathbf {b} =(b\cos \alpha ,b\sin \alpha ,0).$
Since $ab\sin \alpha$ is also the area $A$ of the parallelogram $P$ spanned by $\mathbf {a}$ and $\mathbf {b} ,$ we can think of $\mathbf {a} \times \mathbf {b}$ as a vector of magnitude $A$ perpendicular to $P.$ Since the cross product yields a vector, it is also known as vector product.
(We save ourselves the trouble of showing that the cross product is invariant under translations and rotations of the coordinate axes, as is required of a vector. Let us however note in passing that if $\mathbf {a}$ and $\mathbf {b}$ are polar vectors, then $\mathbf {a} \times \mathbf {b}$ is an axial vector. Under a reflection (for instance, the inversion of a coordinate axis) an ordinary (or polar) vector is invariant, whereas an axial vector changes its sign.)
Here is a useful relation involving both scalar and vector products:
    $\mathbf {a} \times (\mathbf {b} \times \mathbf {c} )=\mathbf {b} (\mathbf {c} \cdot \mathbf {a} )-(\mathbf {a} \cdot \mathbf {b} )\mathbf {c} .$