Vectors

Vector space: addition and scaling

A vector is an element in a vector space, which is a collection of objects supporting addition and scalar coefficients.

Vector space operations

  • is a vector when
  • is a vector when

Properties of vector operations

  • Commutativity:
  • Associativity:
  • Distributivity:
  • Zero vector:

The elements also satisfy obvious properties like: and and

Scalars Scalars (“scal-ers”) could be taken in any field, but for this class, they are just real numbers .

Components of vectors

In this class we consider vectors in the plane and vectors in space .

Vectors in the plane are ordered pairs with . Vectors in space are ordered triples with .

Addition is componentwise: Scalars act by components too: (Similarly for vectors in space.)

Standard basis vectors These special vectors have their own symbols:

Components Most often the word ‘component’ of a vector refers to one of the numbers in the ordered sequence or .

Sometimes ‘component’ refers to the basis vector scaled by this number, e.g. . Notice that we always have , which is the reason ‘component’ is sometimes used in this second way.

Other bases It is possible to select a different set of special vectors, e.g. , having the property that any vector can be written uniquely as a linear combination in the same way: . Any such set is called a basis, and the in this case are called components in the basis . This topic is considered further in Linear Algebra.

Coordinates Mathematicians say ‘components’ for the parts of a vector, and ‘coordinates’ for the quantities that are used to identify points of space. Since the spaces and are vector spaces, the tuples or actually give coordinates and vector components!

In more general curved spaces, points cannot be “added together,” so this relation between coordinates and components breaks down.

Geometric vectors

It is possible to consider vectors purely geometrically as the combined data of direction and magnitude in space. (Provided one has defined space purely geometrically, which nobody does.)

Products of vectors

Vector spaces often come with additional product operations between vectors.

Dot product

The vector space (any ) comes with an inner product, also called the dot product or scalar product. Every inner product satisfies basic rules: Algebraic properties

Component definition The dot products for and are defined using components:

Missing \begin{gather} or extra \end{gather}\mathbf{a}\cdot \mathbf{b} = \\ a_1 b_1 + a_2 b_2 + a_3 b_3 \end{gather}$$ **Norm** The dot product of a vector with itself gives a number called the (**norm** or **length** or **magnitude**) squared: - $\mathbf{u}\cdot \mathbf{u} = |\mathbf{u}|^{2} = ||\mathbf{u}||^{2}$ The terminology is justified by the Pythagorean Theorem in $\mathbb{R}^3$: ![[Attachments old packets/Pasted image 20230830203020.png|300]] ###### Exercise 03A-01 > [!note] Parallelogram identity > > Let $\mathbf{u}=(4,0,3)$ and $\mathbf{v}=(-2,1,5)$. Compute $|\mathbf{u}-\mathbf{v}|$ and $|\mathbf{u}+\mathbf{v}|$ and $|\mathbf{u}|$ and $|\mathbf{v}|$. Show that: > $$ > |\mathbf{u}+\mathbf{v}|^2 + |\mathbf{u}-\mathbf{v}|^2 = 2|\mathbf{u}|^2 + 2|\mathbf{v}|^2 > $$ **Geometry** The dot product scalar provides information about the geometric relationship of two vectors. $$\mathbf{u}\cdot \mathbf{v} = |\mathbf{u}||\mathbf{v}|\cos(\theta),$$ where $\theta$ is the angle between $\mathbf{u}$ and $\mathbf{v}$. *Proof:* The rules for dot product imply that:

|\mathbf{u}-\mathbf{v}|^{2}= (\mathbf{u}-\mathbf{v})\cdot (\mathbf{u}-\mathbf{v}) = \mathbf{u}\cdot \mathbf{u} + \mathbf{v}\cdot \mathbf{v} - 2\mathbf{u}\cdot \mathbf{v}.

|\mathbf{u}-\mathbf{v}|^{2}= |\mathbf{u}|^2 + |\mathbf{v}|^2 - 2\cos(\theta)|\mathbf{u}||\mathbf{v}|.

\mathbf{u}\cdot \mathbf{v} = \frac{1}{2}\left(|\mathbf{u}|^{2} + |\mathbf{v}|^2 - |\mathbf{u}-\mathbf{v}|^2\right)

You can't use 'macro parameter character #' in math mode The formula for $\theta$ has qualitative geometrical consequences: - If $\mathbf{u}\cdot \mathbf{v} =0$ then $\mathbf{u}$ and $\mathbf{v}$ are **orthogonal** (perpendicular) - If $\mathbf{u}\cdot \mathbf{v} >0$ then $\mathbf{u}$ and $\mathbf{v}$ form an acute angle - If $\mathbf{u}\cdot \mathbf{v} <0$ then $\mathbf{u}$ and $\mathbf{v}$ form an obtuse angle - If $\mathbf{u}\cdot \mathbf{v} = |\mathbf{u}||\mathbf{v}|$ then $\mathbf{u}$ and $\mathbf{v}$ are parallel ###### Exercise 03A-02 > [!note] Angle between vectors > > Find the angle between $(3,6,2)$ and $(4,2,4)$. ###### Exercise 03A-03 > [!note] Orthogonality by hand > > Determine which pairs of $\mathbf{u}=(2,-1,1)$ and $\mathbf{v}=(2,6,1)$ and $\mathbf{w}=(-4,1,2)$ are orthogonal. ###### Exercise 03A-04 > [!note] Acute, orthogonal, or obtuse? > > Are the angles between $\mathbf{u}=(1/2,1/2,5)$ and $\mathbf{v}=(3,1,-2)$ and $\mathbf{w}=(4,-3,0)$ obtuse or acute? ###### Exercise 03A-05 > [!note] Dot product via unit vectors > > Compute the dot product of $4 \mathbf{e_i} - 3 \mathbf{e_j}$ and $\mathbf{e_i} + 2 \mathbf{e_j} + \mathbf{e_k}$. **Unit vectors** A vector $\mathbf{u}$ with $|\mathbf{u}|=1$ is called a unit vector. For example, $\mathbf{e_i}, \mathbf{e_j}, \mathbf{e_k}$ are unit vectors. Thinking geometrically, a unit vector carries the information of *direction*. One could call them ‘direction vectors’ instead. Any vector can be **renormalized** to create a new unit vector by dividing out its length: $\mathbf{e_u}=\frac{1}{|\mathbf{u}|}\mathbf{u}$ Some texts, especially in physics, use the notation $\hat{\mathbf{u}}$ for this unit vector $\mathbf{e_u}$. **Projection** The dot product is a quantity telling how much one vector *aligns* with another. The dot product of two *unit* vectors is $\cos(\theta)$ where $\theta$ is the angle between them. One can use the dot product to find the components of a vector in the standard basis. Say $\mathbf{u}=(a_1,a_2,a_3)$ is any vector. Then:

\mathbf{u}= (\mathbf{u}\cdot \mathbf{e_i})\mathbf{e_i} + (\mathbf{u}\cdot \mathbf{e_j})\mathbf{e_j} + (\mathbf{u}\cdot \mathbf{e_k})\mathbf{e_k}

\mathbf{u}{||} = \mathbf{\text{proj}{\mathbf{v}}} (\mathbf{u}) = (\mathbf{u}\cdot \mathbf{e_v}) \mathbf{e_v} = \left(\frac{\mathbf{u}\cdot \mathbf{v}}{\mathbf{v}\cdot \mathbf{v}}\right) \mathbf{v}

\mathbf{u_{\perp}} = \mathbf{u} - \mathbf{u}_{||}

\mathbf{u_{\perp}}\cdot \mathbf{v} = \mathbf{u}\cdot \mathbf{v} - \left(\frac{\mathbf{u}\cdot \mathbf{v}}{\mathbf{v}\cdot \mathbf{v}}\right) \mathbf{v}\cdot \mathbf{v} = 0

You can't use 'macro parameter character #' in math mode ###### Exercise 03B-01 > [!note] Projection by hand > > Let $\mathbf{u}=(5,1,-3)$ and $\mathbf{v}=(4,4,2)$. > - (a) Find the projection of $\mathbf{u}$ to the direction of $\mathbf{v}$. > - (b) Write the vector $\mathbf{u}$ in terms of parts parallel and perpendicular to $\mathbf{v}$. **Cauchy-Schwarz inequality** The Cauchy-Schwarz inequality says that for any vectors $\mathbf{u}$, $\mathbf{v}$, we know:

|\mathbf{u}\cdot \mathbf{v}|\leq |\mathbf{u}||\mathbf{v}|.

You can't use 'macro parameter character #' in math mode###### Exercise 03B-02 > [!note] Cauchy-Schwarz > > Prove the Cauchy-Schwarz inequality using the angle formula. The Cauchy-Schwarz inequality is very important in math. There is a version of this inequality in many other settings where it is harder to prove. **Triangle inequality** The Triangle inequality says that for any vectors $\mathbf{u}$, $\mathbf{v}$, we know:

|\mathbf{u}+\mathbf{v}|\leq |\mathbf{u}| + |\mathbf{v}|.

You can't use 'macro parameter character #' in math mode###### Exercise 03B-03 > [!note] Cauchy-Schwarz $\Rightarrow$ Triangle > > Prove the Triangle inequality using the Cauchy-Schwarz inequality and an expansion of $|\mathbf{u}+\mathbf{v}|^2$ with the dot product. ###### Exercise 03B-04 > [!note] Orthogonality identity > > Suppose that vectors $\mathbf{u}$ and $\mathbf{v}$ satisfy $|\mathbf{u}+\mathbf{v}|^2 = |\mathbf{u}|^2 + |\mathbf{v}|^2$. Show that they must be orthogonal. ### Cross product Another product is defined for vectors in $\mathbb{R}^3$ called the **cross product**. It is also called the **vector product**. The simplest definition is in terms of components:

\mathbf{u}\times \mathbf{v} = (a_2 b_3 - a_3 b_2, - a_1 b_3 + a_3 b_1, a_1 b_2 - a_2 b_1)

\mathbf{A}\times \mathbf{B} = +(A_y B_z - A_z B_y)\mathbf{e_i} - (A_x B_z - A_z B_x)\mathbf{e_j} + (A_x B_y - A_y B_x)\mathbf{e_k}

(a_1,a_2,a_3)\times (b_1,b_2,b_3) = \begin{vmatrix} \mathbf{e_i} & \mathbf{e_j} & \mathbf{e_k} \ a_1 & a_2 & a_3 \ b_1 & b_2 & b_3 \end{vmatrix}

You can't use 'macro parameter character #' in math modeThis is a $3\times 3$ determinant. The first row of vector entries should be treated as if scalars when taking this determinant. ###### Exercise 03B-05 > [!note] Cross products by hand > > Let $\mathbf{u}=(1,-2,1)$ and $\mathbf{v}=(3,1,-2)$. Compute in coordinates: > - (a) $\mathbf{u}\times \mathbf{v}$ > - (b) $\mathbf{v}\times \mathbf{u}$ > - (c) $\mathbf{u}\times \mathbf{u}$ **Algebraic properties** The cross product is **not commutative** and **not associative**. But it does satisfy some relations: - $\mathbf{u}\times \mathbf{v} = -\mathbf{v}\times \mathbf{u}$ ( thus $\mathbf{v}\times \mathbf{v}=0$ ) - $(\lambda \mathbf{u})\times \mathbf{v}=\lambda (\mathbf{u}\times \mathbf{v})$ - $(\mathbf{u}+\mathbf{v})\times \mathbf{w} = \mathbf{u}\times \mathbf{w} + \mathbf{u}\times \mathbf{w}$ - $\mathbf{u}\cdot (\mathbf{u}\times \mathbf{v})=0$ ( thus $\mathbf{v}\cdot (\mathbf{u}\times \mathbf{v})=0$ ) - $\mathbf{u}\times \mathbf{v}=0$ implies $\mathbf{u}=\lambda \mathbf{v}$ for some $\lambda$ **Geometry** The *norm* of the cross product satisfies an angle formula analogous to that of the dot product:

|\mathbf{u}\times \mathbf{v}| = |\mathbf{u}| |\mathbf{v}| \sin(\theta)

You can't use 'macro parameter character #' in math modeThe *direction* of the cross product is *perpendicular* to the plane spanned by $\mathbf{u},\,\mathbf{v}$ and it creates a *right-handed system* when combined with $\mathbf{u},\,\mathbf{v}$. ![[Attachments old packets/Pasted image 20230901103048.png|200]] I.e. $(\mathbf{u},\mathbf{v},\mathbf{u}\times \mathbf{v})$ is right-handed. The *norm* of the cross product $\mathbf{u}\times \mathbf{v}$ is also the *area of the parallelogram* formed by $\mathbf{u},\,\mathbf{v}$. ###### Exercise 03B-06 > [!note] Cross product $\leadsto$ left-handed system > > Use the cross product to find a *unit vector* $\mathbf{v}$ that is perpendicular to both $\mathbf{a}=(1,-4,1)$ and $\mathbf{b}=(2,3,0)$ such that the triple $(\mathbf{a},\mathbf{v},\mathbf{b})$ forms a *left-handed* system. **Unit vectors** $$\begin{align} \begin{matrix} \mathbf{e_i}\times \mathbf{e_j}&=\mathbf{e_k} \\ \mathbf{e_j}\times \mathbf{e_k}&=\mathbf{e_i} \\ \mathbf{e_k}\times \mathbf{e_i}&=\mathbf{e_j} \end{matrix} \end{align}$$ These products are right-handed. Left-handed products include a minus sign, such as $\mathbf{e_i}\times \mathbf{e_k}=-\mathbf{e_j}$. ###### Exercise 03B-07 > [!note] Cross product via unit vectors > > Compute the cross product of $4 \mathbf{e_i} - 3 \mathbf{e_j}$ and $\mathbf{e_i} + 2 \mathbf{e_j} + \mathbf{e_k}$ using the unit vector cross products. **Dot-cross norm identity** The dot product and *norm* of cross product satisfy a simple relationship:

|\mathbf{u}\times \mathbf{v}|^2 + (\mathbf{u}\cdot \mathbf{v})^2= |\mathbf{u}|^2 |\mathbf{v}|

You can't use 'macro parameter character #' in math modeThis identity follows quickly from the angle formulas for dot and cross products. ### Triple products There are some general facts about products taken with three or more vectors. **Dot-cross triple product** Given vectors $\mathbf{u}=(a_1,a_2,a_3)$, $\mathbf{v}=(b_1,b_2,b_3)$, $\mathbf{w}=(c_1,c_2,c_3)$, consider the scalar quantity $\mathbf{u}\cdot (\mathbf{v}\times \mathbf{w})$. By combining the effect of the dot product with the determinant formula, we have a determinant formula for this scalar:

\mathbf{u}\cdot (\mathbf{v}\times \mathbf{w}) = \begin{vmatrix} a_1 & a_2 & a_3 \ b_1 & b_2 & b_3 \ c_1 & c_2 & c_3 \end{vmatrix}

\begin{align} \mathbf{u}\cdot (\mathbf{v}\times \mathbf{w}) &= \mathbf{v}\cdot (\mathbf{w}\times \mathbf{u}) = \mathbf{w}\cdot (\mathbf{u}\times \mathbf{v}) \ =-\mathbf{u}\cdot (\mathbf{w}\times \mathbf{v}) &= -\mathbf{w}\cdot (\mathbf{v}\times \mathbf{u}) = -\mathbf{v}\cdot (\mathbf{u}\times \mathbf{w}) \end{align}

\mathbf{a}\times (\mathbf{b}\times \mathbf{c}) = \mathbf{b}(\mathbf{a}\cdot \mathbf{c}) - \mathbf{c}(\mathbf{a}\cdot \mathbf{b})

You can't use 'macro parameter character #' in math modeThe abnormal order on the right (vector then scalar coefficient) facilitates a famous mnemonic: “Bac–Cab”. $$\begin{gather} \mathbf{a}\times (\mathbf{b}\times \mathbf{c}) = \\ \mathbf{b}(\mathbf{a}\cdot \mathbf{c}) - \mathbf{c}(\mathbf{a}\cdot \mathbf{b}) \end{gather}$$ ###### Exercise 03B-08 > [!note] Jacobi identity > > Use the Lagrange triple product identity to prove the **Jacobi identity**: > $$ > \mathbf{a}\times (\mathbf{b}\times \mathbf{c}) + \mathbf{b}\times (\mathbf{c}\times \mathbf{a}) + \mathbf{c}\times (\mathbf{a}\times \mathbf{b}) = 0 > $$ > [!info] Non-associativity > > While the cross product is not associative, the difference has a simple expression using the dot product: > $$ > (\mathbf{a}\times \mathbf{b})\times \mathbf{c} = \mathbf{a}\times (\mathbf{b}\times \mathbf{c}) \qquad+ (\mathbf{a}\cdot \mathbf{b})\mathbf{c} - \mathbf{a}(\mathbf{b}\cdot \mathbf{c}) > $$ > This identity can be proved using the Lagrange triple product identity. $$\begin{gather} (\mathbf{a}\times \mathbf{b})\times \mathbf{c} \\ \neq \mathbf{a}\times (\mathbf{b}\times \mathbf{c}) \end{gather}$$ ## Geometric applications of vectors ### Lines and planes **Lines** Given a point identified with a vector $\mathbf{r_0}$ and a direction vector $\mathbf{v}$, the line through $\mathbf{r_0}$ in direction $\mathbf{v}$ is given parametrically by the formula:

\mathbf{r}(t) = \mathbf{r}_0 + t \mathbf{v}

\mathbf{r}(t) = (1-t)\mathbf{r}_0 + t\mathbf{r}_1

ax+by+cz+d=0

(\mathbf{r}-\mathbf{r}_0)\cdot \mathbf{n} = 0

a(x-x_0) + b(y-y_0) + c(z-z_0) = 0

You can't use 'macro parameter character #' in math modeThis equation implies that the $a$, $b$, $c$ in the linear equation of the plane are just the components of its normal vector $\mathbf{n}$. ###### Exercise 03C-01 > [!note] Vector plane from scalar plane > > Find the vector equation of a plane with scalar equation $7x-4y+2z+10=0$. ###### Exercise 03C-02 > [!note] Scalar plane from vector plane > > Find the scalar equation of a plane passing through $\mathbf{r}_0 = (3,1,0)$ and with normal vector $\mathbf{n}=(3,2,-5)$. (Start with the vector form.) ###### Exercise 03C-03 > [!note] Line and plane intersection > > Find the point at which the plane $3x-9y+2z-7=0$ and the line $\mathbf{r}(t)=(1,2,1)+t(-2,0,1)$ intersect. ###### Exercise 03C-04 > [!note] Angle between planes > > Find a formula for the angle formed between two planes. Use this formula to find the angle between the planes passing through $(0,0,0)$ with normal vectors $\mathbf{n}_1=(1,2,1)$ and $\mathbf{n}_2=(4,1,3)$, respectively. ### Distances **Point to point** The distance between $\mathbf{p}$ and $\mathbf{q}$ (more accurately, between the point identified by $\mathbf{p}$ and that identified by $\mathbf{q}$) is $|\mathbf{p}-\mathbf{q}|$. **Point to line** The vector $\mathbf{u}$ from a point $\mathbf{p}$ to a line $\mathbf{r}(t)=\mathbf{r}_0-t \mathbf{v}$, namely to the point on the line closest to $\mathbf{p}$, is given by taking the vector from $\mathbf{p}$ to $\mathbf{r}_0$ and removing the component parallel to $\mathbf{v}$:

\mathbf{u} = (\mathbf{r}_0-\mathbf{p}) - ((\mathbf{r}_0-\mathbf{p})\cdot \mathbf{e_v}) \mathbf{e_v}

\mathbf{u} = \big((\mathbf{p}-\mathbf{r}_0)\cdot \mathbf{e_n}\big) \mathbf{e_n}

|\mathbf{u}|=|(\mathbf{p}-\mathbf{r}_0)\cdot \mathbf{e_n}|=(\mathbf{p}-\mathbf{r}_0)\cdot \frac{\mathbf{n}}{|\mathbf{n}|}

You can't use 'macro parameter character #' in math mode **Plane to plane** ###### Exercise 03C-05 > [!note] Distance between parallel planes > > Find the distance from the plane given by $15x+3y-3z-10=0$ to the parallel plane given by $5x+y-z-3=0$. ## Quaternions \[Optional material.\] One can combine 3d vectors and 1d scalers into 4d quantities called **quaternions**, and written $\mathbb{H}$. Quaternions can be added and multiplied and divided. Quaternions have real number coefficients for each of four basic units:

a + b \mathbf{i} + c \mathbf{j} + d \mathbf{k}

\mathbf{i}^2 = \mathbf{j}^2 = \mathbf{k}^2 = -1

\frac{1}{a+b \mathbf{i} + c \mathbf{j} + d \mathbf{k}}=\frac{a-b \mathbf{i} - c \mathbf{j} - d \mathbf{k}}{a^2+b^2+c^2+d^2}

Misplaced & ![[Attachments old packets/Pasted image 20230901153733.png|300]] <p style="page-break-after: always;">&nbsp;</p> <p style="page-break-before: always;">&nbsp;</p> ## Problems due 13 Sep 2023, 8:00pm ##### Problem 03-01 > [!question] Planes intersection line, parametric > > Find a parametric equation for the line formed as the intersection of the two planes $6x-3y+z-5=0$ and $-x+y+5z-5=0$. What is the angle between these planes? ##### Problem 03-02 > [!question] Plane perpendicular, two scalar planes > > Find a plane that is perpendicular to the two planes given by $x+y-3=0$ and $x+2y-z-4=0$, respectively. ##### Problem 03-03 > [!question] Distance point to line > > Compute the distance from the point $\mathbf{p}=(1,5,-2)$ to the line given by $\mathbf{r}(t)=(-2,3,1)+t(4,0,-1)$. > > Repeat the problem for $\mathbf{p}=(-2,1,3)$ and $\mathbf{r}(t)=(1,2,0)+t(-1,1,-2)$. ##### $\bigstar$ Problem 03-04 > [!question] Distance between skew lines > > Find a general formula for the distance between two *skew* lines, i.e. lines in space which are not parallel and do not intersect. (Assume they are given parametrically in vector form.) > [!question] More $\bigstar$ problems > > Also do 6 exercises from List A and 7 exercises from List B.