# Vectors

These are my notes of:
These are my notes of the lectures by Denis Auroux. 18.02 Multivariable Calculus. Fall 2007. Massachusetts Institute of Technology: MIT OpenCourseWare, https://ocw.mit.edu. License: Creative Commons BY-NC-SA.

Description will use a plane $$\mathbb{R}^2$$, or space $$\mathbb{R}^3$$, but the same principles apply to higher dimensions.

Vectors are commonly displayed on the $$xyz$$-axis, with unit vectors $$\hat\imath\, \hat\jmath, \hat k$$.

Vectors do not have a start point, but do have a magnitude (length) and direction. They are described in terms of the unit vectors $$\hat\imath, \hat\jmath, \hat k$$, or using angle brackets notation.
$$\vec{A} = \hat\imath\;a_1 + \hat\jmath\;a_2 + \hat\;k a_3 = \left\langle\;a_1,\;a_2,\;a_3\;\right\rangle$$

You can find the length of a vector $$|\vec{A}|$$, by applying the pythagorean theorem twice.
$$\shaded{ |\vec{A}| = \sqrt{(a_1)^2 + (a_2)^2 + (a_3)^2} } \nonumber$$

## Rotation

Let $$\vec{A}=\left\langle a_1, a_2\right\rangle$$, and let $$\vec{A}’$$ be $$\vec{A}$$ rotated over $$\frac{\pi}{2}$$. Then
$$\shaded{ \vec{A}’=\left\langle -a_2, a_1\right\rangle } \label{eq:rotation}$$

Let $$\vec{A}=\left\langle a_1, a_2, a_3\right\rangle$$, and $$\vec{B}=\left\langle b_1, b_2, b_3\right\rangle$$. Then $$\vec{A}$$ plus $$\vec{B}$$ is defined as
$$\shaded{ \vec{A}+\vec{B} = \left\langle a_1+b_1, a_2+b_2, a_3+b_3\right\rangle } \nonumber$$

Geometric, the sum is the vector to the corner of the parallelogram.

## Scalar product

Let $$s$$ be a scalar, and $$\vec{A}=\left\langle a_1, a_2, a_3\right\rangle$$. Then the scalar product of $$s$$ and $$\vec{A}$$ is defined as
$$\shaded{ s\;\vec{A} = \left\langle s\;a_1, s\;a_2, s\;a_3\right\rangle } \nonumber$$

Geometrically, it makes the vector longer or shorter.

## Dot product

Let $$\vec{A}=\left\langle a_1, a_2, a_3\right\rangle$$, and $$\vec{B}=\left\langle b_1, b_2, b_3\right\rangle$$. The dot product of $$vec{A}$$ and $$\vec{B}$$ is defined as the scalar
$$\vec{A} \cdot \vec{B} = \sum a_i b_i = a_1 b_1 + a_2 b_2 + a_3 b_3 \nonumber$$

For a geometric interpretation, start with the dot product of $$\vec{A}$$ with itself
$$\vec{A}\cdot\vec{A} = |\vec{A}|^2 \cos 0 = |\vec{A}|^2 \label{eq:vecsquare}$$

Let $$\vec{C}=\vec{A}-\vec{B}$$, and expand $$|\vec{C}|^2$$ by applying $$\eqref{eq:vecsquare}$$
\begin{align} |\vec{C}|^2 &= \vec{C} \vec{C} = \left(\vec{A} – \vec{B} \right) \cdot \left(\vec{A} – \vec{B} \right) \nonumber \\ &= \vec{A}\cdot\vec{A} – \vec{A}\cdot\vec{B} – \vec{B}\cdot\vec{A} + \vec{B}\cdot\vec{B} \nonumber \\ &= |\vec{A}|^2 + |\vec{B}|^2 – 2 \vec{A}\cdot\vec{B} \label{eq:expanded} \end{align}

Recall, the law of cosines from geometry.

$$c^2 = a^2 b^2 – 2 a b\cos\theta \nonumber$$

Apply the law of cosines to $$|\vec{A}|$$, $$|\vec{B}|$$ and $$|\vec{C}|$$
$$|\vec{C}|^2 = |\vec{A}|^2 + |\vec{B}|^2 – 2 |\vec{A}| |\vec{B}|\cos\theta \label{eq:lawofcos}$$

Combining equations $$\eqref{eq:expanded}$$ and $$\eqref{eq:lawofcos}$$ gives the geometric equation
$$\shaded{ \vec{A}\cdot\vec{B} = |\vec{A}| |\vec{B}| \cos\theta } \nonumber$$

The dot product can be used to compute length and angles in $$\mathbb{R}^3$$, or find components of $$\vec{A}$$ along unit vector $$\hat u$$
$$\shaded{ \vec{A}\cdot \hat u } \nonumber$$

## Determinant

### In 2 dimensions

Let $$\vec{A}=\left\langle a_1, a_2\right\rangle$$ and $$\vec{B}=\left\langle b_1, b_2\right\rangle$$. The $$\mathbb{R}^2$$-determinant is defined as
\shaded{ \begin{align*} \mathrm{det}(\vec{A}, \vec{B}) &= \left|\begin{matrix} a_1 & a_2 \\ b_1 & b_2 \\ \end{matrix}\right| \\ &= a_1b_2-a_2b_1 \end{align*} } \nonumber

### In 3 dimensions

Let $$\vec{A}=\left\langle a_1, a_2, a_3\right\rangle$$, $$\vec{B}=\left\langle b_1, b_2, b_3\right\rangle$$ and $$\vec{C}=\left\langle c_1, c_2, c_3\right\rangle$$. The $$\mathbb{R}^3$$-determinant is defined as
\shaded{ \begin{align*} \mathrm{det}(\vec{A}, \vec{B}, \vec{C}) &= \left|\begin{matrix} a_1 & a_2 & a_3 \\ b_1 & b_2 & b_3 \\ c_1 & c_2 & c_3 \end{matrix}\right| \\ &= a_1\left|\begin{matrix} b_2 & b_3 \\ c_2 & c_3\end{matrix}\right| – a_2\left|\begin{matrix} b_1 & b_3 \\ c_1 & c_3\end{matrix}\right| + a_3\left|\begin{matrix} b_1 & b_2 \\ c_1 & c_2\end{matrix}\right| \end{align*} } \nonumber

### Area of a parallelogram

Let $$\vec{A}=\left\langle a_1, a_2\right\rangle$$, and $$\vec{B}=\left\langle b_1, b_2\right\rangle$$.

The area of the parallelogram shown above is calculated as width $$\times$$ height.
$$\mathrm{area}_\triangle = |\vec{A}| |\vec{B}| \sin\theta \label{eq:triangle}$$

Change from $$\sin\theta$$ to $$\cos\theta$$ so it fits the dot product.

Obtain $$\vec{A}’$$ by rotating $$\vec{A}$$ over $$\frac{\pi}{2}$$, see equation $$\eqref{eq:rotation}$$. Apply $$sin\;\theta = \cos(\tfrac{\pi}{2}-\theta)$$
$$\left. \begin{array}{l} \theta ‘ = \tfrac{\pi}{2} – \theta \\ \cos(\tfrac{\pi}{2}-\theta) = \sin\theta \end{array} \right\} \Rightarrow \cos(\theta’) = sin(\theta) \label{eq:sincos}$$

Substitute $$\eqref{eq:sincos}$$ in $$\eqref{eq:triangle}$$
$$\mathrm{area} = |\vec{A}’| \cdot |\vec{B}| \cos\theta = \tfrac{1}{2}\vec{A}’\cdot \vec{B}$$

Expand the dot product between $$\vec{A}’$$ and $$\vec{B}$$, and find the determinant
\begin{align*} \mathrm{area} &= \left\langle -a_2, a_1 \right\rangle \cdot \left\langle b_1, b_2 \right\rangle \\ &= \left( a_1 b_2 – a_2 b_1 \right) \\ &= \left|\begin{array}{cc} a_1 & a_2 \\ b_1 & b_2 \end{array}\right| \end{align*}

The area of a parallelogram follows
$$\shaded{ \mathrm{area} = \mathrm{det}\left(\vec{A},\vec{B}\right) } \label{eq:area}$$

## Cross-product

Let $$\vec{A}=\left\langle a_1, a_2, a_3\right\rangle$$, and $$\vec{B}=\left\langle b_1, b_2, b_3\right\rangle$$. The cross product of $$\vec{A}$$ and $$\vec{B}$$ in $$\mathbb{R}^3$$ is defined as the pseudo determinant vector
\shaded{ \begin{align*} \vec{A}\times\vec{B} &= \left|\begin{array}{ccc} \hat\imath & \hat\jmath & \hat k \\ a_1 & a_2 & a_3 \\ b_1 & b_2 & b_3 \end{array}\right| \\ &=\hat\imath\left|\begin{array}{cc} a_2 & a_3 \\ b_2 & b_3 \end{array}\right| – \hat\jmath\left|\begin{array}{cc} a_1 & a_3 \\ b_1 & b_3 \end{array}\right| + \hat k \left|\begin{array}{cc} a_1 & a_2 \\ b_1 & b_2 \end{array}\right| \end{align*} } \nonumber

Theorem:
– the area of the parallelogram from the vectors $$\vec{A}$$ and $$\vec{B}$$ is $$|\vec{A}\times\vec{B}|$$
– the direction of $$\vec{A}\times\vec{B}$$ is perpendicular to the plane of the parallelogram.

The direction of the vector $$|\vec{A}\times\vec{B}|$$ is determined by the right-hand rule

For example: $$\hat\imath\times\hat\jmath=\hat k$$
\begin{align*} \hat\imath\times\hat\jmath &= \left|\begin{array}{ccc} \hat\imath & \hat\jmath & \hat k \\ 1 & 0 & 0 \\ 0 & 1 & 0 \end{array}\right| \\ &=\hat\imath\left|\begin{array}{cc} 0 & 0 \\ 1 & 0 \end{array}\right| – \hat\jmath\left|\begin{array}{cc} 1 & 0 \\ 0 & 0 \end{array}\right| + \hat z \left|\begin{array}{cc} 1 & 0 \\ 0 & 1 \end{array}\right| \\ &= \hat z \end{align*}

Some properties

The right-hand rule shows that
$$\shaded{ \vec{A}\times\vec{B}=-\vec{B}\times\vec{A} }$$

The parallelogram of $$\vec{A}\times\vec{A}$$ has area zero.
$$\vec{A}\times\vec{A}=\vec{0}$$

### Volume in space

Let $$\vec{A}, \vec{B}, \vec{C}$$ in space $$\mathbb{R}^3$$.

The volume equals the area of the base times the height. The area base follows from equation $$\eqref{eq:area}$$. The height is the component of $$\vec{A}$$ that is perpendicular to the base. Call the direction perpendicular to the base unit vector $$\hat n$$.
$$\mathrm{volume} = |\vec{B}\times\vec{C}|\;(\vec{A}\cdot\hat n) \label{eq:volume1}$$

The unit vector $$\hat n$$ can be derived from the cross-product of $$\vec{B}$$ and $$\vec{C}$$. To make it a unit vector, we devide by its length.
$$\hat n = \frac{\vec{B}\times\vec{C}}{|\vec{B}\times\vec{C}|} \nonumber$$

Substitute this back in $$\eqref{eq:volume1}$$
\begin{align*} \mathrm{volume} &= \bcancel{|\vec{B}\times\vec{C}|}\;\left(\vec{A}\cdot \frac{\left(\vec{B}\times\vec{C}\right)}{\bcancel{|\vec{B}\times\vec{C}|}}\right) \\ &=\vec{A}\ \cdot\ \left(\vec{B}\times\vec{C}\right) \end{align*}

This equals the determinant of $$\vec{A}, \vec{B}, \vec{C}$$, the so called “tripple product” rule
$$\shaded{ \mathrm{det}\left(\vec{A},\vec{B},\vec{C}\right) =\vec{A}\ \cdot\ \left(\vec{B}\times\vec{C}\right) } \label{eq:tripleproduct}$$

Because
$$a_1\left|\begin{matrix} b_2 & b_3 \\ c_2 & c_3\end{matrix}\right| – a_2\left|\begin{matrix} b_1 & b_3 \\ c_1 & c_3\end{matrix}\right| + a_3\left|\begin{matrix} b_1 & b_2 \\ c_1 & c_2\end{matrix}\right| \\ = \left\langle a_1, a_2,a_3\right\rangle \cdot\ \left( \hat\imath\left|\begin{array}{cc} b_2 & b_3 \\ c_2 & c_3 \end{array}\right| – \hat\jmath\left|\begin{array}{cc} b_1 & b_3 \\ c_1 & c_3 \end{array}\right| + \hat k\left|\begin{array}{cc} b_1 & b_2 \\ c_1 & c_2 \end{array}\right| \right) \nonumber$$

The volume in space< described by $$\vec{A}$$, $$\vec{B}$$ and $$\vec{C}$$ follows as $$\shaded{ \mathrm{volume} = \mathrm{det}\left(\vec{A},\vec{B},\vec{C}\right) } \nonumber$$

### Equation of a plane from points

Find the plane that contains the points $$p$$, $$q$$ and $$r$$.

#### Solution

Consider $$\overrightarrow{qr}$$, $$\overrightarrow{qs}$$ and $$\overrightarrow{qp}$$ that form a parallelepiped. if these vectors are in the same plane, the parallelopiped will be flat. In other words, it will have no volume.

If $$p$$ is in the $$qrs$$-plane, the determinant should be $$0$$.
$$\shaded{ \mathrm{det}\left( \overrightarrow{qp}, \overrightarrow{qr}, \overrightarrow{qs} \right) = 0 } \nonumber$$
with $$q$$, $$r$$ and $$s$$ known, and $$p$$ unknown, this equation will give the expression in $$x,y,z$$ for the plane.

#### A more intuitive solution

Let a “normal vector” $$\overrightarrow n$$ be a vector perpendicular to the plane. Then $$p$$ is the plane when $$\overrightarrow{qp} \perp \overrightarrow n$$. Therefore the dot-product
$$\overrightarrow{qp}\cdot \overrightarrow{n} = 0 \label{eq:moreintuitive}$$

$$\overrightarrow{n}$$ equals $$\overrightarrow{pr} \times \overrightarrow{qs}$$. Substituting this in equation $$\eqref{eq:moreintuitive}$$
$$\overrightarrow{qp} \cdot \left( \overrightarrow{pr} \times \overrightarrow{qs} \right) = 0 \nonumber$$

Applying the trippel product equation $$\eqref{eq:tripleproduct}$$ gives the condition
$$\shaded{ \mathrm{det}\left( \overrightarrow{qp}, \overrightarrow{pr}, \overrightarrow{qs} \right) = 0 }$$
with $$q$$, $$r$$ and $$s$$ known, and $$p$$ unknown, this equation will give the expression in $$x,y,z$$ for the plane.

Embedded software developer
Passionately curious and stubbornly persistent. Enjoys to inspire and consult with others to exchange the poetry of logical ideas.

This site uses Akismet to reduce spam. Learn how your comment data is processed.