12: Vectors and Geometry of Space

12.1 3D Coordinate Systems #

  • Right hand rule: Index point to .$x$, thumb to .$z$, and write through .$y$
  • If you have point .$P(a,b,c)$ and drop a perpendicular dot on the .$xy$-plane at .$a,b,0$, you now have a projection of .$P$ onto the .$xy$-plane
  • The distance .$|P_1 P_2|$ between two points .$P_1(x_1, y_1, z_1)$ and .$P_2(x_2, y_2, z_2)$ is $$|P_1 P_2| = \sqrt{(x_2-x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$
  • We can define the equation for a sphere with a center at .$C(h,k,l)$ and radius .$r$ as $$(x-h)^2 + (y-k)^2 + (z-l)^2 = r^2$$

12.2 Vectors #

  • Written as .$\vec{AB}$
  • Has initial point .$A$ at the tail and the a terminal point .$B$ at the tip
    • If the initial point .$A$ is at .$(x_1, y_1, z_1)$ and terminal point .$B$ is at .$(x_2, y_2, z_2)$, then we can write .$\vec{AB} = \langle x_2 - x_1, y_2 - y_1, z_2 - z_1\rangle$
  • Vectors with the same length/magnitude are called equivalent or equal, despite not necessarily having the same initial/termination points
  • Vector addition (order doesn’t matter) $$ \vec{AC} = \vec{AB} + \vec{BC} = \vec{BC} + \vec{AB}$$ $$ \vec{u} - \vec{v} = \vec{u} + (- \vec{v})$$ $$ \vec{a} + (\vec b + \vec c) = (\vec a + \vec b) + \vec c$$
  • Vector multiplication
    • Given scalar .$c$ and vector .$\vec{v}$, .$c\cdot\vec{v}$ is like .$\vec{v}$ but with length changed by a factor of .$\Vert c\Vert$
    • If .$c<0$, then the vector is flipped around
    • $$c\cdot\vec{v} = \langle cv_x, cv_y, cv_z\rangle$$
  • Magnitude for .$\vec{a} = \langle a_x, a_y, a_z \rangle$:
    • $$ \Vert \vec{a} \Vert = \sqrt{a_x^2 + a_y^2 + a_z^3}$$
  • Unit vector
    • Has length of one
    • If .$\vec a \neq 0$ then the unit vector .$\vec u$ in the same direction as .$\vec a$ is:
      • $$\vec u = \frac{\vec a}{\Vert \vec a \Vert} = \frac{1}{\Vert \vec a \Vert} \vec a$$
      • Notice that .$\frac{1}{\Vert \vec a \Vert}$ is a scalar

12.3 Dot Product #

  • The dot product measures the extent which two vectors are parallel to one another
    • Two vectors are perpendicular/orthogonal .$\perp$ (.$90^\circ$ from one another) iff the dot product is 0
  • .$\vec{a} \cdot \vec{b}$ is the length of .$\vec{a}$ times the scalar projection of .$\vec{b}$ onto .$\vec{a}$
  • Notice that the dot product gives a scalar

$$\langle a_1, a_2, a_3 \rangle \cdot \langle b_1, b_2, b_3 \rangle = a_1b_1 + a_2b_2 + a_3b_3$$

$$\vec{a} \cdot (\vec{b} + \vec{c}) = \vec{a} \cdot \vec{b} + \vec{a}\cdot \vec{c}$$ $$ \vec a \cdot \vec a = \Vert \vec a \Vert ^2$$ $$ \vec a \cdot \vec b = \vec b \cdot \vec a $$ $$ (c \vec a) \cdot \vec b = c (\vec a \cdot \vec b) = \vec a \cdot (c \vec b)$$

$$\vec{a} \cdot \vec{b} = \Vert\vec{a}\Vert\ \Vert\vec{b}\Vert \cos \theta$$ $$\Vert\vec{a} - \vec{b} \Vert^2 = \Vert\vec{a}\Vert^2+\Vert\vec{b}\Vert^2 - 2\Vert\vec{a}\Vert\Vert\vec{b}\Vert \cos\theta\ $$ $$… = \Vert\vec{a}\Vert\ \Vert\vec{b}\Vert \cos \theta$$ $$\cos\theta = \frac{\vec{a} \cdot \vec{b}}{\Vert\vec{a}\Vert\ \Vert\vec{b}\Vert}$$

$$\cos \theta = \frac{\vec a}{\Vert \vec a \Vert} \cdot \frac{\vec b}{\Vert \vec b \Vert} \Longrightarrow \cos^{-1}\bigg(\frac{\vec a}{\Vert \vec a \Vert} \cdot \frac{\vec b}{\Vert \vec b \Vert} \bigg) = \theta $$ Dot Product

Direction Vectors #

  • The direction angles of a nonzero vector .$\vec a$ are the .$\alpha, \beta, \gamma$ that a makes with the positive .$x,y,z$-axes respectively $$\cos\alpha = \frac{\vec a \cdot \vec i}{\Vert \vec a \Vert \Vert \vec i \Vert} = \frac{a_1}{\Vert \vec a \Vert}$$ $$\vec a = \Vert \vec a \Vert \langle \cos \alpha, \cos \beta, \cos \gamma \rangle$$

Projections #

  • Scalar projection of .$\vec{b}$ onto .$\vec{a}$: $$\text{comp}_\vec{a}\vec{b} = \frac{\vec{a}\cdot\vec{b}}{\Vert\vec{a}\Vert}$$
  • Vector projection of .$\vec{b}$ onto .$\vec{a}$: $$\text{proj}_\vec{a}\vec{b} = \bigg(\frac{\vec{a}\cdot\vec{b}}{\Vert\vec{a}\Vert}\bigg)\frac{\vec{a}}{\Vert\vec{a}\Vert} = \frac{\vec{a}\cdot\vec{b}}{\Vert\vec{a}\Vert^2}\vec{a}$$ Dot Product

12.4 Cross Product #

  • The cross product measures how orthogonal two vectors are
    • Therefore, .$(\vec a \times \vec b) \cdot \vec b = 0$ because measures how similar (close to .$0^\circ$) two vectors are and cross product outputs a vector orthogonal (.$90^\circ$ to both .$\vec a, \vec b$)
    • Two nonzero vectors are only parallel iff their cross product is zero
    • The magnitude is also the area of a parallelogram formed by the two vectors
      • We can find the volume of the 3D parallelogram formed by three vectors with the following equation: $$\vec a \cdot (\vec b \times \vec c) = (\vec a \times \vec b) \cdot \vec c$$ 3D Parallelogram
  • Notice that the cross product gives a vector that is orthogonal to both original vectors
    • Direction is determined with the right-hand rule
  • We can also calculate the determinant with the unit vectors .$\langle \hat i, \hat j, \hat k \rangle$to find the cross product $$\langle a_1, a_2, a_3 \rangle \times \langle b_1, b_2, b_3 \rangle = \langle a_2b_3 - a_3 b_2, -(a1_b3 - a_3 b_1), a_1b_2 - a_2 b_1 \rangle$$ $$\vec a \times \vec b = \Vert \vec a \Vert \Vert \vec b \Vert \sin\theta$$ $$(\vec a \times \vec b) \times \vec c \neq \vec a \times (\vec b \times \vec c) \Longrightarrow \vec a \times (\vec b \times \vec c) = (\vec a \cdot \vec c) \vec b - (\vec a \cdot \vec b ) \vec c$$

    $$\vec a \times \vec b \neq \vec b \times \vec b \Longrightarrow \vec a \times \vec b = - \vec b \times \vec a$$ $$(c \vec a) \times \vec b = c(\vec a \times \vec b) = \vec a \times (c \vec b)$$

    $$\vec a \times (\vec b + \vec c) = \vec a \times \vec b + \vec a \times \vec c$$ $$(\vec a + \vec b) \times \vec c = \vec a \times \vec c + \vec b \times \vec c$$

    $$\Vert \vec a \times \vec b \Vert ^2 = \Vert \vec a \Vert^2 \Vert \vec b \Vert^2 - (\vec a \cdot \vec b)^2 = \Vert \vec a \Vert^2 \Vert \vec b \Vert^2 \sin^2 \theta$$ $$… \Longrightarrow \Vert \vec a \times \vec b \Vert \Vert \vec a \Vert \Vert \vec b \Vert \sin \theta$$