Vectors
A vector is an n-tuple (tuple refers t a vertical or horizontal ordered list) of coordinates specifying a direction and a magnitude. The direction is given in relation to the origin and the magnitude is the length of the vector.
Vectors help us to add the idea of paths with direction to our notion of mathematics. They do so in the simplest possible way- they allow us to talk about and understand paths that consists of a collection of straight line segments each with a clear direction. This adds a bit of complexity to our understanding of math, but the power of linear algebra- the field to which vectors belongs cannot be overstated. This is the starting point for the majority of humanity’s most powerful mathematical results. More than any other fields linear algebra and complex analysis have created pathways to solutions of the very hardest mathematical problems that humanity has explored. Much of the work of modern mathematics has been attempting to reformulate existing problems in the language of these two fields. Don’t take this as road sign that leads you away from other fields- algebraic geometry and number theory have had extraordinary renaissances in the 21st century as well.
1. Vectors in $\mathbb{R}^2$
It is typical to write a vector as a column. Often, we denote vector symbols with special characters over the variable when it may be unclear the variable is a vector. Consider the vector given by v = (1, 2). We would more commonly write this as $\overrightarrow{v} = \begin{pmatrix} 1 \\ 2 \end{pmatrix} $ but we may also write v as $\mathbf{v}$ or $\dot{v}$ or $\bar{v}$. All of these symbols are in common usage today with some being more common in areas like physics or engineering. As we begin to explore vectors and, subsequently, matrices, you will grow to love variable notation as it will often save you an enormous amount of writing. For our purposes, we will generally stick to the bolded variable notation.
Recall that $\mathbb{R}^2$ is a shorthand name for the cartesian plane. The topmost coordinate is movement in the x-direction and our next coordinate is movement in the y-direction. Our vectors are NOT points though. They are directed “arrows” that connect the origin to a given point. So the cartesian point (1, 2) is not the same as our vector $\mathbf{v} = \begin{pmatrix} 1 \\ 2 \end{pmatrix}$.
Here, you see a graphical representation of vector $mathbf{v}$. Vectors have two extremely important properties. They are vector addition and scalar multiplication. Vector addition allows us to add two vectors to obtain a 3rd vector. That third vector is the result of placing the two vectors end to end and determining where it’s new ending point will be. Consider vector $\mathbf{w} = \begin{pmatrix} -2 \\ -1 \end{pmatrix}$ Then $\mathbf{v} + \mathbf{w} = \begin{pmatrix} -2 + 1\\ -1 + 2\end{pmatrix} = \begin{pmatrix} -1\\ 1\end{pmatrix}$. Notice that though I present the addition as traversing first $\mathbf{v}$ and then $\mathbf{w}$ that the result is the same either way. Vector addition is commutative like standard addition. We say that vector addition on the real numbers (like standard addition on the real numbers) is closed– that is, adding two vectors results in another vector.
Scalar multiplication dilates a vector (possibly in the opposite direction). In mathematics, the term dilation is frequently used to mean a scaling that does not change the shape of the object. It is valid to send scalar multiply by zero which sends the vector to the zero vector. Scalar multiplication of $\mathbf{v}$ by 2 is typically written $2\mathbf{v}$ which is exactly equal to $\mathbf{v}+ \mathbf{v}$. More generally, we can define scalar multiplication by a value a as $a\mathbf{v} = \begin{pmatrix} 1a \\ 2a \end{pmatrix}$. Scalar multiplication is closed as well! This allows us to now write algebraic expressions like $3\mathbf{v} + 2\mathbf{w}$ meaningfully. Now that we have defined scalar multiplication and vector addition, we obtain vector subtraction for free! This is just adding a two vectors where one is multiplied by negative one. Notice that in a vector space, the operation of scalar multiplication by -1 serves to “reverse” the direction of our initial vector with respect to the origin!
One final note on this section is that it is common to use subscripts when dealing with vectors. A subscript is used to denote a distinct element (though it may have the same value). For instance, consider the vector given by $\mathbf{y} = \begin{pmatrix} y_1 \\ y_2 \end{pmatrix}$ Here, $y_1$ is the first component of the vector and $y_2$ is the second component. This is a common notation and it easily generalizes.
Try some practice problems below:
1. Let $mathbf{x} = \begin{pmatrix} 1 \\ -1 \end{pmatrix}$ and v be as above. Calculate x + v.
$\begin{pmatrix} 1 \\ -1 \end{pmatrix} + \begin{pmatrix} 1 \\ 2 \end{pmatrix} = \begin{pmatrix} 2 \\ 1 \end{pmatrix}$
2. Calculate 3v + v + w where v and w are as above.
$3\begin{pmatrix} 1 \\ 2 \end{pmatrix} + \begin{pmatrix} 1 \\ 2 \end{pmatrix} + \begin{pmatrix} -2 \\ -1 \end{pmatrix}$
$\begin{pmatrix} 3 \\ 6 \end{pmatrix} + \begin{pmatrix} 1 \\ 2 \end{pmatrix} + \begin{pmatrix} -2 \\ -1 \end{pmatrix} = \begin{pmatrix} 2 \\ 7 \end{pmatrix}$
3. Calculate 3y + v with y and v as above.
$3\begin{pmatrix} y_1 \\ y_2 \end{pmatrix} + \begin{pmatrix} 1 \\ 2 \end{pmatrix} $
$\begin{pmatrix} 3y_1 \\ 3y_2 \end{pmatrix} + \begin{pmatrix} 1 \\ 2 \end{pmatrix} + = \begin{pmatrix} 3y_1+1 \\ 3y_2+2 \end{pmatrix}$
2. Vectors in $\mathbb{R}^3$ and vector decomposition
Vectors in $\mathbb{R}^3$ work in much the same way as vectors in $\mathbb{R}^2$. We add a third slow to represent movement in the third dimension. Vectors in $\mathbb{R}^3$ then look like $\mathbf{v} = \begin{pmatrix} 1 \\ 2 \\ 3 \end{pmatrix}$. They follow exactly the same rules as our vectors in $\mathbb{R}^2$ did.
Consider
$\begin{pmatrix} 1 \\ 2 \\ 3 \end{pmatrix} + 2\begin{pmatrix} 1 \\ 1 \\ -1 \end{pmatrix} = \\ \begin{pmatrix} 1 \\ 2 \\ 3 \end{pmatrix} + \begin{pmatrix} 2 \\ 2 \\ -2 \end{pmatrix} = \\ \begin{pmatrix} 3 \\ 4 \\ 1 \end{pmatrix}$
Vector Decomposition
One of the profoundly useful aspects of vectors across many disciplines is vector decomposition and vector arithmetic. In the real world, I don’t have any sort of absolute coordinate system so I often have a magnitude and one or more angles. For instance, imagine the girl below is pulling a wagon with a force of 10 Newtons at an angle of 450 to the horizontal. The wagon has a mass of 5 kg with loaded up with all the stuffed animals.
How fast is the wagon accelerating horizontally? She’s moving to the left. The wagon handle is at 450, but typically, we would call this angle 1350. The horizontal component of the vector can be obtained as $10 \cdot cos(135^0) \approx -7.07 $ N. (The vertical component which we do not need could be obtained by $10 \cdot sin(135^0) \approx 7.07$ N). Now, we need the auxilary piece of information that F = ma where F is force in newtons, m is mass in kilograms, and a is acceleration in m/s2. Therefore, we calculate $7.07 \text{ N} = 5 \text{ kg} \cdot a \rightarrow a = -1.41 \frac{\text{m}}{\text{s}^2}$ or, alternatively, $1.41 \frac{\text{m}}{\text{s}^2}$ to the left.
Let’s consider several other examples.
Example 2.1: An aerial drone is flying at $30^0$ to the positive horizontal (towards northeast). It flies 25 meters in this direction. Then it flies 20 meters directly east. Finally, it flies 15 meters at a $20^0$ angle to the horizontal (again northeast). What is the final displacement of the drone? What distance did the drone cover?
We first apply vector decomposition here to obtain the components of the displacement piecewise.
We get the following x components: $x_1 = 30\cdot cos(30^0)$, $x_2 = 20$ and $x_3 = 15 \cdot cos(20^0)$. We do the analogous process to obtain the y components: $y_1 = 30 \cdot sin(30^0)$, $y_2 = 0$ because that segment of the journey is horizontal, and $y_3 = 15 \cdot sin(20^0)$.
We then sum these components to get the x and y components of the green displacement vector. $x = 30\cdot cos(30^0) + 20 + 15 \cdot cos(20^0) \approx 25.981 + 20 + 14.095 \approx 60.076$, $y = 30 \cdot sin(30^0) + 0 + 15 \cdot sin(20^0) \approx 15 + 5.130 \approx 20.130$.
We then use the Pythagorean theorem to compute the magnitude of the displacement vector and the arctangent to determine the angle. $\sqrt{60.076^2 + 20.130^2} \approx 63.4$ meters. $\arctan{\frac{20.130}{60.076}} \approx 18.5^0$.
Thus our displacement is 63.4 meters at $18.5^0$ to the horizontal (Northeastish).
The total distance is a scalar sum of $30 + 20 + 15 = 65 meters$.
Example 2.2: A frog swims along the surface of a pond. First it swims 10 m at an angle of $-60^0$ to the positive horizonal. Then it turns $120^0$ clockwise and swims 10 more meters. What is the total distance that the frog swam? What is the displacement of the frog if the origin is placed where the frog started swimming?
This problem requires similar skills to the previous problem. The total distance is simply 10 m + 10 m = 20 m. The displacement will require us to use vector decomposition. $x_1 = 10 cos (-60^0) = 5 \text{ m}$ and $y_1 = 10 sin (-60) = -8.66 \text{ m}$. Now, at that position the frog rotates $120^0$ clockwise or an additional $-120^0$ which means its trajectory with respect to the origin is now $-180^0$ or directly to the left. So $x_2 = 10cos(-180) = -10 m$ and $y_2 = 0$. $x_{total} = x_1 + x_2 = 5 -10 = -5 \text{ m}$ and $y_{total} = y_1 = -8.66 \text{ m}$ So the displacement is then $\sqrt{(-5)^2 + (-8.66)^2} = 10 \text{ m}$ and the angle is $\arctan{-8.66/-5} = 60^0$. However, this is only our reference angle and we need to realize our vector is in the 3rd quadrant meaning the actual angle is $180^0 + 60^0 = 240^0$. So our displacement is 10 meters with an angle of $240^0$ to the positive horizontal.
3. The Dot Product and $\mathbb{R}^4$
The dot product seems like a very strange operation on its face. However, in some sense, it is the correct generalization of the angle. Here, let us take two general vectors v $=\begin{pmatrix} v_1 \\ v_2 \end{pmatrix}$ and w $=\begin{pmatrix} w_1 \\ w_2 \end{pmatrix}$. The standard dot product in $\mathbb{R}^2$ would look like $\mathbf{v} \cdot \mathbf{w} = v_1w_1 + v_2w_2$ which is a scalar real number. Similarly, if v and w were vectors in $\mathbb{R}^3$ then $\mathbf{v} \cdot \mathbf{w} = v_1w_1 + v_2w_2 + v_3w_3$. From the definition of dot product (sometimes referred to as a scalar product), it should be clear that the dot product of the zero vector with any other vector is also zero.
Let’s examine the precise relationship between the (standard) dot product and the angle between two distinct, nonzero vectors. We’ll consider two vectors in $\mathbb{R}^3$. Then, if the tails of these two vectors, v and w, are coincident we may connect the ends of them to form a triangle. We will let $\theta$ be the angle between the two vectors.
By the law of cosines, we may now write
$|\mathbf{v} – \mathbf{w}|^2 = |\mathbf{v}|^2 + |\mathbf{w}|^2 – 2|\mathbf{v}||\mathbf{w}|cos(\theta)$
$(v_1 – w_1)^2 + (v_2 – w_2)^2 +(v_3 – w_3)^2 = (v_1^2 + v_2^2 + v_3^2) +(w_1^2 + w_2^2 + w_3^2) – 2|\mathbf{v}||\mathbf{w}|cos(\theta)$
$v_1w_1 + v_2w_2 + v_3w_3 = |\mathbf{v}||\mathbf{w}|cos(\theta)$
And this immediately implies that if the angle between the two vectors is perpendicular then the dot product is equal to zero. Moreover, this gives us a way to introduce a new term: orthogonal. Perpendicular vectors are orthogonal, but later on, nonstandard dot products or the dot generalized to higher dimensions does not have quite the same geometric intuition. We leave behind the notion of perpendicular and instead say two vectors are orthogonal if the dot product is zero.
Consider the follow two vectors in $\mathbb{R}^4$.
Let u = $\begin{pmatrix} 1 \\ 2 \\ 3 \\ 4\end{pmatrix}$ and v = $\begin{pmatrix} 3 \\ 1 \\ 1 \\ -2\end{pmatrix}$.
Then u$\cdot$v = (1)(3)+(2)(1)+(3)(1)+(4)(-2) = 3 + 2 + 3 – 8 = 0. Here, we say u and v are orthogonal. We also begin to gain a sense of what higher dimensions are like through algebra. We simply add another coordinate and our (x, y, z) coordinate system becomes an (x, y, z, w) coordinate system.
There is another nice intuition for higher dimensions. Any collection of independent data is a dimension. For example, longitude, latitude, humidity, and temperature are a four dimensional data set! Another example you may be more familiar with is spatial coordinates (x, y, z) plus a time coordinate (t) which becomes (x, y, z, t). If we are tracking a rocket, then necessarily, we are tracking it not in 3 dimensions, but 4!