xaktly | Multivariable calculus

Vectors

This page about vectors is targeted at those studying multivariable calculus (vector calculus). If you want a more basic (but still thorough) explanation, try this page.

Vectors


The concept of a vector is one of the most important in physics. Vectors represent all kinds of important quantities like velocity, acceleration, momentum and force.

A vector is a directed line segment. It is drawn as an arrow (see gray panel), and has only two important aspects, its length and its direction.

The length or magnitude of a vector represents the size of a physical quantity, like the amount of force or the speed (speed is the magnitude of velocity).

The direction of a vector (where the arrow points) is the direction of action of the physical quantity. For example, it might be the direction of an applied pushing force or the direction of a motion.

Vector notation


On this site, we'll denote vectors with an arrow over a letter, like $\vec v$. Some books and papers use bold-face letters instead.

There are only two important features of any vector:

The only two features of a vector that are important are length (which captures the magnitude or size of the quantity) and direction. As long as length and direction are preserved, a vector can be moved anywhere in a coordinate system, purely for convenience.

2D Vectors and Lengths


In two dimensions, a vector looks like this one. Because the only things that matter about a vector are length and direction, and these are preserved under a translation operation, vectors are always given coordinates that assume that they begin at the origin, $(0, 0)$. Here is vector $\vec a = (4, 3)$.

We can use the Pythagorean theorem to find the length of any vector. The x-coordinate of vector $\vec a$ is 4, and its y-coordinate is 4. Thus we have

$$ \begin{align} |\vec a| &= \sqrt{x^2 + y^2} \\[5pt] &= \sqrt{4^2 + 3^2} \\[5pt] &= \sqrt{25} = 5 \; \text{units} \end{align}$$

Here's a picture of that:



Notation: Here I've used the single bars around $\vec a$ to denote its length. Others, and some textbooks, will use double bars like this: $||\vec a ||$. Usually we can tell the difference between absolute value bars and when we mean length, so I'll just use the single bars when it's clear we're talking about vectors.

Now let's take a look at a 3D vector and see if we can do some generalizing to more than three dimensions.

3D vectors and lengths


We can draw 3D vectors (coordinates x, y & z) on a 2D page if we can use our imagination to envision the x-axis (see graph below) as coming out of the page and disappearing back behind it. The coordinate system shown is known as a right-handed 3D Cartesian coordinate system.

The route from the graph origin to the tip of the vector $\vec a = (3, 6, 6)$ is shown in red: Move 3 units along the x-axis, then 6 in the positive direction along the y-axis, then six up on the z-axis.

We can also use that figure to find the length of our 3D vector. First notice that we can find the length of the black-dashed diagonal in the (yellow) x-y plane just by using the pythagorean theorem. It's denoted $b$ in the graph and its length is

$$ \begin{align} |\vec b| &= \sqrt{x^2 + y^2} \\[5pt] &= \sqrt{3^2 + 6^2} \\[5pt] &= \sqrt{45} = 3 \sqrt{5} \; \text{units} \end{align}$$

Now turn to the blue right triangle to complete the lenth calculation. The length of $\vec a$ is

$$ \begin{align} |\vec a| &= \sqrt{b^2 + z^2} \\[5pt] &= \sqrt{\left(\sqrt{x^2 + y^2} \right)^2 + z^2} \\[5pt] &= \sqrt{x^2 + y^2 + z^2} \\[5pt] &= \sqrt{3^2 + 6^2 + 6^2} \\[5pt] &= \sqrt{81} = 9 \; \text{units} \end{align}$$

We did that in kind of a round-about way, but hopefully you can see that it takes us to a nice result. The lengths of 2D, 3D and nD (n = 4, 5, 6, ...) are:

$$ \begin{align} \text{2D: } L = \sqrt{x^2 + y^2} \\[5pt] \text{3D: } L = \sqrt{x^2 + y^2 + z^2} \\[5pt] \text{nD: } L = \sqrt{x_1^2 + x_2^2 + \dots + x_n^2} \end{align}$$

In the last line we've replaced coordinates $x, y$ and $z$ with coordinates $x_1, y_1, \dots$ up to $x_n$ for an $n$-dimensional coordinate system.


Using unit vectors, $\hat i, \hat j, \hat k$


For any coordinate system, it's convenient to define a set of unit vectors, $\hat x, \hat y, \hat z \dots$, one for each coordinate, all of unit length and pointing in the positive direction of the axis. Here is a 3D vector

Our 2D vector above would be written as $\vec a = 4 \hat i + 3 \hat j$ and our 3D vector as $\vec a = 3 \hat i + 6 \hat j + 6 \hat k$.

These unit vectors are also called direction vectors or basis vectors.

For long, multidimensional vectors, we replace $\hat i, \hat j$ and $\hat k$ with a more general set of unit vectors $e = (\hat e_1, \hat e_2, \dots , \hat e_n)$. So we might denote, say, a 5-dimensional vector as

$$\vec v = x_1 \hat e_1 + x_2 \hat e_2 + x_3 \hat e_3 + x_4 \hat e_4 + x_5 \hat e_5$$

Lengths of $n$-dimensional vectors

The length of any vector of $n$ dimensions, $\vec v = (x_1, x_2, \dots, x_n)$, is

$$|\vec v| = \sqrt{x_1^2 + x_2^2 + \dots + x_n^2}$$

About dimensions

I've found that many people misunderstand what dimensions really are. In our 3-dimensional world, we have left↔right, front↔back and up↔down, which we describe by coordinates along $x-, y-$ and $z$ axes, respecively.


Time is never a dimension

Time is not a dimension. Dimensions can be negative or positive, but we can't have negative time — time only flows in one direction. Time is a parameter. We can parameterize any function $f(x, y)$, for example, into two functions of time, $x(t)$ and $y(t)$. Often, particularly in science fiction, we hear about time being a fourth dimension. It is not.

Water dimer: a 6-dimensional system

In some of my previous work, I studied the water dimer, the gas-phase version of two water molecules bound together by a single hydrogen bond (H-bond). In order to fully describe the interaction between the complicated charge "clouds" of water molecules, we need the six coordinates shown here:

So the "space" that can be explored by two water molecules joined (weakly) by a hydrogen bond (H-bond, the dashed line) is characterized by the set of linear and angular coordinates $S = \{R, \theta_1, \theta_2, \phi, \chi \}$. In fact, if we let the bonds of each water molecule stretch and bend (as they do), this is actually a twelve-dimensional problem.

Each dimension can unfold in time, so that we'd have $S(t) = \{R(t), \theta_1(t), \dots$ and so on, but again, time is just a parameter here.

Vector addition


Knowing how to add vectors graphically and numerically is a crucial skill to have in math and the physical sciences. Let's start with simple vector addition. Consider vectors $\vec a = (4, 3)$ and $\vec b = (3, -4)$ below.

To add these vectors graphically, ust align them (remember, vectors can be translated wihouth loss of any of their meaning) "head-to-tail" fashion, as shown below. The sum of the two is then just the new vector drawn from the beginning of the first vector to the arrow of the last. Counting the x- and y-squares gives the value of the sum, $\vec a + \vec b = (7, -1)$. Notice that this is also the sum of the x- and y-components of our two vectors:

$$ \require{enclose} \begin{align} &\phantom{00} \vec a = (4, \; 3) \\[2pt] &\underline{+ \, \vec b = (3, -4)} \\[3pt] &\phantom{0} \vec R = {(4+3, 3 - 4)} \\[3pt] &\phantom{0} \vec R = (7, -1) \end{align}$$

Sometimes the letter $\vec R$, for "resultant" is used to denote the sum of two vectors. The head-to-tail method is by far the most important of the two graphical methods of vector addition, mostly because we can apply it to the addition of more than two vectors: we just keep chaining the vectors together, head-to-tail.

Once in a while, the parallelogram method of vector addition comes in handy. Here we add the same two vectors, but this time placing them "tail-to-tail", then using the two vectors to trace out the two other sides of a parallelogram. The sum vector is then just the diagonal of the parallelogram, as shown.

We can also add more than two vectors in the same manner. Here are three vectors added graphhically.

Note that we can also just add the components numerically:

$$ \require{enclose} \begin{align} &\phantom{00} \vec a = (3, \; 2) \\[2pt] &\phantom{00} \vec b = (2, -2) \\[2pt] &\underline{\; + \, \vec c = (3, \; 1)} \\[2pt] &\phantom{0} \vec R = {(3+2+3, 2-2+1)} \\[3pt] &\phantom{0} \vec R = (8, 1) \end{align}$$

The panels below illustrate that vector addition is commutative. Notice that regardless of the order of addition of vectors (all six possible orders of adding three vectors are shown), the resultant or sum vector, $\color{magenta}{\vec R}$ (in magenta) is the same.

Vector addition is commutative





One more look at vector addition


Here's one more look at vector addition. In this graph, vectors $\vec a$ and $\vec b$ are added in both of the ways discussed above.

  • Head-to-tail method
  • Parallelogram method

If you can wrap your head around everything that's going on in this figure, you'll have a good understanding of vector addition.

Vectors $\vec a$ and $\vec b$ are added in both head-to-tail fashin and by the parallelogram method. You can see that these are equivalent.


Vector subtraction


The key to vector subtraction is just realizing that subtraction is addition of the negative. That is,

$$\vec a - \vec b = \vec a + (-\vec b)$$

For now, let's just say that if $\vec b = (b_1, b_2)$, then $-\vec b = (-b_1, -b_2)$. The graphical result is that $-\vec b$ is just $\vec b$ pointed in the opposite direction. All of these steps are shown on the graph; see if you can follow the process.

This idea of vector subtraction can be generalized to vectors of any dimension, so long as the two vectors have the same dimension.


Multiplication of vectors by scalars: $k \vec a$


To multiply a vector by a scalar, say $k$, is just to multiply every component of the vector by that scalar:

$$ \begin{align} \vec a = (a_1, a_2) \; &\rightarrow \; k\vec a = k(a_1, a_2) = (ka_1, ka_2) \\[5pt] \vec b = (b_1, b_2, b_3) \; &\rightarrow \; k\vec b = (k b_1, k b_2, k b_3) \\[5pt] \vec c = (c_1, c_2, \dots, c_n) \; &\rightarrow \; k\vec c = (k c_1, k c_2, \dots, k c_n) \end{align}$$

Scalar multiplication preserves the direction of the vector, but multiplies its length by $k$. Take, for example, the 3D vector $\vec b = (b_1, b_2, b_3)$. We know that its length is

$$|\vec b| = \sqrt{b_1^2 + b_2^2 + b_3^2}$$

If we multiply $\vec b$ it by a constant, $k$, then find the length of the resulting vector, that length is

$$ \begin{align} |k\vec b| &= \sqrt{(k b_1)^2 + (k b_2)^2 + (k b_3)^2} \\[5pt] &= \sqrt{k^2 b_1^2 + k^2 b_2^2 + k^2 b_3^2} \\[5pt] &= \sqrt{k^2(b_1^2 + b_2^2 + b_3^2)} \\[5pt] &= k \sqrt{b_1^2 + b_2^2 + b_3^2} \\[5pt] &= k |\vec b| \end{align}$$

So the length of our vector is just multiplied by our constant, $k$.

Scalar-vector multiplication

Multiplication of a vector by a scalar, $k$, multiplies every component of the vector by $k$.

$$k \vec a = k(a_1, a_2, \dots , a_n) = (ka_1, ka_2, \dots , ka_n)$$

Multiplication of a vector by a scalar, $k$ scales the length of the vector by a factor of $k$. If $k \lt 0$, then the direction of the vector is reversed.


Direction vectors and normalization


We can adjust the length of any vector to one, so that it is a unit vector. The process is called normalization of the vector. It's pretty easy: you just divide every component of the vector by its length. For example, let's normalize the 3D vector $\vec a = (3, 6, 5)$

The length of $\vec a$ is

$$ \begin{align} |\vec a| &= \sqrt{3^2 + 6^2 + 5^2} \\[5pt] &= \sqrt{9 + 36 + 25} \\[5pt] &= \sqrt{70} \end{align}$$

Then the normalized version of $\vec a$ is

$$\text{dir} \; \vec a = \left( \frac{3}{\sqrt{70}}, \frac{6}{\sqrt{70}}, \frac{5}{\sqrt{70}} \right)$$

Sometimes we append the prefix "dir" onto a normalized vector to indicate that it's the unit vector giving the direction of the original vector. The original can be recovered by multiplying by the length, $\sqrt{70}$ in this case.

Practice problems

Consider the list of vectors below, then use them to perform the following calculations.


$\vec a = (-1, 2)$

$\vec b = (2, 3)$

$\vec c = (x, y)$

$\vec d = (-2, -2, 5)$

$\vec e = (2, 4, -3)$

$\vec f = (2, x, -4)$

$\vec g = (1, 1, -1, 1)$

$\vec h = (2, -2, -3, -1)$

$\vec m = (4, 4, 3, 1)$



  1. $|\vec a| = $

    Solution

    $$ \begin{align} |\vec a| &= \sqrt{(-1)^2 + 2^2} \\[5pt] &= \sqrt{5} = 2.236 \end{align}$$


  2. $|\vec e| = $

    Solution

    $$ \begin{align} |\vec a| &= \sqrt{2^2 + 4^2 + (-3)^2} \\[5pt] &= \sqrt{4 + 16 + 9} \\[5pt] &= \sqrt{29} = 5.385 \end{align}$$


  3. $|\vec h| = $

    Solution

    $$ \begin{align} |\vec a| &= \sqrt{2^2 + (-2)^2 + (-3)^2 + (-1)^2} \\[5pt] &= \sqrt{4 + 4 + 9 + 1} \\[5pt] &= \sqrt{18} = 3 \sqrt{2} = 4.243 \end{align}$$


  4. $\text{dir }\vec c = $

    Solution

    $$|\vec c| = \sqrt{x^2 + y^2}$$

    $$\text{dir }\vec c = \left( \frac{x}{\sqrt{x^2 + y^2}}, \frac{y}{\sqrt{x^2 + y^2}} \right)$$


  5. $\text{dir }\vec d = $

    Solution

    $$ \begin{align} |\vec d| &= \sqrt{(-2)^2 + (-2)^2 + 5^2} \\[5pt] &= \sqrt{4+4+25} = \sqrt{33} \\[5pt] \text{dir } \vec d &= \left( \frac{-2}{\sqrt{33}}, \frac{-2}{\sqrt{33}}, \frac{5}{\sqrt{33}} \right) \end{align}$$


  6. $\text{dir }\vec g = $

    Solution

    $$ \begin{align} |\vec g| &= \sqrt{1^2 + 1^2 + (-1)^2 + 1^2} \\[5pt] &= \sqrt{4} = 2 \\[5pt] \text{dir } \vec g &= \left( \frac{1}{2}, \frac{1}{2}, \frac{-1}{2}, \frac{1}{2} \right) \end{align}$$


  1. $\vec g - \vec h = $

    Solution

    $$ \begin{align} \vec g - \vec h &= (1-2, 1-(-2), -1-(-3), 1-(-1)) \\[5pt] &= (-1, 3, 2, 0) \end{align}$$


  2. $\vec h - \vec f = $

    Solution

    This vector addition is not possible because the dimensions of the vectors are different.


  3. $\vec d + \vec f = $

    Solution

    $$ \begin{align} \vec d + \vec f &= (-2+2, -2+4, 5-3) \\[5pt] &= (0, 2, 2) \end{align}$$


  4. $4 \vec b - 2 \vec c = $

    Solution

    $$ \begin{align} 4\vec b - 2\vec c &= (4 \cdot 2 - 2 \cdot x, 4 \cdot 3 - 2 \cdot y) \\[5pt] &= (8-2x, 12-2y) \end{align}$$


  5. $|4 \vec c| = $

    Solution

    The length of $\vec c$ is

    $$|\vec c| = \sqrt{x^2 + y^2}$$

    Multiplication by a scalar just multiplies the length of the vector by that constant, so the length of $4\vec c$ is $4 \sqrt{x^2 + y^2}$.


  6. $\text{dir }(3 \vec d - 2 \vec e) = $

    Solution

    $$ \begin{align} 3\vec d - 2 \vec e &= 3(-2, -2, 5) - 2(2, 4, -3) \\[5pt] &= (-6, -6, 5) - (4, 8, -6) \\[5pt] &= (-6-4, -6-8, 5+6) \\[5pt] &= (-10, -14, 11) \\[8pt] |3\vec d - 2 \vec e| &= \sqrt{(-10)^2+(-14)^2+11^2} \\[5pt] &= \sqrt{100+196+121} = \sqrt{417} \\[8pt] \text{dir }(3\vec d - 2 \vec e) &= \left( \frac{-10}{\sqrt{417}}, \frac{-14}{\sqrt{417}}, \frac{11}{\sqrt{417}} \right) \end{align}$$


Vectors: a simpler view

This is an introduction to vectors from the point of view of a 9th grade physics student.

The dot product

Next learn about the dot product or scalar product, which relates the angle between two vectors to their lengths.

X

Cartesian coordinates

Cartesian coordinates are the normal 2-dimensional (2D) or 3-dimensional (3D) coordinate systems we most-frequently use. In two dimensions, we draw x- and y-axes at 90˚ angles to each other, and in 3D we add a third axis, usually the z-axis, perpendicular to the x-y plane.

The location or direction of an point or particle can be described using Cartesian coordinates (x, y) in the 2D plane, or (x, y, z) in 3D.

X

Translation

Translation is motion in one or more of the three Cartesian (x, y, z) directions, or a combination of them, without any rotation.

Creative Commons License   optimized for firefox
xaktly.com by Dr. Jeff Cruzan is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. © 2012-2024, Jeff Cruzan. All text and images on this website not specifically attributed to another source were created by me and I reserve all rights as to their use. Any opinions expressed on this website are entirely mine, and do not necessarily reflect the views of any of my employers. Please feel free to send any questions or comments to jeff.cruzan@verizon.net.