16.1 Vector fields

For the vector field (OverVector[F])(x,y)=⟨y,-x⟩, the graph looks like

VectorPlot[{y,-x},{x,-4,4},{y,-4,4}]

This is the basic command.  Notice that the largest vectors are near the corners of the window and are not the “proper” length.  Here is the same vector field with some options to make all vectors the same length (and some other stuff to make the graph pretty).

VectorPlot[
{y, -x}, {x, -4, 4}, {y, -4, 4},
FrameLabel->{x,y},
Axes->True,
VectorScale->{Small, Small, None},
PlotLabel->"(OverVector[F])(x, y) = ⟨y, -x⟩"
]

It’s a swirly!  Here is the gradient field ∇f(x,y), where f(x,y)=(x^2)+2 x y+(y^3).

VectorPlot[
{2x+2y,2x+3(y^2)}, {x, -4, 4}, {y, -4, 4},
FrameLabel->{x,y},
Axes->True,
VectorScale->{Small, Small, None},
PlotLabel->"∇f(x, y)"
]

Here is a 3D example:

VectorPlot3D[
{z,x,-y}, {x, -4, 4}, {y, -4, 4},{z,-4,4},
Axes->True,
VectorScale->{Small, Small, None},
PlotLabel->"3D Example"
]

Would you like to try to do that by hand?  To really get the best idea of the “flow” of this vector field, you would need to “grab” the graph in Mathematica and rotate it to see it from several angles.

Then main use for vector field is to model fluid flow.  This includes hydrology, meteorology, ocean engineering, ...