Vector fields represent fluid flow (among many other things).  They also offer a way to visualize functions whose input space and output space have the same dimension.

Background

Vector notation:
  • i^\hat{\textbf{i}} is the unit vector in the xx-direction
  • j^\hat{\textbf{j}} is the unit vector in the yy-direction
  • k^\hat{\textbf{k}} is the unit vector in the zz-direction
A two-dimensional vector might be written as 2i^3j^2\hat{\textbf{i}} - 3\hat{\textbf{j}}. This same vector could also be written as [23]\left[\begin{array}{c} 2 \\ -3 \end{array} \right].
A typical three-dimensional vector might look like i^+4j^+10k^-\hat{\textbf{i}} + 4\hat{\textbf{j}} + 10\hat{\textbf{k}}, or [1410]\left[\begin{array}{c} -1 \\ 4 \\ 10 \end{array} \right]

What we're building to

  • A vector field associates a vector with each point in space.
  • Vector field and fluid flow go hand-in-hand together.
  • You can think of a vector field as representing a multivariable function whose input and output spaces each have the same dimension.
  • The length of arrows drawn in a vector field are usually not to scale, but the ratio of the length of one vector to another should be accurate. Sometimes vector length is communicated using color.

Warmup: Drawing motion using velocity vectors

How do you draw a moving object? One way, common in math and physics, is to attach the velocity vector describing that object's movement to the drawing.
  • The length (magnitude) of the vector indicates the speed.
  • The direction of the vector indicates which way the object is moving.
For example, suppose you have, oh I don't know, a fox and a whale, each moving to the left. Let's say the fox is moving (or rather being dragged, the way I drew it) 1010 meters per second, and the whale is moving 55 meters per second. You might depict their motions like this:
There are two important conventions to notice in this example:
  1. The description of a vector only tells us its magnitude and direction (e.g. 1010 meters per second to the left), but not where to draw the vector. The choice to attach the tail of the vector the object whose movement it represents is just a convention.
  2. The actual lengths of the vectors in our drawing don't really matter, just as long as the vector attached to the fox is twice as long as the one attached to the whale. You can just tell the person looking at the image "whatever the length of the arrow I just drew off the fox, that's what 1010 meters per second should look like."

Motivating example: Flowing fluids in two dimensions

Now let's kick it up a notch. What instead of depicting the motion of one or two objects, you had a fluid that was flowing in some particular manner. For example, the following animation depicts such a fluid flow by showing the motion of just a few fluid particles (drawn as blue dots):
To represent this kind of motion, we need to convey much more information than just a magnitude and a direction. We need to express the velocity of every individual particle in the fluid.
Actually, when it comes to drawing this motion, we can get away with representing only a sample of the particles. For instance, if you draw a velocity vector on each of the particles shown in the animation, and if you add some coordinate axes to keep track of where everything is, you might get a diagram that looks like this:
If you let your eyes follow the arrows in the image, moving from one to the next, you can get a very good feel for how the fluid it represents flows, even though it is a static image. Particles near each other tend to move at the same speed and direction. Therefore, each arrow not only represents the velocity of the individual particle it is attached to, but it also gives a feel for how the neighborhood of particles around it moves.
A diagram like this is called a vector field.
One important thing to mention about the way people typically draw vector fields is that vectors are almost never drawn to scale. For example, if an individual fluid particle was moving at 1010 meters per second, we should technically make the arrow attached to it 1010 units long, but that could span the entire image! If there were really long arrows attached to each point, directed every which way, the diagram could be a real mess.
As a result, it's common to scale each vector down so that they all fit cleanly in the image. What's important is not the specific length of any one vector, but how the lengths of different vectors compare to each other.
Another way some graphing software represents relative length is to color each vector. For instance, the following image shows the same vector field using colors: Dark blue arrows should be understood to be "shorter" than light blue arrows, even though technically they are all the same length.
Let's think about what a vector field is mathematically. Each point in two-dimensional space is associated with a two-dimensional vector. We can think of this as a (multivariable) vector-valued function, whose input is a point (x,y)(x, y) in two-dimensional space, and whose output is a two-dimensional vector.
For example, the function I used to generate the fluid flow and vector field above is
f(x,y)=[sin(x)+sin(y)sin(x)sin(y)]=(sin(x)+sin(y))i^+(sin(x)sin(y))j^\begin{aligned} \quad f(x, y) &= \left[ \begin{array}{c} \sin(x)+\sin(y) \\ \sin(x)-\sin(y) \end{array} \right]\\ \\ &= (\sin(x)+\sin(y))\hat{\textbf{i}} + (\sin(x)-\sin(y))\hat{\textbf{j}} \end{aligned}
Since both the input and the output of this function have two coordinates, trying to graph it would require four dimensions. But with only a two-dimensional drawing we've represented it almost completely! What's more, this image gives a much better intuition for the swirling fluid it is meant to represent than a graph ever could.
Concept check: Given the formula I just gave for ff, what are the components of a vector attached to the point (π,π2)\left(\pi, \dfrac{\pi}{2}\right) in the xyxy-plane?
The xx-component is
(you might also think of this as the i^\hat{\textbf{i}} component)
The yy-component is
(you might also think of this as the j^\hat{\textbf{j}} component)
Therefore, this vector points
The vector attached to any point (x,y)(x, y) is defined to be f(x,y)f(x, y), so we evaluate f(π,π2)f\left(\pi, \dfrac{\pi}{2}\right):
f(π,π2)=(sin(π)+sin(π2))i^+(sin(π)sin(π2))j^=(0+1)i^+(01)j^=i^j^\begin{aligned} \quad f\left(\pi, \dfrac{\pi}{2}\right) &= \left(\sin(\pi)+\sin\left(\dfrac{\pi}{2}\right)\right)\hat{\textbf{i}} + \left(\sin(\pi)-\sin\left(\dfrac{\pi}{2}\right)\right)\hat{\textbf{j}} \\ &= (0 + 1)\hat{\textbf{i}} + (0 - 1)\hat{\textbf{j}} \\ &= \hat{\textbf{i}} - \hat{\textbf{j}} \end{aligned}
Therefore the xx-component of this vector is 11, meaning it has a rightward component, and the yy-component is 1-1, meaning it has a downward component. In total, it points down and to the right.

Example 1: The identity function

Consider this function:
f(x,y)=[xy]\begin{aligned} \quad f(x, y) = \left[ \begin{array}{c} x\\ y \end{array} \right] \end{aligned}
This associates a given point in two-dimensional space, like (3,4)(3, 4), with a vector that has those same coordinates. For example, this is what the vector attached to (3,4)(3, 4) will look like:
When you do this at many more points in the plane, and scale all the vectors so that they don't get too messy, you get an image like this:
Vector field of f(x,y)=(x,y)f(x, y) = (x, y)

Example 2: No horizontal component

Next consider the function
f(x,y)=[0ysin(x)]\begin{aligned} \quad f(x, y) = \left[ \begin{array}{c} 0\\ y\sin(x) \end{array} \right] \end{aligned}
The xx-component of the output is always 00, so the vectors in our vector field should only point up or down.
The second coordinate of the output tells us how tall each vector should be. Since this has a yy factor, arrows should get longer as we walk away form the xx-axis, and shorter as we walk towards it (why?). There is also a sin(x)\sin(x) factor, so as we walk from left to right, the height of the vectors will oscillate up and down.
Vector field of f(x,y)=(0,ysin(x))f(x, y) = (0, y\sin(x))

Example 3: Using graphs for help

Practice makes perfect, so let's look at one more vector-valued function in two dimensions and reason about what the vector field it represents should look like. Thinking this through is a little bit more involved than the previous examples.
f(x,y)=[1y2y]\begin{aligned} \quad f(x, y) = \left[ \begin{array}{c} 1\\ y^2-y \end{array} \right] \end{aligned}
Since xx does not appear anywhere in the output, the vectors in our field will remain unchanged as we pan left and right (why?).
The first component of all our vectors is always 11, so all vectors will have the same rightward component. As for the second component of the vectors, they will equal y2yy^2 - y, but what does that look like?
We can take a brief sidestep to get a feel for the expression y2yy^2-y by looking at the graph of the single-variable function g(y)=y2yg(y) = y^2 - y. The expression factors as y(y1)y(y-1), so its roots are at 00 and 11. We also know it is an upward facing parabola since it is a quadratic with a positive first term, so we get this graph:
Graph of g(y)=y2yg(y) = y^2 - y
This function is positive outside the range [0,1][0, 1], and slightly negative within it.
Now take a look again at our vector field's function.
f(x,y)=[1y2y]\begin{aligned} f(x, y) = \left[ \begin{array}{c} 1\\ y^2-y \end{array} \right] \end{aligned}
The yy-component of each vector will be slightly negative (i.e. they will point down) when yy is between 00 and 11. As yy gets farther away from that range, going either up or down on the plane, the yy-component of the vector will be increasingly positive, so each vector will point more and more up. Sketching this out, you might get something like this:
Vector field of f(x,y)=(1,y2y)f(x, y) = (1, y^2 - y)

Vector fields in three dimensions

We could do the same thing in three dimensions, perhaps modeling air currents. Analogous to the two-dimensional case, we associate each point in three-dimensional space with a three-dimensional vector and draw only a sample of those vectors.
The following video shows what such a three-dimensional vector field might look like, with colors closer to red indicating longer vectors and colors closer to blue indicating shorter vectors.
This time, our vector field represents a function with a 33-coordinate input and a 33-coordinate output, so graphing it would have required 66 dimensions! The specific function used for this example was
f(x,y,z)=[y+zx+zx+y]\begin{aligned} \quad f(x, y, z) = \left[ \begin{array}{c} y+z\\ x+z\\ x+y \end{array} \right] \end{aligned}
Drawing three-dimensional vector fields can be difficult, and even when we do, perhaps with some graphics software, the vectors can get in each other's way so that it's hard to see what's happening. As a result, this is one of those visualizations that is very useful as a loose idea to hold in your head, but not necessarily useful for precise representations.

Summary

  • A vector field associates a vector with each point in space.
  • Vector field and fluid flow go hand-in-hand together.
  • You can think of a vector field as representing a multivariable function whose input and output spaces each have the same dimension.
  • The length of arrows drawn in a vector field are usually not to scale, but the ratio of the length of one vector to another should be accurate. Sometimes vector length is communicated using color.
Loading