# Linear Algebra

##### Common

$$a \cdot b = a_1b_1 + a_2b_2 + a_3b_3 + ... + a_nb_n \\\quad\bullet\quad a \cdot b = |a||b|cos\theta$$

$$For\,a = \langle a_1, a_2, a_3\rangle\,and\,b = \langle b_1, b_2, b_3\rangle \rightarrow a \times b = \langle a_2b_3 - a_3b_2, a_3b_1 - a_1b_3, a_1b_2, a_2b_1\rangle \\\quad\bullet\quad \text{Only for 3D vectors}$$

Distances
$$\text{Point-Point}$$$$|\overrightarrow{PQ}|$$$$\text{* In these cases, }|\overrightarrow{v}| \text{ implies } ||\overrightarrow{v}||$$
$$\text{Point-Plane}$$$$\dfrac{|\overrightarrow{PQ}\,\cdot\,n|}{|n|}$$$$\text{P is the point, Q is some point on the plane, and n is the normal vector of that plane}$$
$$\text{Point-Line}$$$$\dfrac{|(\overrightarrow{PQ}) \times u|}{|u|}$$$$\text{P is the point and the line } \overrightarrow{r}(t) = Q + t\overrightarrow{u}$$
$$\text{Line-Line}$$$$\dfrac{|(\overrightarrow{PQ}) \cdot (u \times v)|}{|u \times v|}$$$$\overrightarrow{r}(t) = Q + t\overrightarrow{u} \quad\&\quad \overrightarrow{s}(t) = P + t\overrightarrow{v}$$
$$\text{Plane-Plane}$$$$\dfrac{|e - d|}{|n|}$$$$\text{If} \quad n \cdot x = d \quad\&\quad n \cdot x = e \quad \text{are parallel; otherwise it would be 0}$$