Skip to article frontmatterSkip to article content

Chapter 3 - Vectors

3.1Overview

3.2Coordinate systems

Coordinate systems are used to describe the position of an object in space. A coordinate system is an artificial mathematical tool that we construct in order to describe the position of a real object.

3.2.11D Coordinate systems

The easiest coordinate system to construct is one that we can use to describe the location of objects in one dimensional space. For example, we may wish to describe the location of a train along a straight section of track that runs in the East-West direction. In order to do so, we must first define an “origin”, which is the reference point of our coordinate system. For example, the origin for our train track may be the Kingston train station (Figure 1).

We can describe the position of the train by specifying how far it is from the train station (the origin), using a single real number, say xx. If the train is at position x=0x=0, then we know that it is at the Kingston station. If the object is not at the origin, then we need to be able to specify on which side (East or West in our train example) of the origin the object is located. We do this by choosing a direction for our one dimensional coordinate xx. For example, we may choose that the East side of the track corresponds to positive values of xx and that the West side of the track correspond to the negative values of xx. Thus, in order to fully specify a one-dimensional coordinate system we need to choose:

  • the location of the origin.
  • the direction in which the coordinate, xx, increases.
  • the units in which we wish to express xx.

In one dimension, it is common to use the variable xx to define the position along the “xx-axis”. The xx-axis is our coordinate system in one dimension, and we represent it by drawing a line with an arrow in the direction of increasing xx and indicate where the origin is located (as in Figure 1).

A 1d coordinate system describing the position of a train. The Kingston train station is the origin and the East side of the track corresponds to positive values of $x$. The train is located at position $x_1$.

Figure 1:A 1d coordinate system describing the position of a train. The Kingston train station is the origin and the East side of the track corresponds to positive values of xx. The train is located at position x1x_1.

3.2.22D Coordinate systems

Example of Cartesian coordinate system and a point $P$ with coordinates $(x_p,y_p)$.

Figure 2:Example of Cartesian coordinate system and a point PP with coordinates (xp,yp)(x_p,y_p).

To describe the position of an object in two dimensions (e.g. a marble rolling on a table), we need to specify two numbers. The easiest way to do this is to define two axes, xx and yy, whose origin and direction we must define. Figure 2 shows an example of such a coordinate system. Although it is not necessary to do so, we chose xx and yy axes that are perpendicular to each other. The origin of the coordinate system is where the two axes intersect. One is free to choose any two directions for the axes (as long as they are not parallel). However, choosing axes that are perpendicular (a “Cartesian” coordinate system) is usually the most convenient.

To fully describe the position of an object, we must specify both its position along the xx and yy axes. For example, point PP in Figure 2 has two coordinates, xpx_p and ypy_p, that define its position. The xx coordinate is found by drawing a line through PP that is parallel to the yy axis and is given by the intersection of that line with the xx axis. The yy coordinate is found by drawing a line through point PP that is parallel to the xx axis and is given by the intersection of that line with the yy axis.

The most common choice of coordinate system in two dimensions is the Cartesian coordinate system that we just described, where the xx and yy axes are perpendicular and share a common origin, as shown in Figure 2. When applicable, by convention, we usually choose the yy axis to correspond to the vertical direction.

Another common choice is a “polar” coordinate system, where the position of an object is specified by a distance to the origin, rr, and an angle, θ, relative to a specified direction, as shown in Figure 4. Often, a polar coordinate system is defined alongside a Cartesian system, so that rr is the distance to the origin of the Cartesian system and θ is the angle with respect to the xx axis.

Example of a polar coordinate system and a point $P$ with coordinates $(r,\theta)$.

Figure 4:Example of a polar coordinate system and a point PP with coordinates (r,θ)(r,\theta).

One can easily convert between the two Cartesian coordinates, xx and yy, and the two corresponding polar coordinates, rr and θ:

x=rcos(θ)y=rsin(θ)r=x2+y2tan(θ)=yx\begin{align*} x&=r\cos(\theta)\\ y&=r\sin(\theta)\\ r&=\sqrt{x^2+y^2}\\ \tan(\theta) &= \frac{y}{x} \end{align*}

Polar coordinates are often used to describe the motion of an object moving around a circle, as this means that only one of the coordinates (θ) changes with time (if the origin of the coordinate system is chosen to coincide with the centre of the circle).

3.2.33D Coordinate systems

In three dimensions, we need to specify three numbers to describe the position of an object (e.g. a bird flying in the air). In a three dimensional Cartesian coordinate system, we simply add a third axis, zz, that is mutually perpendicular to both xx and yy. The position of an object can then be specified by using the three coordinates, xx, yy, and zz. By convention, we use the zz axis to be the vertical direction in three dimensions.

Two additional coordinate systems are common in three dimensions: “cylindrical” and “spherical” coordinates. All three systems are illustrated in Figure 5 superimposed onto the Cartesian system.

Cartesian (left), cylindrical (centre) and spherical (right) coordinate systems used in three dimensions. The $y$ and $z$ axes are in the plane of the page, whereas the $x$ axis comes out of the page.

Figure 5:Cartesian (left), cylindrical (centre) and spherical (right) coordinate systems used in three dimensions. The yy and zz axes are in the plane of the page, whereas the xx axis comes out of the page.

Cylindrical coordinates can be thought of as an extension of the polar coordinates. We keep the same Cartesian coordinate zz to indicate the height above the xyxy plane, however, we use the azimuthal angle, ϕ, and the radius, ρ, to describe the position of the projection of a point onto the xyxy plane. ϕ is the angle between the xx axis and the line from the origin to the projection of the point in the xyxy plane and ρ is the distance between the point and the zz axis. Thus, cylindrical coordinates are very similar to the polar coordinate system introduced in two dimensions, except with the addition of the zz coordinate. Cylindrical coordinates are useful for describing situations with azimuthal symmetry, such as the motion along the surface of a cylinder. For example, consider point PP in Figure 6. Point PP is located a distance ρ from the zz axis, as it is located on the surface of the cylinder (the circular end of the cylinder has a radius ρ). Point PP is a height zz above the xyxy plane, and a line from the zz axis to point PP makes an angle ϕ with the xx axis.

Describing the position of $P$, located on the surface of a cylinder, in cylindrical coordinates.

Figure 6:Describing the position of PP, located on the surface of a cylinder, in cylindrical coordinates.

The cylindrical coordinates are related to the Cartesian coordinates by:

ρ=x2+y2tan(ϕ)=yxz=z\begin{align*} \rho &= \sqrt{x^2+y^2}\\ \tan(\phi) &= \frac{y}{x}\\ z&=z \end{align*}

In spherical coordinates, a point PP is described by the radius, rr, the polar angle θ, and the azimuthal angle, ϕ. The radius is the distance between the point and the origin. The polar angle is the angle with the zz axis that is made by the line from the origin to the point. The azimuthal angle is defined in the same way as in polar coordinates. Note that the value of ϕ must be between 0 and 2π2\pi, whereas the value of θ must be between 0 and π.

Spherical coordinates are useful for describing situations that have spherical symmetry, such as a person walking on the surface of the Earth, since the radial coordinate will not change. For example, this is shown with Point PP in Figure 7, located on the surface of a sphere of radius rr.

Describing the position of $P$, located on the surface of a sphere, in spherical coordinates.

Figure 7:Describing the position of PP, located on the surface of a sphere, in spherical coordinates.

The spherical coordinates are related to the Cartesian coordinates by:

r=x2+y2+z2cos(θ)=zr=zx2+y2+z2tan(ϕ)=yx\begin{align*} r &= \sqrt{x^2+y^2+z^2}\\ \cos(\theta) &= \frac{z}{r}=\frac{z}{\sqrt{x^2+y^2+z^2}}\\ \tan(\phi) &= \frac{y}{x}\\ \end{align*}

3.3Vectors

So far, we have seen how to use a coordinate system to describe the position of a single point in space relative to an origin. In this section, we introduce the notion of a “vector”, which allows us to describe quantities that have a magnitude and a direction. For example, you can use a vector to describe the fact that you walked \SI{5}{km} in the North direction. A vector can be visualized by an arrow. The length of the arrow is the magnitude that we wish to describe, and the direction of the arrow corresponds to the direction that we would like to describe.

Unlike a point in space, vectors have no location. That is, vectors are simply an arrow, and you can choose to draw that arrow anywhere you like. In two dimensional space, one requires two numbers to completely define a vector. In three dimensional space, one requires three numbers to completely define a vector. Figure 8 shows a two dimensional vector, d\vec d, twice. Because both arrows in the figure have the same magnitude and direction, they represent the same vector. When we refer to quantities that are vectors, we usually draw an arrow on top of the quantity (d\vec d) to indicate that they are vectors. We use the word “scalar” to refer to numbers that are not vectors (a regular number is thus also called a scalar to distinguish it from a quantity that is a vector).

A vector $\vec d$ shown twice, once with its Cartesian components ($d_x$, $d_y$) and once with its magnitude and direction ($d$, $\phi$).

Figure 8:A vector d\vec d shown twice, once with its Cartesian components (dxd_x, dyd_y) and once with its magnitude and direction (dd, ϕ).

In analogy with coordinate systems, we have multiple ways to choose the numbers that we use to describe the vector. The most convenient choice is usually to use the “Cartesian components” of the vector which correspond to the length of the vector when projected onto a Cartesian coordinate system. For example, in Figure 8, the Cartesian components of the vector d\vec d are labelled as (dxd_x, dyd_y) indicating that the vector has a length of dxd_x in the xx direction and dyd_y in the yy direction. Furthermore, the number dxd_x is negative, since the vector points in the negative xx direction. Another common choice is to use the length of the vector, which we label dd (the name of the vector without the arrow on top), and the angle, ϕ that the vector makes with the xx-axis, as illustrated in Figure 8. In terms of the two dimensional Cartesian components, the magnitude of the vector is given by:

d=d=dx2+dy2\begin{align*} d&= ||\vec d||= \sqrt{d_x^2+d_y^2} \end{align*}

where we also introduced the notation that placing two vertical bars around a vector (d||\vec d||) is used to indicated its magnitude. Note that in three dimensions, it is usually not convenient to specify the direction unless the vector lies in one of the planes defined by the coordinate system (e.g the xyxy plane). In three dimensions, it is usually most convenient to specify the three Cartesian components.

3.3.1Unit vectors

A special category of vectors is “unit vectors”, which are simply vectors that have a length (magnitude) of 1 (in whichever units the coordinate system is defined). Unit vectors are particularly useful for indicating direction. For example, in Figure 8, we may be interested in indicating the direction of the vector d\vec d. Unit vectors are denoted by using a “hat” instead of an arrow. Thus, the vector d^\hat d, is the vector of length 1 that points in the same direction as d\vec d. The (Cartesian) components of d^\hat d are easily found by dividing the corresponding components of d\vec d by dd (the magnitude):

(d^)x=dxd=dxdx2+dy2(d^)y=dyd=dydx2+dy2d=d^=(d^)x2+(d^)y2=dx2dx2+dy2+dy2dx2+dy2=1\begin{align*} (\hat d)_x &= \frac{d_x}{d}=\frac{d_x}{\sqrt{d_x^2+d_y^2}}\\ (\hat d)_y &= \frac{d_y}{d}=\frac{d_y}{\sqrt{d_x^2+d_y^2}}\\ \therefore d &= ||\hat d||=\sqrt{(\hat d)_x^2+(\hat d)_y^2}=\sqrt{\frac{d_x^2}{d_x^2+d_y^2}+\frac{d_y^2}{d_x^2+d_y^2}}=1 \end{align*}

A specific type of unit vector is the units vectors that are parallel to the axes of the coordinate system. Those vectors are denoted x^\hat x, y^\hat y, z^\hat z (and sometimes i^\hat i, j^\hat j, k^\hat k or e^x\hat e_x, e^y\hat e_y, e^z\hat e_z) for the xx, yy, and zz axes, respectively. Thus, the vector dx^d\hat{x}, is the vector of length dd that points in the positive xx direction.

3.3.2Notations and representation of vectors

There are multiple notations for describing a vector using its components. The following are all equivalent ways to write down the vector d\vec d in terms of its components dxd_x and dyd_y:

d=(dx,dy)row vector=(dxdy)column vector=dxx^+dyy^using x^,  y^=dxi^+dyj^using i^,  j^\begin{align*} \vec d &= (d_x,d_y)\quad&\text{row vector}\\ &=\begin{pmatrix} d_x \\ d_y \\ \end{pmatrix}\quad&\text{column vector}\\ &= d_x\hat x +d_y \hat y\quad&\text{using }\hat x,\;\hat y\\ &=d_x\hat i +d_y \hat j \quad&\text{using }\hat i,\;\hat j \end{align*}

The vectors x^\hat x (i^\hat i) and y^\hat y (j^\hat j) are unit vectors in xx and yy directions respectively. For example, the unit vector y^\hat y can be written down as (0,1) in two dimensions or (0,1,0) in three dimensions, using the row notation.

Illustrating a vector graphically in two dimensions is straightforward, but difficult in three dimensions. To help remedy this, a notation is introduced in order to draw vectors that point in or out of the page (perpendicular to the plane of the page). The notation comes from imagining that the vector is an archery arrow. If the vector is coming out of the page (at you!), then you would see the head of the arrow, which we represent as a circle with a dot (the dot is the point of the arrow, the circle is the base of the conically shaped arrowhead). If instead, the vector points into the page, then you would see the back of the arrow, which we represent as a cross (the cross being the feathers in the tail of the arrow). This is illustrated in Figure 9.

Geometric representation of three vectors. The vector $\vec a$ lies in the plane of the page, the vector $\vec b$ is pointing out of the page, and the vector $\vec c$ is pointing into the page.

Figure 9:Geometric representation of three vectors. The vector a\vec a lies in the plane of the page, the vector b\vec b is pointing out of the page, and the vector c\vec c is pointing into the page.

3.4Vector algebra

In this section, we describe the various algebraic operations that can be performed using vectors.

3.4.1Multiplication/division of a vector by a scalar

One can multiply (or divide) a vector by a scalar (a number). Suppose that we are given a vector v=(vx,vy,vz)\vec v=(v_x, v_y, v_z) and a scalar aa. The multiplication ava\vec v is defined to be a new vector, say w\vec w, whose components are the components of v\vec v multiplied by aa:

w=av=(avx,avy,avz)\vec w = a\vec v = (av_x, a v_y, av_z)

Similarly, the division of a vector by a scalar is defined analogously by dividing each Cartesian component by the scalar::

w=va=(vxa,vya,vza)\vec w = \frac{\vec v}{a} = \left(\frac{v_x}{a}, \frac{v_y}{a}, \frac{v_z}{a}\right)

In particular, this makes it easy to determine the unit vector, v^\hat v, that points in the same direction as v\vec v:

v^=vv\hat v = \frac{\vec v}{v}

where vv is the (scalar) magnitude of v\vec v.

3.4.2Addition/subtraction of two vectors

The sum of two vectors, a\vec a and b\vec b, is found by adding the components of the two vectors. Similarly, the difference between two vectors is found by subtracting the components. For example, if c=a+b\vec c=\vec a+\vec b, the components of c\vec c are given by:

c=a+b=(axay)+(bxby)(cxcy)=(ax+bxay+by)\begin{align*} \vec c &= \vec a + \vec b = \begin{pmatrix} a_x \\ a_y \\ \end{pmatrix} + \begin{pmatrix} b_x \\ b_y \\ \end{pmatrix}\\ \therefore \begin{pmatrix} c_x \\ c_y \\ \end{pmatrix} &=\begin{pmatrix} a_x+b_x \\ a_y+b_y \\ \end{pmatrix} \end{align*}

where we chose to use the “column vector” notation. The column vector notation highlights the fact that the algebra (addition, subtraction) is performed independently on the xx and yy components. We can thus write this sum equivalently as two scalar equations, one for each coordinate:

cx=ax+bxcy=ay+by\begin{align*} c_x &= a_x+b_x\\ c_y &= a_y+b_y \end{align*}

Vectors can thus be used as a short-hand notation for representing multiple equations (one equation per component). When we use vectors to write an equation such as:

F=ma\vec F = m\vec a

we really mean that there is one scalar equation per component of the vectors:

Fx=maxFy=mayFz=maz\begin{align*} F_x &= ma_x\\ F_y &= ma_y\\ F_z &= ma_z \end{align*}

Geometrically, one can easily visualize the addition and subtraction of vectors. This is illustrated in Figure 10 for the case of adding vectors a\vec a and b\vec b to get the vector c\vec c. Geometrically, the sum of the vectors a\vec a and b\vec b (sometimes also called the “resultant”) can be found by:

  1. Placing the “tail” of vector b\vec b at the “head” of a\vec a (think of an arrow, the pointy part is the head and the feathery part is the tail)
  2. Drawing the vector that goes from the tail of vector a\vec a to the head of vector b\vec b.
Geometric addition of the vectors $\vec a$ and $\vec b$ by placing them "head to tail".

Figure 10:Geometric addition of the vectors a\vec a and b\vec b by placing them “head to tail”.

Subtracting two vectors geometrically is done in the same way as addition. For example, the vector c\vec c, given by c=ab\vec c=\vec a -\vec b can also be expressed as c=a+(1)b\vec c = \vec a + (-1) \vec b. That is, first multiply the vector b\vec b by minus 1 (which just reverses its direction), then add that vector, “head to tail”, to the vector a\vec a.

Now that we know how to add vectors, we can better understand the notation a=axx^+ayy^\vec a = a_x \hat x+ a_y\hat y. This is not simply a notation, but is in fact algebraically correct. It means: “multiply the vector x^\hat x by axa_x (thus giving it a length of axa_x) and then add aya_y times the vector y^\hat y”. This is illustrated in Figure 11, which shows the unit vectors, x^\hat x and y^\hat y, which are then multiplied by axa_x and aya_y, respectively, and then added together “head to tail”.

Illustration that the notation $\vec a = a_x \hat x+ a_y\hat y$ is in fact the vector addition of $a_x \hat x$ and $a_y \hat y$.

Figure 11:Illustration that the notation a=axx^+ayy^\vec a = a_x \hat x+ a_y\hat y is in fact the vector addition of axx^a_x \hat x and ayy^a_y \hat y.

3.4.3The scalar product

There are two ways to “multiply” vectors: the “scalar product” and the “vector product”. The scalar product (or “dot product”) takes two vectors and results in a scalar (a number). The vector product (or “cross product”) takes two vectors and results in a third vector.

The scalar product, ab\vec a \cdot \vec b, of two vectors a\vec a and b\vec b, is defined as the following:

ab=axbx+ayby\vec a \cdot \vec b=a_xb_x +a_yb_y

That is, one multiplies the individual components of the two vectors and then adds those products for each component. This is easily extended to the three dimensional case by adding a term azbza_zb_z to the sum. The scalar product is also related to the angle between the two vectors when the vectors are placed “tail to tail”, as in Figure 12

ab=abcosθ\vec a \cdot \vec b= ab\cos\theta
Illustration of the angle between vectors $\vec a$ and $\vec b$ when these are placed tail to tail.

Figure 12:Illustration of the angle between vectors a\vec a and b\vec b when these are placed tail to tail.

The scalar product between two vectors of a fixed length will be maximal when the two vectors are parallel (cosθ=1\cos\theta=1) and zero when the vectors are perpendicular (cosθ=0\cos\theta =0). The scalar product is thus useful when we want to calculate quantities that are maximal when two vectors are parallel.

3.4.4The vector product

The vector (or cross) product takes two vectors to produce a third vector that is mutually perpendicular to both vectors. The vector product only has meaning in three dimensions. Two vectors that are not co-linear, meaning they can not be arranged so that they lie along the same line, can always be used to define a plane in three dimensions. The cross product of those two vectors will give a third vector that is perpendicular to the plane (making it perpendicular to both vectors).

Algebraically, the three components of the vector product, a×b\vec a\times \vec b, of vectors a\vec a and b\vec b are found as follows:

a×b=(aybzazbyazbxaxbzaxbyaybx)\vec a \times \vec b =\begin{pmatrix} a_yb_z - a_z b_y\\ a_zb_x - a_x b_z\\ a_xb_y - a_y b_x\\ \end{pmatrix}

One important property to note is that a×b=b×a\vec a \times \vec b = -\vec b \times \vec a; that is, the cross product is not commutative (the order matters). The magnitude of the vector obtained by a cross product is given by:

a×b=absinθ||\vec a \times \vec b ||=ab\sin\theta

where θ is the angle between the vectors a\vec a and b\vec b when these are placed tail to tail (Figure 12). The vector resulting from a cross product will be null (have a zero length) if the vectors a\vec a and b\vec b are parallel, and will have a maximal length when these are perpendicular. The cross product is useful to determine quantities that are maximal when two vectors are perpendicular.

Geometrically, one can determine the direction of the cross product of two vectors by using a “right hand rule”. To distinguish it from another right hand rule (see Section 3.6.3), we will call it “the right hand rule for the cross product”). This is done by using your right hand, aligning your thumb with the first vector and your index with the second vector. The cross product will point in the direction of your middle finger (when you hold your middle finger perpendicular to the other two fingers). This is illustrated in Figure 14. Thus, you can often avoid using equation (18) and instead use the right hand rule to determine the direction of the cross product and equation (19) to find its magnitude.

Using the right hand rule for cross products to find the direction of the cross product of vectors $\vec a$ (upwards) and $\vec b$ (into the page).

Figure 14:Using the right hand rule for cross products to find the direction of the cross product of vectors a\vec a (upwards) and b\vec b (into the page).

The unit vectors that define a coordinate system have the following properties relative to the cross product:

x^×y^=z^y^×z^=x^z^×x^=y^\begin{align*} \hat x \times \hat y &= \hat z\\ \hat y \times \hat z &= \hat x\\ \hat z \times \hat x &= \hat y\\ \end{align*}

For these properties to be correct, it should be noted that the direction of the zz axis in three dimensions is specified by the choice of xx and yy axes. That is, one can freely choose the direction of the xx and yy axes, which then define a plane to which the zz axis will be perpendicular. The direction of the zz axis must be chosen so that x^×y^=z^\hat x \times \hat y = \hat z (this guarantees that the coordinate system is “right handed”), as in Figure 15.

Two possible orientations for a three dimensional coordinate system. You can confirm using the right hand rule that the $z$ axis is the cross product $\hat x \times \hat y$.

Figure 15:Two possible orientations for a three dimensional coordinate system. You can confirm using the right hand rule that the zz axis is the cross product x^×y^\hat x \times \hat y.

3.5Exploring Vectors with Simulations

3.5.1Using PhET to Explore Vector Properties

The properties of vectors described in this section can be explored using the Phet Simulation in Figure 16. To begin, click on the “Explore 2D”. Drag a vector a\vec{a} onto the graph, and place it anywhere. Take note of the vector properties.

  • magnitude, a=a\lvert\vec{a}\rvert=\lvert\lvert\vec{a}\rvert\rvert
  • angle, θ
  • xx-component, axa_x
  • yy-component, aya_y

Move the vector so that its tail is at the origin. Then, move the vector somewhere else. These properties do not change with location, indicating vectors have no location. Calculate the vector components using trigonometry.

ax=acosθay=asinθa_x = \lvert\vec{a}\rvert \cos\theta\\ a_y = \lvert\vec{a}\rvert \sin\theta

Figure 16:A PhET simulation to explore vector properties.

Click on the “Equations” tab. The simulation has two vectors a\vec{a} and b\vec{b} drawn along with their sum c\vec{c}. Drag these vectors so that the head of a\vec{a} meets the tail of b\vec{b}. Vector c\vec{c} can be moved to go from the tail of a\vec{a} to the head b\vec{b}. This is how we draw the sum of two vectors. Therefore, c=a+b\vec{c}= \vec{a}+\vec{b}. Verify that adding the components of a\vec{a} and b\vec{b} gives the vector c\vec{c}. Using the “Base Vectors” dropdown, you can modify the vectors to see how changing their components changes their length and angles. The vector c\vec{c} will always result in their sum.

What happens when we subtract vectors. Subtracting is the same as adding the negative of a vector, that is, making each component the negative of its value. Explore how subtracting a vector changes the resulting $\vec{c}.

3.5.2Drawing Vectors in VPython

We can create our own vector simulations using the VPython trinket in Figure 17. Clicking the button to run the simulation shows the cartesian unit vectors located at the origin for reference. In VPython we can define a cartesian vector in two ways.

r1 = vec(1, 2, 3)
r1 = vector(1, 2, 3)

This could be an indication of the position of the object relative to an origin O = vec(0,0,0). We draw a vector using the arrow object and give it the name arw1 pointing to this position. The arrow object will place the tail of the arrow at pos=vec(x, y, z). The head of the arrow will be located by the axis=vec(x2, y2, z2), where the head is at the position corresponding to pos + axis. This code will place a vector tail at the origin and the head at r1=1i^+2j^+3k^\vec{r}_1=1\hat{i}+2\hat{j}+3\hat{k}.

r1 = vec(1, 2, 3)
arw1 = arrow(pos=vec(0,0,0), axis=r1, color=color.white)

Copy this code at the bottom of the trinket below to see how it draws the arrow.

Figure 17:A trinket with unit vectors to simulate various vectors.

Change the tail position to (1,1,1) to see how the vector moves in 3D space. The magnitude of a vector a\vec{a} can be calculated in VPython as

mag(a)

Use this to calculate the magnitude of r1 and print the value using print(mag(r1)). The angle a vector makes with respect to the xx-axis can be calculated in VPython as

diff_angle(a, vec(1,0,0))

Use this to calculate the angle of r1 and print the angle value. The angle will be in radians.

In VPython, objects’ attributes can be manipulated mathematically. For example, two vectors drawn as arrows arw1 and arw2 can be added together.

r1 = vec(1,1,0)
r2 = vec(1,-1,0)
arw1 = arrow(pos=vec(0,0,0), axis=r1, color=color.cyan)
arw2 = arrow(pos=r1, axis=r2, color=color.yellow)
arw3 = arrow(pos=arw1.pos, axis=arw1.axis+arw2.axis, color=color.magenta)
print(arw3.axis)

3.6Example uses of vectors in physics

This section gives a quick overview of some applications of vectors in physics.

3.6.1Kinematics and vector equations

Kinematics is the description of the position and motion of an object (Chapters and ). The laws of physics are the principles that ultimately allow us to determine how the position of an object changes with time. For example, Newton’s Laws are a mathematical framework that introduce the concepts of force and mass in order to model and determine how an object will move through space.

We often use a position vector, r(t)\vec r(t), to describe the position of an object as a function of time. Because the object can move, the position vector is a function of time. A position vector is a special vector in the sense that it should be considered to be fixed in space; the position vector for an object points from the origin of a coordinate system to the location of the object.

The three components of the position vector in Cartesian coordinates, are the xx, yy, and zz coordinates of the object:

r(t)=(x(t)y(t)z(t))\vec r(t) = \begin{pmatrix} x(t) \\ y(t) \\ z(t) \\ \end{pmatrix}

where the three coordinates of the object are functions of time if the object can move. Suppose that the object was initially at position r1=(x1,y1,z1)\vec r_1=(x_1, y_1, z_1) at some time t=t1t=t_1, and that later, at time t=t2t=t_2, the object was at as second position, r2=(x2,y2,z2)\vec r_2=(x_2, y_2, z_2). We can define the displacement vector, d\vec d, as the vector from position r1\vec r_1 to position r2\vec r_2:

d=r2r1=(x2x1y2y1z2z1)=(ΔxΔyΔz) \vec d = \vec r_2 - \vec r_1 =\begin{pmatrix} x_2-x_1 \\ y_2-y_1 \\ z_2-z_1 \\ \end{pmatrix} = \begin{pmatrix} \Delta x \\ \Delta y \\ \Delta z \\ \end{pmatrix}

The displacement vector is such that one can add the vector d\vec d to the vector r1\vec r_1 to describe the new position of the object at time t2t_2:

d=r2r1r2=r1+d\begin{align*} \vec d &= \vec r_2 - \vec r_1\\ \therefore \vec r_2 &= \vec r_1 + \vec d \end{align*}

The components of the displacement vector, Δx\Delta x, Δy\Delta y, and Δz\Delta z correspond to the displacements (the distance travelled) along the xx, yy, and zz axes, respectively. This is illustrated for the two dimensional case in Figure 18.

Illustration of a displacement vector, $\vec d = \vec r_2 -\vec r_1$, for an object that was located at position $\vec r_1$ at time $t_1$ and at position $\vec r_2$ at time $t_2$.

Figure 18:Illustration of a displacement vector, d=r2r1\vec d = \vec r_2 -\vec r_1, for an object that was located at position r1\vec r_1 at time t1t_1 and at position r2\vec r_2 at time t2t_2.

The velocity vector of the object, v=(vx,vy,vz)\vec v=(v_x, v_y, v_z), is defined to be the displacement vector, d\vec d, divided by the amount of time (a scalar) that elapsed, Δt=t2t1\Delta t=t_2-t_1, while the object moved by the corresponding displacement:

v=dΔt=(ΔxΔtΔyΔtΔzΔt)\vec v = \frac{\vec d}{\Delta t}=\begin{pmatrix} \frac{\Delta x}{\Delta t} \\ \frac{\Delta y}{\Delta t} \\ \frac{\Delta z}{\Delta t} \\ \end{pmatrix}

We used the property that dividing a vector by a scalar (Δt\Delta t) is defined as dividing each component by the scalar. If we write the components of the velocity vector out explicitly, we have:

(vxvyvz)=(ΔxΔtΔyΔtΔzΔt)\begin{pmatrix} v_x \\ v_y \\ v_z \\ \end{pmatrix} = \begin{pmatrix} \frac{\Delta x}{\Delta t} \\ \frac{\Delta y}{\Delta t} \\ \frac{\Delta z}{\Delta t} \end{pmatrix}

That is, we can think of each row in this “vector equation” as an independent equation. That is, when we write the vector equation:

v=dΔt\vec v = \frac{\vec d}{\Delta t}

we are really just using a shorthand notation for writing the three independent equations that are true for each individual component of the vectors:

vx=ΔxΔtvy=ΔyΔtvz=ΔzΔt\begin{align*} v_x &= \frac{\Delta x}{\Delta t} \\ v_y &= \frac{\Delta y}{\Delta t} \\ v_z &= \frac{\Delta z}{\Delta t} \\ \end{align*}

Whenever we write an equation using vectors, we are really writing out multiple equations all at once, one for each component. Newton’s Second Law:

F=ma\vec F = m \vec a

thus corresponds to the three (scalar) equations:

Fx=maxFy=mayFz=maz\begin{align*} F_x &= ma_x\\ F_y &= ma_y\\ F_z &= ma_z\\ \end{align*}

3.6.2Work and scalar products

As we will see, “work” is a scalar quantity that allows us to determine the change in the speed (squared) of an object that results from a force exerted over a particular displacement (Chapter Section 7.1). Both force and the displacement are vector quantities (a force has a magnitude and is exerted in a particular direction). The work, WW, done by a force, F\vec F, over a displacements, d\vec d, is defined as:

W=FdW = \vec F \cdot \vec d

The work energy theorem tells us that this work is related to the change in speed squared of the object as it moves along the displacement vector dd. If the work is zero, the object has the same speed at the beginning and end of the displacement. If the work is positive, the object is moving faster at the end of the displacement (and slower if the work is negative). A one dimensional example is shown in Figure 19, which shows a force F\vec F being applied to a block as it slides along the ground over a distance dd (represented by the displacement vector d\vec d).

Example of a force $\vec F$ being applied on an object as it moves along the displacement vector $\vec d$.

Figure 19:Example of a force F\vec F being applied on an object as it moves along the displacement vector d\vec d.

Intuitively, it makes sense that only the horizontal component of the force would contribute to changing the speed of the object as it moves along the horizontal trajectory defined by the vector d\vec d. The vertical component of the force does not contribute to changing the speed of the object. Thus, the work (the change in speed), should only depend on the component of the force that is parallel to the displacement vector. The scalar product allows us to formalize this in an equation. The scalar product is given by:

Fd=Fdcosθ=Fd\vec F \cdot \vec d = Fd\cos\theta = F_{\parallel}d

where we introduced F=FcosθF_{\parallel} = F\cos\theta as the component of F\vec F that is parallel to d\vec d (see Figure 19). The scalar product thus “picks out” the component of F\vec F that is parallel to d\vec d, which is exactly what we need to in order for work to make sense.

3.6.3Using vectors to describe rotational motion

Often, we need to describe rotational motion in physics. If an object is rotating, one must specify:

  1. The axis about which the object is rotating
  2. The direction about that axis in which the object is rotating (e.g. clockwise or counter-clockwise)
  3. How fast the object is rotating We introduce a new type of vector, an “axial vector”, to describe this kind of rotational motion. We choose the direction of the vector to be co-linear with the axis of rotation and the magnitude of the vector to represent the speed with which the object is rotating. We are thus left with two choices for the direction of the vector. For example, consider the wheels on a car that is moving away from you (Figure 20, the car is moving into the page). The axis of rotation is the axis of the wheel, so we know that the vector describing the wheel’s rotation (the angular velocity vector) must point either to the left or to the right.
The wheels on a car that is driving away from you.

Figure 20:The wheels on a car that is driving away from you.

We choose the direction of the vector by using another right hand rule. We will refer to this as “the right hand rule for axial vectors” to distinguish it from the right hand rule for the cross product. When using the right hand rule for axial vectors, the vector points in the direction of your thumb when you curl your fingers in the direction of rotation, as in Figure 21. For the car moving away from you, the wheels will be turning such that the closest point to you is moving up and the furthest point is moving down. Using the right hand rule, we find that the rotation vector points to the left.

Using the right hand rule for axial quantities. In this case, the direction of rotation is counter clockwise when looking at the page (the direction that the fingers curl), so the rotation vector points out of the page (the direction of the thumb).

Figure 21:Using the right hand rule for axial quantities. In this case, the direction of rotation is counter clockwise when looking at the page (the direction that the fingers curl), so the rotation vector points out of the page (the direction of the thumb).

We have to distinguish axial vectors from “true” vectors because they do not behave like true vectors in all cases. For instance, imagine that there is a giant mirror that runs parallel to the road (Figure 22). When the car is reflected in the mirror, the reflected car will also be moving away from you. This means that the wheels will be turning in the same direction as before, so the rotation vector still points to the left. Now consider a true vector, like a velocity vector. If the velocity vector initially pointed to the left (i.e. if the car was moving to the left), the reflected car would be moving to the right. So, we expect a true vector to change directions when it is reflected in this way. Since the rotation vector does not always behave like a true vector, we call it an axial vector or a “pseudovector.”

Left: The angular velocity vector for the rotation of the wheels, $\vec \omega$, which points to the left, also points left in the reflection. Right: The velocity vector, pointing to the left, points to the right in the reflection of the car. The angular velocity vector is called an "axial" or "pseudo" vector because it does not change direction under a reflection.

Figure 22:Left: The angular velocity vector for the rotation of the wheels, ω\vec \omega, which points to the left, also points left in the reflection. Right: The velocity vector, pointing to the left, points to the right in the reflection of the car. The angular velocity vector is called an “axial” or “pseudo” vector because it does not change direction under a reflection.

3.6.4Torque and vector products

We will introduce the concept of a torque in order to describe how a force can cause an object to rotate. Consider the disk illustrated in Figure 23 that is free to rotate about an axis that goes through its centre and that is perpendicular to the plane of the page. A force F\vec F is applied at the edge of the disk (imagine pulling on a string attached to the edge of the disk), at a position that is displaced from the axis of rotation by the vector r\vec r. The torque, τ\vec \tau, of the force about the centre of the disk is defined to be:

τ=r×F\vec\tau=\vec r\times \vec F

and represents how much the force F\vec F will contribute to making the disk rotate about its axis. If the force vector were parallel to the vector r\vec r, the disk would not rotate; if you pull outwards on a disk, it will not rotate about its centre. However, if the force is perpendicular to the vector r\vec r (i.e. tangent to the circumference of the disk), then it will maximally cause the disk to rotate. The magnitude of the torque (cross-product) is given by:

τ=rFsinθ=Fr=Fr\tau =rF\sin\theta=F_{\perp}r=Fr_\perp

where θ is the angle between the vectors when placed tail to tail, as in the right side of Figure 23. In the last two equalities, we have defined F=FsinθF_\perp=F\sin\theta or r=rsinθr_\perp=r\sin\theta to refer to the part of the vector F\vec F that is perpendicular to the vector r\vec r or the part of the vector r\vec r that is perpendicular to the vector F\vec F. That is, the vector product “picks out” the part of a vector that is perpendicular to the other, which is exactly the property that we need for the physical quantity of torque.

A force, $\vec F$, is exerted in the plane of a disk at a position given by the vector $\vec r$ relative to the centre of the disk.

Figure 23:A force, F\vec F, is exerted in the plane of a disk at a position given by the vector r\vec r relative to the centre of the disk.

3.7Summary

Cartesian coordinate systems can be defined using an origin, and mutually perpendicular axes that specify a direction in which each corresponding coordinate increases. The position of a point is described by the coordinates of the point (one coordinate per axis). Polar, cylindrical and spherical coordinate systems can be defined relative to a Cartesian coordinate system and sometimes facilitate the description of situations with cylindrical (azimuthal) or spherical symmetry.

Vectors can be represented by arrows and are quantities that have both a magnitude and a direction, as opposed to “scalars”, which are simply numbers. Vectors are not fixed in space, so two vectors are equal if they have the same magnitude and direction, regardless of where they are drawn. We place a little arrow above a variable, d\vec d, to indicate that it is a vector. There are several, equivalent, notations to indicate the components of a vector:

d=(dx,dy,dz)row vector=(dxdydz)column vector=dxx^+dyy^+dzz^using x^,  y^,  z^=dxi^+dyj^+dzk^using i^,  j^,  k^\begin{align*} \vec d &= (d_x,d_y, d_z)\quad&\text{row vector}\\ &=\begin{pmatrix} d_x \\ d_y \\ d_z\\ \end{pmatrix}\quad&\text{column vector}\\ &= d_x\hat x +d_y \hat y +d_z \hat z\quad&\text{using }\hat x,\;\hat y,\;\hat z\\ &=d_x\hat i +d_y \hat j+d_z \hat k \quad&\text{using }\hat i,\;\hat j,\;\hat k \end{align*}

If we multiply (divide) a vector by a scalar, we multiply (divide) each component of the vector individually by that quantity. As a result, the magnitude of the vector will also be multiplied (divided) by that quantity:

ad=(adxadyadz)a\vec d = \begin{pmatrix} ad_x \\ ad_y \\ ad_z \\ \end{pmatrix}

In particular, we can define a unit vector, d^\hat d, to be a vector of length 1 in the same direction as d\vec d, by simply dividing d\vec d by its magnitude, dd:

d^=dd\hat d = \frac{\vec d}{d}

where the magnitude of the vector, d=d||\vec d|| = d, expressed in Cartesian coordinates, is given by:

d=d=dx2+dy2+dz2||\vec d|| = d =\sqrt{d_x^2+d_y^2+d_z^2}

We can add two vectors by independently adding the individual components of the vectors:

c=a+bcx=ax+bxcy=ay+bycz=az+bz\begin{align*} \vec c &= \vec a + \vec b\\ \therefore c_x &= a_x + b_x\\ \therefore c_y &= a_y + b_y\\ \therefore c_z &= a_z + b_z \end{align*}

Graphically, this corresponds to adding vectors “head to tail”. This also highlights that an equation written using vectors (as the first line above) really represents three independent equations, one for each coordinate of the vectors (or two in two dimensions). Subtraction of vectors is treated in the same way as addition (but using minus signs where appropriate).

One can define the scalar (or dot) product between two vectors, as a scalar quantity that is obtained from the two vectors:

ab=axbx+ayby+azbz\vec a \cdot \vec b = a_xb_x + a_yb_y + a_zb_z

The scalar product is also related to the angle, θ, between the two vectors when these are placed “tail to tail”:

ab=abcosθ\vec a \cdot \vec b = ab\cos\theta

In particular, the scalar product between two vectors is zero if the two vectors are perpendicular to each other (cosθ=0\cos\theta=0), and maximal when these are parallel to each other.

The vector (or cross) product between two vectors is a vector that is mutually perpendicular to both vectors and is defined as the following:

a×b=(aybzazbyazbxaxbzaxbyaybx)\vec a \times \vec b =\begin{pmatrix} a_yb_z - a_z b_y\\ a_zb_x - a_x b_z\\ a_xb_y - a_y b_x\\ \end{pmatrix}

The vector product can only be defined in three dimensions, since it must be mutually perpendicular to the vectors. The magnitude of the vector product is given by:

a×b=absinθ|| \vec a \times \vec b || = ab\sin\theta

where θ is the angle between the two vectors when these are placed tail to tail. In particular, the vector product between two vectors is zero if the two vectors are parallel to each other (and maximal when these are perpendicular). The direction of the vector product is given by the right-hand rule for the cross product.

An axial vector can be used to describe a quantity that is related to rotation. The direction of the axial vector is co-linear with the axis of rotation, its magnitude is given by the magnitude of the rotational quantity (e.g. angular speed), and its direction is defined using the right-hand rule for axial vectors.

3.8Thinking about the Material

3.9Sample problems and solutions

3.9.1Problems

3.9.2Solutions