A Euclidian vector is some quantity that has magnitude and direction. Vectors are often described in contrast to _scalar_ (plain old) quantities which only have a magnitude. Many scalar quantities in real-world applications have a vector equivalent. eg _velocity_ is the vector equivalent of speed and also encodes the direction of travel, _displacement_ is the vector equivalent of distance and so on. Typically a given vector can be expressed in two coordinate systems - in _component_ or rectangular form (where the coordinates look like $(x,y)$ or $(x,y,z)$ coordinates for standard 2-D or 3-D systems or _polar_ form where the coordinates are the magnitude and direction specifically. These are sometimes written as something like $100 \angle 25\degree$ but are also sometimes encoded in text eg "A ship travels East at a speed of 10 knots". In that second case the velocity of the ship is a vector which in rectangular coordinates would be $(100,0)$. ## Quick note about bearings You will sometimes come across problems where vector angles are expressed in terms of _bearings_ and it is important to know how to deal with these. A bearing is conventionally measured in terms of an angle in $[0\degree, 360\degree)$ measured _clockwise_ from due North. This is obviously very different from the normal way of measuring angles in coordinate geometry (anticlockwise starting with the positive $x$ axis) so read any question carefully and if given a question with bearings, make sure you make a diagram and convert bearings to angles before proceeding. Make sure also to check the output format required by the question to ensure you convert any angles back to bearings if needed. # Position and vectors Implicit in the idea of a vector having magnitude and direction is that it doesn't have any other significant attributes (eg position). Two vectors with the same magnitude and direction are generally equivalent and likewise it is generally possible to move a vector from one place to another in the space if that is convenient when thinking about a problem geometrically without affecting the result. The exception to this is the notion of _position vectors_. Given some cartesian space and a point $P$, the position vector of $P$ (often written $\overrightarrow{OP}$ or equivalently $\mathbf{p}$) is the vector from the origin to point $P$. It will therefore have components $p_x\mathbf{i} + p_y\mathbf{j}$ in the two-dimensional case. In [LibreTexts](https://math.libretexts.org/Bookshelves/Calculus/Supplemental_Modules_(Calculus)/Vector_Calculus/1%3A_Vector_Basics/1.1%3A_Vectors) they describe a vector as the equivalence class of directed line segments having the same length and direction, which encapsulates this idea quite neatly. I think this is why the $\hat{i}$ and $\hat{j}$ components are useful - they are independent of the starting $x$ and $y$ coordinates and thus encapsulate the idea that the $\Delta x$ and $\Delta y$ for a given vector will be the same no matter where you choose to place its tail. ## Vector notation and Latex In handwritten maths it is conventional to underline the name of vector variables to distinguish them from scalars. In typeset maths they are frequently boldface, or have an arrow above. ie: $ \begin{align*} \mathbf{v} &= \text{some vector} \\ s &= \text{some scalar} \\ \overrightarrow{AB} &= \text{some vector from point $A$ to point $B$}\\ \widehat{\mathbf{w}} &= \text{a unit vector (ie $|\widehat{\mathbf{w}}|=1$)} \end{align*} $ These are written `\mathbf{v}` and `\overrightarrow{AB}` respectively. The arrow notation is especially used to denote position vectors or displacement between points in the plane. Note there is a `\vec` macro in latex which should be the same as `\overrightarrow` but kind of isn't because for some baffling reason they made the arrow too short. Observe $\vec{v}$ and $\vec{AB}$, which look a bit sad next to $\overrightarrow{v}$ and $\overrightarrow{AB}$. `\overrightarrow` is pretty much mandatory for nice-looking multi-letter position vector names. Also if a hat on a unit vector looks a bit sad, `\widehat` is what you want. The vectors themselves are often written as a column matrix using either square brackets or round parentheses, as follows: $ \begin{align*} \mathbf{v} &= \begin{pmatrix} v_1 \\ v_2 \\ \vdots \\v_n\end{pmatrix} \end{align*} $ To write this in latex, your components need to be surrounded by a `\begin{pmatrix}`..`\end{pmatrix}` block (substitute `bmatrix` if you want square brackets). Note also that it is conventional to label the components using a subscript after the vector name. In vectors of arbitrary dimensions, $n$ refers to the number of dimensions in the vector and often (as above) `\vdots` comes in handy to indicate "add the rest of the rows in here". If you want to typeset a vector which contains numeric values which are signed, it is sometimes necessary to abandon the simple `pmatrix` and `bmatrix` way if the alignment is being annoying and use an `array` environment instead, in which case you have to add whatever brackets you want in yourself using `left(` or `left[` etc. This allows you to align the columns of the array individually, which can be considerably more pleasing depending on the components of the vector. People (seems mainly an American thing but I could be wrong) also sometimes write vector coordinates using angle brackets. i.e. $\mathbf{v} = \langle v_1, v_2\rangle$ If you find yourself wanting to do this, you need `\langle` and `\rangle`. Don't be lazy and just use `<` and `>`. Your vector will look bad and none of the cool mathematicians will want to be your friend. (You may think that doesn’t matter since there aren’t any cool mathematicians anyway, idk.) Special mention to the notation $\hat{a}$ and $\widehat{AB}$ (written `\hat{a}` or `\widehat{AB}`), which denotes a "unit vector" (i.e. a vector of magnitude 1). There are special unit vectors called _basis vectors_ parallel to the axes, which are conventionally denoted $\hat{i}$, $\hat{j}$, and $\hat{k}$ for the basis vectors parallel with the $x$, $y$, and $z$-axes respectively. Vectors are frequently written in "component form" with the coordinates given as multiples of these basis vectors. Ie $\mathbf{v} = 3\mathbf{i} + 2\mathbf{j} -5\mathbf{k}$ is equivalent to $\mathbf{v} = \left[ \begin{array}{r}3\\ 2\\ -5\\\end{array}\right]$ or $\mathbf{v} = \langle3, 2, -5\rangle.$ I have seen some people write vectors with a bar above them instead of an underline (ie $\bar{v}$). This doesn't seem ideal as it could presumably be confused with an undirected line segment or the mean of a variable. Additionally the same people denote the basis vectors as $\hat{e}_x$, $\hat{e}_y$, and $\hat{e}_z$. So if you see that, you know what it is. This may be a continental Europe thing because the guy I saw doing it was Belgian or something. ## Arithmetic operations on vectors Distributive, commutative, associative etc properties apply to vectors. Vectors can be added, subtracted, multiplied or divided by a scalar value. There are two (or three) different vector products but there is no such thing as vector division. ## vector addition and subtraction Geometrically, if you imagine vectors as arrows, then one way of thinking about the process of adding vectors involves travelling along the first vector and then placing the second vector on the tip of the first. The _resultant_ vector after the addition will be the vector from the tail of the first arrow to the tip of the second arrow. Alternatively you can construct the equivalent parallelogram. Subtracting vectors is just adding the negative of the second vector, which is the vector with the same magnitude and opposite direction. Mathematically, how addition is performed is by adding the components of the vectors. So if we have $\mathbf{u}$ with components $(x_1, y_1)$ and $\mathbf{v}$, with components $(x_2, y_2)$, then the resultant vector $\mathbf{u} + \mathbf{v}$ has components $(x_1 + x_2, y_1+ y_2)$. If the vectors are in polar form then it is helpful to remember that the x and y coordinates of a point on the circumference of a circle of radius $r$ that subtends an angle $\theta$ with the positive $x$-axis are $(r\cos \theta, r\sin\theta)$. You just need to do the normal trig stuff with reference angles etc if your $\theta$ isn't in QI. So the resultant of $30\angle 30\degree - 20 \angle 45\degree$ is going to be $\begin{pmatrix}30 \cos 30\degree - 20 \cos 45 \degree \\ 30 \sin 30\degree -20 \sin 45\degree\end{pmatrix}$. ## Important formulas for vectors ### To convert a magnitude at a given angle to components ...in coordinates $ \begin{align*} \mathbf{v} = \begin{pmatrix}|\mathbf{v}| \cos \theta \\|\mathbf{v}| \sin \theta \end{pmatrix} \end{align*} $ ...in component form $ \begin{align*} \mathbf{v} = |\mathbf{v}| \cos \theta \mathbf{i} + |\mathbf{v}| \sin \theta \mathbf{j} \end{align*} $ ### to find the magnitude of a vector This is also known as the "L2 Norm" (or just "Norm") of the vector, and we just use Pythagoras' theorem to give the Euclidian distance. i.e. $||\mathbf{v}|| = \sqrt{v_1^2 + v_2^2 + \cdots + v_n^2}$ This is the `ABS` function on a complex number or vector on an HP calculator. ### to find the angle This is also known as the "argument" of the vector. This is the `ARG` function on a complex number on an HP35s calculator. Given a vector $\mathbf{v} = v_1\mathbf{i} + v_2\mathbf{j}$ the angle formed by $\mathbf{v}$ with the positive $x$-axis is $\theta = \tan^{-1}\left( \frac{v_2}{v_1}\right).$ Often in real problems a diagram will help as you will frequently need to use a bit of basic geometry to ensure you are answering correctly. Sometimes the actual angle you need to return will be $180\degree - \theta$ or some combination of given angles in the question based on the result above. ### unit vector The unit vector of a given vector is simply the vector with the same direction but of magnitude 1. Therefore given a vector $\mathbf{v}$, the unit vector is $\widehat{u_v} = \frac{\mathbf{v}}{||\mathbf{v}||}$ ### Vector equation of a line segment Given some points $A$ and $B$ with position vectors $\mathbf{a}$ and $\mathbf{b}$, the parametric form of the equation of the line segment joining them is $\mathbf{r}=(1-s)\mathbf{a}+s\mathbf{b} \quad (0 \leq s \leq 1)$ Where $s$ is a parameter that can be varied to make the position vector $\mathbf{r}$ trace out the points on the line segment from $A$ to $B$. If rather than bounding it in $[0,1]$, we have $-\infty \lt s \lt \infty$, then $\mathbf{r}$ will trace the entire line through $A$ and $B$ rather than just the segment. This equation can also be written component-wise as follows $ \begin{align*} x &=a_x + s(b_x-a_x)\\ y &=a_y + s(b_y-a_y)\\ x &=a_z + s(b_z-a_z)\\ \end{align*} $ Where $ \begin{align*} \mathbf{a} &= \begin{pmatrix} a_x \\ a_y \\ a_z \end{pmatrix} & \mathbf{b} &= \begin{pmatrix} b_x \\ b_y \\ b_z \end{pmatrix} \end{align*} $ ... and $s$ is bounded appropriately as before based on whether we want the line segment or the whole line. Given in 3 dimensions but it's easy to see how to generalise this to an arbitrary number of dimensions. ## Simplifying vector expressions using the "triangle law" It's fundamental to understand how to simplify vector expressions. In dealing with a problem _draw a diagram_ and make sure you understand the angles of the vectors correctly. ![](https://youtu.be/Ve6tWXojUlU?si=Y7fHb8BFBj9kwV9r) The "triangle law" simply states that the result of adding two vectors is a vector from the starting point of the initial vector to the end point of the second vector, or $\overrightarrow{AB} + \overrightarrow{BC} = \overrightarrow{AC}.$ ![[Vector Addition Triangle Law 1.png]] This allows us to make multiple simplifications of vector additions by removing intermediate "stopping points". So given the following diagram, ![[Vector Addition Triangle Law 2.png]] $ \begin{align*} \overrightarrow{CD} + \overrightarrow{DB} &= \overrightarrow{CB} \\ \overrightarrow{DB} - \overrightarrow{AB} &= \overrightarrow{DA} \tag{1}\\ \overrightarrow{DC} + \overrightarrow{CA} + \overrightarrow{AB} &= \overrightarrow{DB}.\tag{2} \\ \end{align*} $ Notice that (1) relies on the fact that $\overrightarrow{DB} - \overrightarrow{AB} = \overrightarrow{DB} + (- \overrightarrow{AB}) = \overrightarrow{DB} + \overrightarrow{BA},$ and (2) relies on vector addition having the commutative property, which it does as we shall prove below once we have properly defined vector addition. ## Fundamental operations of vector algebra ### vector addition Addition of two vectors is defined as the addition of their components. That is $ \begin{align*} \text{Given}~\mathbf{a} &= \begin{bmatrix} a_1 \\ a_2 \\ \vdots \\ a_n\end{bmatrix} \\ \text{and}~\mathbf{b} &= \begin{bmatrix} b_1 \\ b_2 \\ \vdots \\ b_n\end{bmatrix} \\ \text{then}~\mathbf{a} + \mathbf{b} &= \begin{bmatrix} a_1 + b_1 \\ a_2 + b_2 \\ \vdots \\a_n + b_n\end{bmatrix} \\ \end{align*} $ ### scalar multiplication Scalar multiplication comprises multiplying each component by the scalar. In this sense, the scalar _scales_ the vector by dilating in each of its dimensions. If you’re thinking in terms of component form, the scalar simply scales all the basis vectors $\hat{i}, \hat{j}, \hat{k} \dots$ etc by some fixed amount and thereby scales the vector. $ \begin{align*} \text{Given}~\mathbf{a} &= \begin{bmatrix} a_1 \\ a_2 \\ \vdots \\ a_n\end{bmatrix} \\ \text{and some scalar $m$, then}\\m\mathbf{a} &= \begin{bmatrix} ma_1 \\ ma_2 \\ \vdots \\ ma_n\end{bmatrix} \\ \end{align*} $ ### zero vector ($\mathbf{0}$) The zero vector (denoted by a bold or blackboard font zero ie $\mathbf{0}$ or $\mathbb{0}$) has zero for all components. That is $ \begin{align*} \mathbf{0} &= \begin{bmatrix} 0 \\ 0 \\ \vdots \\ 0\end{bmatrix} \\ \end{align*} $ It is the identity under addition Ie $\mathbf{v} \pm \mathbf{0} = \mathbf{v},$ as we will hopefully shortly demonstrate. ### unit vector ($\mathbf{1}$) The unit vector (denoted by a bold or blackboard font 1 ie $\mathbf{1}$ or $\mathbb{1}$) has 1 for all components, and can be seen to be the sum of all the basis vectors $\hat{i}, \hat{j}, \hat{k} \dots$ etc of the space. That is $ \begin{align*} \mathbf{1} &= \begin{bmatrix} 1 \\ 1 \\ \vdots \\ 1\end{bmatrix} \\ \end{align*} $ Once we have defined the product operations we will hopefully find it is the identity under those Ie $ \begin{align*} \mathbf{v} \cdot \mathbf{1} &= \mathbf{v} \\ \mathbf{v} \times \mathbf{1} &= \mathbf{v} \\ \end{align*} $ as we will hopefully shortly demonstrate. ## Dot Product (a.k.a. Scalar product) Given two vectors $\mathbf{a}$ and $\mathbf{b}$, their “dot product” is written $\mathbf{a} \cdot \mathbf{b}$ (`\mathbf{a} \cdot \mathbf{b}` in latex). Note: - the dot must be made clear and is never elided as it might be for algebra on two scalars (ie it is perfectly fine given scalars $m$ and $n$ to write their product as $mn$, but it is not fine to write the dot product of two vectors $\mathbf{a} \cdot \mathbf{b}$ as $\mathbf{a} \mathbf{b}$. - The dot product is sometimes called the “scalar product” because the result is a scalar, but don’t confuse the scalar product of two vectors with scalar multiplication of a vector (multiplying a vector by a scalar). - We will later encounter another product of vectors called the cross product, written $\mathbf{a} \times \mathbf{b}$, so don’t get those confused and never write a dot product using the times symbol. The result of the cross product of two vectors is a third vector. ## Calculating the dot product There are two equivalent formulae for the dot product and they are both very important: $ \begin{align*} \mathbf{a} \cdot \mathbf{b} &= |\mathbf{a}||\mathbf{b}| \cos \theta \tag{3} \\ \mathbf{a} \cdot \mathbf{b} &= a_1b_1 + a_2b_2 + \dots + a_nb_n\\\ &= \sum \limits_{i=1}^n a_ib_i \tag{4} \end{align*} $ Notes: - form (3) can be rearranged as $ \begin{align*} \cos \theta &= \frac{\mathbf{a} \cdot \mathbf{b}}{ |\mathbf{a}||\mathbf{b}|} \\ \end{align*} $Which is obviously useful for determining the angle between two vectors. Additionally it can be seen from (3) that the dot product of two non-zero vectors is zero iff $\cos \theta$ is zero, which is the case if the vectors are orthogonal. Therefore checking whether the dot product is zero is equivalent to checking orthogonality of the vectors. - Form (4) allows for simple calculation of the dot product given vectors in component form and is therefore frequently convenient. ### Aside on machine learning Form (3) is also used to determine “cosine similarity” in machine learning. Given two things (usually texts) represented by embedding vectors, their similarity can be measured by the cosine of the distance between the two vectors using formula (3) given that the embedding space is in some sense semantic. In transformer architectures to simplify the calculation it is common to just use the square root of the dimensionality rather than the magnitude of the two vectors for scaling, leading to: $ \begin{align*} \text{scaled~dot~product}(\mathbf{a}, \mathbf{b}) &= \frac{\mathbf{a} \cdot \mathbf{b}}{\sqrt{d}} \end{align*} $ Where $d$ is the number of dimensions in the embedding space. This formula is “softmax normalized” to form the basis of scaled dot-product attention. # Handling vector problems Vector problems are often very simple once you know a couple of formulae but it is extremely easy to make basic errors like measuring the wrong angle, having the direction of the vector wrong, confusing bearings with angles etc. To avoid those mistakes, use the following process. 1. Draw a diagram (seriously don't skip this step) 2. Take a moment to double/triple/quadruple check the diagram to ensure that you have the angles correct so the directions of the vectors are going the way you want them. Check whether you are dealing with bearings (clockwise from North) or angles (anticlockwise from the positive $x$ axis). If you mess this part up you will _absolutely mess the problem up no matter what_. 3. Do the problem <- note that this isn't the only step, but is actually the simple part if you do steps 1&2 8^) 4. Make sure you give the output in the correct format (angles vs bearings, component or coordinate form vs magnitude at angle etc) For 3-dimensional problems make sure you don’t accidentally get your dimensions/components muddled up. This is easy to do when you’re going from a 2D ($\hat{i} + \hat{j}$) to a 3D ($\hat{i} + \hat{j} + \hat{k}$) case so take care not to trip yourself up. # Using vectors to solve problems in coordinate Geometry Vectors can be helpful to solve some problems in coordinate geometry. For example, given two linear functions and asked to compute the angle between them, it can be convenient to consider them as vectors and use the definition of the dot product to find the angle. Although we are ignoring the constant term in each function, this is legitimate in this case because the constant factors simply shift a linear function vertically and don’t affect the slope, and therefore ignoring them will not change the angle. ## Example Find the angle between $y=2x +5$ and $3y -4x = 9$. First we rewrite as vectors, so calling the first $\mathbf{a}$ and the second $\mathbf{b}$, $ \begin{align*} y&=2x +5 &\Rightarrow 2x -y &= -5 \\ \mathbf{a} &= 2\mathbf{i} -\mathbf{j} \\ \\ 3y-4x&=9 &\Rightarrow -4x +3y &= 9\\ \mathbf{b} &= -4\mathbf{i} +3\mathbf{j} \\ \\ \mathbf{a}\cdot\mathbf{b} &= 2(-4) + (-1)3\\ &=-11\\ |\mathbf{a}| &= \sqrt{2^2 + (-1)^2} \\ &= \sqrt{5} \\ |\mathbf{b}| &= \sqrt{(-4)^2 + (9)^2} \\ &= \sqrt{25} \\ &= 5 \\ \cos \theta &= \frac{\mathbf{a}\cdot\mathbf{b}}{|\mathbf{a}||\mathbf{b}|} \\ \theta &= \cos^{-1}\left( \frac{\mathbf{a}\cdot\mathbf{b}}{|\mathbf{a}||\mathbf{b}|} \right) \\ &= -\frac{11}{5\sqrt{5}} \\ &\approx 169.695\dots \degree \end{align*} $ In answering this type of problem, note that there will always be an acute and an obtuse angle of intersection (unless the lines are perpendicular) so ensure you give the answer the question asks for. In this case we have retreived the obtuse angle but if the question asked for the acute angle, then we would want to return $180\degree - \theta \approx 10.304\dots \degree$. ### Converting between a linear function and an equivalent vector It’s worth realising that the vector equivalent to a linear function $y=mx+c$ is $\mathbf{v} = \mathbf{i} + m \mathbf{j}$. # Properties of vector algebra Having defined vector addition and scalar multiplication, the following properties hold for all vectors $\mathbf{a}$, $\mathbf{b}$, and $\mathbf{c}$ and scalars $m$ and $n$: 1. $\mathbf{a} + \mathbf{b} = \mathbf{b} + \mathbf{a}$ 2. $(\mathbf{a} + \mathbf{b}) + \mathbf{c} = \mathbf{a} + (\mathbf{b} + \mathbf{c})$ 3. $\mathbf{a} + \mathbf{0} = \mathbf{a}$ 4. $\mathbf{a} + -\mathbf{a} = \mathbf{0}$ 5. $m(\mathbf{a} + \mathbf{b}) = m\mathbf{a} + m\mathbf{b}$ 6. $(m + n)\mathbf{a} = m\mathbf{a} + n \mathbf{a}$ 7. $m(n\mathbf{a}) = (mn)\mathbf{a}$ 8. $1\mathbf{a} = \mathbf{a}$ *TODO*: Prove these suckers. ## Proof that $\mathbf{a} + \mathbf{b} = \mathbf{b} + \mathbf{a}$ Consider that vector addition is defined as the addition of components of each vector and therefore the commutativity of scalar addition on the components of the vector establishes commutativity of addition on the actual vectors. That is: $ \begin{align*} \mathbf{a} + \mathbf{b} &= \begin{bmatrix} a_1 + b_1 \\ a_2 + b_2 \\ \vdots \\a_n + b_n\end{bmatrix} \\ \text{and}~\mathbf{b} + \mathbf{a} &= \begin{bmatrix} b_1 + a_1 \\ b_2 + a_2 \\ \vdots \\b_n + c_n\end{bmatrix} \\[12pt] \text{But we know that for any two scalars $x$ and $y$},~x+y &= y+x\\[8pt] \text{Therefore}~ \begin{bmatrix} a_1 + b_1 \\ a_2 + b_2 \\ \vdots \\a_n + b_n\end{bmatrix} &= \begin{bmatrix} b_1 + a_1 \\ b_2 + a_2 \\ \vdots \\b_n + c_n\end{bmatrix} \\[12pt] \text{and thus}~\mathbf{a} + \mathbf{b} &= \mathbf{b} + \mathbf{a} \quad \square\\ \end{align*} $ ## Proof that $(\mathbf{a} + \mathbf{b}) + \mathbf{c} = \mathbf{a} + (\mathbf{b} + \mathbf{c})$ Given three vectors $\mathbf{a}$, $\mathbf{b}$, and $\mathbf{c}$, defined in the usual way, we have $ \begin{align*} (\mathbf{a} + \mathbf{b}) + \mathbf{c} &= \begin{bmatrix} a_1 + b_1 \\ a_2 + b_2 \\ \vdots \\a_n + b_n\end{bmatrix} + \mathbf{c}\\ &= \begin{bmatrix} a_1 + b_1 +c_1 \\ a_2 + b_2 +c_2\\ \vdots \\a_n + b_n+c_n\end{bmatrix} \\ \text{and}~\mathbf{a} + (\mathbf{b}) + \mathbf{c}) &= \mathbf{a} + \begin{bmatrix} b_1 + c_1 \\ b_2 + c_2 \\ \vdots \\b_n + c_n\end{bmatrix} \\ &= \begin{bmatrix} a_1 + b_1 +c_1 \\ a_2 + b_2 +c_2\\ \vdots \\a_n + b_n+c_n\end{bmatrix} \\[12pt] \text{thus}~(\mathbf{a} + \mathbf{b}) + \mathbf{c} &= \mathbf{a} + (\mathbf{b}) + \mathbf{c}) \quad \square \end{align*} $Here's a "cheat sheet" style guide to the main vector operations covered in the text, in markdown format with LaTeX for equations: # Vector Operations Cheat Sheet ## Basic Definitions - Vector: $\mathbf{a} = a_1\mathbf{i} + a_2\mathbf{j} + a_3\mathbf{k}$ or $\mathbf{a} = (a_1, a_2, a_3)$ - Magnitude: $|\mathbf{a}| = \sqrt{a_1^2 + a_2^2 + a_3^2}$ - Unit vector: $\hat{\mathbf{a}} = \frac{\mathbf{a}}{|\mathbf{a}|}$ ## Vector Addition and Scalar Multiplication - Addition: $\mathbf{a} + \mathbf{b} = (a_1 + b_1, a_2 + b_2, a_3 + b_3)$ - Scalar multiplication: $k\mathbf{a} = (ka_1, ka_2, ka_3)$ ## Dot Product $\mathbf{a} \cdot \mathbf{b} = a_1b_1 + a_2b_2 + a_3b_3 = |\mathbf{a}||\mathbf{b}|\cos\theta$ Properties: - Commutative: $\mathbf{a} \cdot \mathbf{b} = \mathbf{b} \cdot \mathbf{a}$ - Distributive: $\mathbf{a} \cdot (\mathbf{b} + \mathbf{c}) = \mathbf{a} \cdot \mathbf{b} + \mathbf{a} \cdot \mathbf{c}$ - $\mathbf{a} \cdot \mathbf{a} = |\mathbf{a}|^2$ - $\mathbf{a} \perp \mathbf{b} \iff \mathbf{a} \cdot \mathbf{b} = 0$ ## Cross Product $\mathbf{a} \times \mathbf{b} = (a_2b_3 - a_3b_2, a_3b_1 - a_1b_3, a_1b_2 - a_2b_1)$ Magnitude: $|\mathbf{a} \times \mathbf{b}| = |\mathbf{a}||\mathbf{b}|\sin\theta$ Properties: - Anti-commutative: $\mathbf{a} \times \mathbf{b} = -(\mathbf{b} \times \mathbf{a})$ - Distributive: $\mathbf{a} \times (\mathbf{b} + \mathbf{c}) = \mathbf{a} \times \mathbf{b} + \mathbf{a} \times \mathbf{c}$ - $\mathbf{a} \times \mathbf{a} = \mathbf{0}$ - $\mathbf{a} \parallel \mathbf{b} \iff \mathbf{a} \times \mathbf{b} = \mathbf{0}$ ## Vector Projections Projection of $\mathbf{a}$ onto $\mathbf{b}$: $\text{proj}_\mathbf{b}\mathbf{a} = \frac{\mathbf{a} \cdot \mathbf{b}}{|\mathbf{b}|^2}\mathbf{b}$ ## Vector Equations - Line: $\mathbf{r} = \mathbf{a} + t\mathbf{b}$, where $\mathbf{a}$ is a point on the line and $\mathbf{b}$ is a vector parallel to the line - Plane: $\mathbf{r} \cdot \mathbf{n} = d$, where $\mathbf{n}$ is normal to the plane and $d$ is a constant ## Useful Identities - Scalar triple product: $\mathbf{a} \cdot (\mathbf{b} \times \mathbf{c}) = \mathbf{b} \cdot (\mathbf{c} \times \mathbf{a}) = \mathbf{c} \cdot (\mathbf{a} \times \mathbf{b})$ - Vector triple product: $\mathbf{a} \times (\mathbf{b} \times \mathbf{c}) = (\mathbf{a} \cdot \mathbf{c})\mathbf{b} - (\mathbf{a} \cdot \mathbf{b})\mathbf{c}$ ## Applications - Area of parallelogram: $A = |\mathbf{a} \times \mathbf{b}|$ - Volume of parallelepiped: $V = |\mathbf{a} \cdot (\mathbf{b} \times \mathbf{c})|$ - Torque: $\boldsymbol{\tau} = \mathbf{r} \times \mathbf{F}$