18 Introduction
At the end of our course, we will dive into one of the areas in mathematics where all the tools we’ve developed come together: the calculus of vector fields. A vector field is a function which assigns a vector to each point in space. We have mostly been dealing with scalar functions so far, which assign a single number to each point, but we have of course met one very important example of a vector field, the Gradient.
We are very familiar with vector fields from day-to-day life however, for example the wind vector field which assigns each point \((x,y)\) on a map a vector \(W(x,y)=\langle f(x,y),g(x,y) \rangle\) depicting the wind’s magnitude and direction at that location. Below are two such examples, one being a wind-map over San Francisco and the velocity field of an airflow breaking apart into turbulent vorticies, behavior that it is crucial to understand when engineering aircraft and spaceship reentry.
Vector fields are ubiquitous throughout science. Generalizing the wind example above, they play a role in our mathematical modeling of all fluids, where we track a scalar quantity (the pressure) as well as a vector quantity (the velocity) at each point in space. Below the pressure field is shown in color (warmer colors = high pressure, cool colors = low pressure) superimposed with the velocity field drawn as arrows.
Electricity and magnetism are given by force fields, which assign to each point in space a vector from which one can compute the force felt by an object at that location (for the Electric field, this force is directly in the direction given by the vector, for the magnetic field, the force is in the direction of the cross product of this vector with the object’s velocity)
The force of gravity is also descried by a force field, with vectors pointed in the direction an object is pulled by gravity (more on this below!).
The take away here is that vector fields, just like scalar fields, show up all over in mathematics and the sciences, so we should like to extend our theory of multivariable calculus to include them as well. In this brief introductory section we look at how to write down vector fields and how to plot them; in the following sections we will consider their derivatives (curl and divergence) and their integrals (line and surface integrals of vector fields).
18.1 Working with Vector Fields
We will write things down for the 2 dimensional case here, but everything we say applies in all higher dimension (and, we will give 3D examples to follow). A 2 dimensional vector has two components \(\langle p,q\rangle\). In a 2D vector field, we must assign a 2D vector to each point \((x,y)\) in a 2 dimensional region, so these components are themselves functions of \(x\) and \(y\). That is, we can write a field \(\vec{V}\) as
\[\vec{V}=\langle P(x,y),Q(x,y)\rangle\]
or, if we wish to use the basis vector notation, \(P\) is the \(\hat{i}\) component of \(\vec{V}\) and \(Q\) is the \(\hat{j}\) component, so we have
\[\vec{V}=P(x,y)\hat{i}+Q(x,y)\hat{j}\]
And similarly in 3 dimensions where we may write \(\vec{V}=\langle P(x,y,z), Q(x,y,z),R(x,y,z)\rangle\) or \(\vec{V}=P\hat{i}+Q\hat{j}+R\hat{k}\). If the functions \(P, Q\) are constant then the vector field \(V\) assigns the same vector to each point in space.
The constant vector fields \(\vec{V}=\langle 1,0\rangle\) (left) and \(\vec{W}=\langle 1,1,\rangle\) (right).
Other vector fields vary in magnitude but not direction, by taking a fixed vector and scalar multiplying it by a function of \((x,y)\):
The vector fields \(\vec{V}=\langle x,0\rangle\) (left) and \(\vec{W}=\langle y,0\rangle\) (right).
Or, a vector field can vary in direction without changing magnitude, such as a field of all unit vectors. Such a vector field can be written down by taking any nonzero vector field and dividing by its magnitude, for example.
The vector fields \(\vec{V}=\langle \frac{x}{\sqrt{x^2+y^2}},\frac{y}{\sqrt{x^2+y^2}}\rangle\) (left) and \(\vec{W}=\langle \frac{y}{\sqrt{x^2+y^2}},\frac{-x}{\sqrt{x^2+y^2}}\rangle\) (right).
General vector fields vary in both magnitude and direction, like the wind. Here’s a quick desmos program that you can use to draw your own
And below is another graphing calculator I wrote that you can use to plot vector fields in the plane.
18.1.1 Example: Gravity
Let’s try to use vector fields to write down the gravitational force. First, let’s start with Galileo’s approximation that gravity is constant and pointed straight down towards the surface of the earth.
If we model space here as the \(xy\) plane, with the \(y\) axis upwards and the \(x\) axis horizontal, gravity is modeled by a constant vector pointed straight downwards: indeed for some constant \(g\) we may write the gravitational acceleration as
\[\vec{a}=\langle 0,-g\rangle = -g\hat{j}\] and then since \(F=ma\), the force felt by an object of mass \(m\) is just the scalar multiple of this by \(m\):
\[\vec{F}=\langle 0,-mg\rangle = -mg\hat{j}\]
This approximation works perfectly well on the surface of the earth, as we know from mathematical modeling experience in highschool or introductory college physics (where, neglecting air resistance, one finds that objects thrown into the air follow parabolas.) However at the larger scale of planetary dynamics, Newton proposed an updated law, which reads like this in words:
The gravitational acceleration of experienced from an object points in the direction of that object, and has magnitude proportional to the mass of the object divided by the square of the distance that object is away.
Let’s convert this into a formula for the gravitational field \(\vec{F}(x,y,z)\) in 3 dimensional space. To make things a little easier, lets place our object at the origin \((0,0,0)\) and say its mass is \(M\). If you are at the location \((x,y,z)\), then the force on you is supposed to point towards the object, so it should point in the direcion of the vector connecting you to the origin:
\[\vec{d}=(0,0,0)-(x,y,z)=\langle -x,-y,-z\rangle\]
Because we are given information about both the direction and magnitude in the description, it might be useful to record this direction as a unit vector so all the magnitude information can be scalar multipled by it. This gives
\[\hat{d}=\left\langle \frac{-x}{\sqrt{x^2+y^2+z^2}},\frac{-y}{\sqrt{x^2+y^2+z^2}},\frac{-z}{\sqrt{x^2+y^2+z^2}} \right\rangle\]
The distance to the origin is \(\sqrt{x^2+y^2+z^2}\) and the squared distance to the origin is \(x^2+y^2+z^2\). Thus, the magnitude of the gravitational force is supposed to be proportional to \(M/(x^2+y^2+z^2)\). Let’s call the proportionality constant \(G\) (its value is set by whatever units we are using, in standard SI units its about \(6\cdot 10^{-11}\).) This tells us the magnitude of the gravitational acceleration should be
\[\frac{GM}{x^2+y^2+z^2}\]
Multiplying this by the direction gives the acceleration, and the force is given by then further multiplying by the mass of you (the object at \((x,y,z)\)): let’s call that \(m\)
\[\vec{F}=\frac{GMm}{x^2+y^2+z^2}\left\langle \frac{-x}{\sqrt{x^2+y^2+z^2}},\frac{-y}{\sqrt{x^2+y^2+z^2}},\frac{-z}{\sqrt{x^2+y^2+z^2}} \right\rangle\]