Vector Fields - A Simple and Painless Introduction

Embed Size (px)

Citation preview

  • 7/22/2019 Vector Fields - A Simple and Painless Introduction

    1/12

    12/5/13 Vector fields - a simple and painless introduction :: squareCircleZ

    www.intmath.com/blog/vector-fields-a-simple-and-painless-introduction/3345

    squareCircleZ

    Mathematics, learning, computing, travel and whatever

    Search

    Share this page:

    Blog HomeBlog SitemapBlog ArchivesSearchInteractive MathematicsAbout

    Vector fields a simple and painless introduction

    [14 Sep 2009]

    Vector fields provide an interesting way to look at the world.

    First, a quick bit of background. A vectoris a quantity with magnitude and direction. A simple example is thevelocity of a car that is traveling at 100 km/h in a Northerly direction. The vector representing this motion has

    magnitude100 km/h and direction North. We usually represent a vector using an arrow. The size and directionof the arrow indicates the magnitude and direction of the vector. (See more in the Vectorschapter in IntMath.)

    Before I tell you what a vector field is, lets look at a few examples. Each of them involves patterns the buildingblock of all math.

    Weather charts wind speed and direction

    The daily weather chart (showing wind speeds) is an example of a vector field. The wind direction and strength isgiven for different points on the Earths surface.

    http://www.intmath.com/blog/category/contacthttp://www.intmath.com/http://www.intmath.com/help/search-g.phphttp://www.intmath.com/blog/http://www.intmath.com/blog/http://www.intmath.com/blog/http://www.intmath.com/Vectors/Vectors-intro.phphttp://www.intmath.com/blog/category/contacthttp://www.intmath.com/http://www.intmath.com/help/search-g.phphttp://www.intmath.com/blog/archiveshttp://www.intmath.com/blog/squarecirclez-sitemaphttp://www.intmath.com/blog/http://www.intmath.com/includes/social.phphttp://www.intmath.com/blog/http://www.intmath.com/blog/
  • 7/22/2019 Vector Fields - A Simple and Painless Introduction

    2/12

    12/5/13 Vector fields - a simple and painless introduction :: squareCircleZ

    www.intmath.com/blog/vector-fields-a-simple-and-painless-introduction/3345 2

    [Image source]

    In the above chart of the Australia/South Asia region, gentle winds (across most of the Indian Ocean) areindicated by a small arrow head, and stronger winds by larger arrow heads. Winds rotate around high and low

    pressure systems, in opposite directions for the Northern and Southern hemispheres.

    Below is another wind chart giving us a better idea what a vector field is. This time we are looking at the windssurrounding Cyclone Ike, which devastated Texas in September 2008. The winds in the center were over 200km/h. (The scale on the chart is in knots, the unit we usually use for wind speed.) The direction of the "F"symbols indicate wind speed, while the color indicates magnitude.

    http://www.bom.gov.au/cgi-bin/nmoc/latest.pl?IDCODE=IDD80105
  • 7/22/2019 Vector Fields - A Simple and Painless Introduction

    3/12

    12/5/13 Vector fields - a simple and painless introduction :: squareCircleZ

    www.intmath.com/blog/vector-fields-a-simple-and-painless-introduction/3345 3

    Wind chart Cyclone Ike from the Quikscat satellite [source]

    Another example of a vector field is the pattern made by iron filings when under the influence of a magnetic field.

    Iron filings lining up around a magnet. Image source

    Were ready for a loose definition of a vector field.

    http://upload.wikimedia.org/wikipedia/commons/5/57/Magnet0873.pnghttp://www.surfline.com/surfline/forecasts4/forecast_blog.cfm?month=9&year=2008
  • 7/22/2019 Vector Fields - A Simple and Painless Introduction

    4/12

    12/5/13 Vector fields - a simple and painless introduction :: squareCircleZ

    www.intmath.com/blog/vector-fields-a-simple-and-painless-introduction/3345 4

    Definition of Vector Field

    A vector field is simply a diagram that shows the magnitude and direction of vectors (forces, velocities, etc) indifferent parts of space.

    Vector fields exhibit certain common shapes, which include a source (where the vectors emanate out of onepoint), a sink (where the vectors disappear into a hole, something like a black hole effect), a saddle point

    (which looks like a horses saddle), and a rotation (where objects rotate around some point, something like aplanetary system).

    Following are some excellent visualizations of vector fields for you. If you visit the links, you can play with thevector fields to explore the concepts involved.

    Theres some pretty neat art going on, too, but thats just a lucky outcome.

    Rotations, sinks, sources, and saddle points

    Visit the following example from the Demonstrations site by Wolfram. These interactives are made usingMathematica. There are 2 things you can do:

    Watch an animation that shows the outcome of parameter changes (click the watch Web preview link atthe top right of each animation), orYou can download the Mathematica Player and interact with the documents, and explore by changing

    parameters. This is recommended!

    The link to the interactive: Vector Fields: Streamline through a Point

    In this interactive, you can grab the point indicated by the larger dot and explore the direction of the vector field.The developer says:

    Drag the locator; the red streamline then passes through that point, illustrating the flow of the vectorfield. The vector fields show rotations, sinks, sources, and saddle points.

    http://demonstrations.wolfram.com/VectorFieldsStreamlineThroughAPoint/
  • 7/22/2019 Vector Fields - A Simple and Painless Introduction

    5/12

    12/5/13 Vector fields - a simple and painless introduction :: squareCircleZ

    www.intmath.com/blog/vector-fields-a-simple-and-painless-introduction/3345 5

    A source

  • 7/22/2019 Vector Fields - A Simple and Painless Introduction

    6/12

    12/5/13 Vector fields - a simple and painless introduction :: squareCircleZ

    www.intmath.com/blog/vector-fields-a-simple-and-painless-introduction/3345 6

    A saddle point

  • 7/22/2019 Vector Fields - A Simple and Painless Introduction

    7/12

    12/5/13 Vector fields - a simple and painless introduction :: squareCircleZ

    www.intmath.com/blog/vector-fields-a-simple-and-painless-introduction/3345 7

    A hilly bowl-shaped vector field

    A Neural Network and vector fields

    Your brain consists of millions of neural networks. When you start thinking about something, some of yourneurons fire and this triggers nearby brain cells to fire. Soon (within milliseconds), a larger network of neurons

    begins to fire (you are getting excited about what you are thinking about and it begins to consume more of yourattention).

    This scenario is demonstrated in the following screen shots from the animation: Cellular-Automaton-Like NeuralNetwork in a Toroidal Vector Field

    The first torus shows the beginnings of our thought, the second one shows the network after some excitation.

    http://demonstrations.wolfram.com/CellularAutomatonLikeNeuralNetworkInAToroidalVectorField/
  • 7/22/2019 Vector Fields - A Simple and Painless Introduction

    8/12

    12/5/13 Vector fields - a simple and painless introduction :: squareCircleZ

    www.intmath.com/blog/vector-fields-a-simple-and-painless-introduction/3345 8

    Neurons firing in a neural network

    The developer of this interactive says:

    Red indicates cellular activity (a neuronal spike) while blue indicates inactivity. Color intensityencodes the value of a binary internal state variable. The weights between each cell and each of itsneighbors have been adjusted to reflect Boltzmann-like transition probabilities appropriate for flowin a constant vector field on a torus (the angle of the field is an adjustable parameter in this

    Demonstration).

    Vector Field Java Applet (from Falstad)

    This is a superb interactive. There are a huge number of examples here (use the pull-down arrows at the top rightof the java applet), with clear animations indicating direction and magnitude (usually velocity or forces involved).

    The link: Vector field animations (java applet).

    A screen shot:

    3-D Vector Fields

    Here is an animation from Australias Bureau of Meteorology showing the wind velocities involved when a highand a low pressure centre interact.

    http://www.falstad.com/vector/http://www.falstad.com/vector/
  • 7/22/2019 Vector Fields - A Simple and Painless Introduction

    9/12

    12/5/13 Vector fields - a simple and painless introduction :: squareCircleZ

    www.intmath.com/blog/vector-fields-a-simple-and-painless-introduction/3345 9

    Source: Animations of wind in 3 dimensions

    Here are some more examples of 3-D vector fields, once again from Wolframs Demonstrations.

    Modeling Game Behaviour

    This next one is a vector field related to gaming and learning.

    http://demonstrations.wolfram.com/3DVectorFields/http://www.bom.gov.au/lam/Students_Teachers/pressure.shtml
  • 7/22/2019 Vector Fields - A Simple and Painless Introduction

    10/12

    12/5/13 Vector fields - a simple and painless introduction :: squareCircleZ

    www.intmath.com/blog/vector-fields-a-simple-and-painless-introduction/3345 10

    We all learn from experience. We tend to be attracted to strategies (in real life and in games) that weresuccessful in the past. Experience-weighted attraction (EWA) learning is a model of game behaviour where wemodify our strategies based on our success with those strategies. For example, in the game of chess, we may findthat we are most successful when attacking with our knights, so we continue to use that approach. But ouropponent learns what we are doing and develops a good counter-attack. We change our approach.

    The mathematics behind all this is that we can estimate probabilities of players changing approach. Since theseare multi-dimensional problems, we can draw vector fields representing the probable outcomes.

    This interactive shows such a vector field. In this game, a player can either cooperate with the other player, onecooperates, the other doesnt, they both defect or the other player defects.

    The following variables are involved when two players use the BushMosteller reinforcement learning algorithmplaying a symmetric game:

    The payoff a defector gets when the other player cooperates (for temptation);The payoff obtained by both players when they both cooperate;(for reward);Both players obtain a payoff when they both defect (for punishment); and finally,The payoff a cooperator gets when the other player defects (for suckers).

    Expected Motion in 22 Symmetric Games Played by Reinforcement Learners

    Heres what youll see:

    Helmholtz-Coil Fields (Electricity)

    Helmholtz-Coil Fields

    http://demonstrations.wolfram.com/HelmholtzCoilFields/http://demonstrations.wolfram.com/ExpectedMotionIn2x2SymmetricGamesPlayedByReinforcementLearne/
  • 7/22/2019 Vector Fields - A Simple and Painless Introduction

    11/12

    12/5/13 Vector fields - a simple and painless introduction :: squareCircleZ

    www.intmath.com/blog/vector-fields-a-simple-and-painless-introduction/3345 1

    Two parallel circular conductors both carry current in the same direction. The circles lie parallel to the x-y plane.

    A simple example of a Vector Field

    Heres a more formal definition of a vector field. It applies to 3-dimensional space as well.

    Definition: A vector field in two dimensional space is a function that assigns to each point (x,y) a twodimensional vector given by F(x,y).

    This means every point on the plane has a vector associated with it (with magnitude and direction).

    Example: The force operating at a point (x,y) on a surface is given by f(x,y) = (-y,3x)

    We could also write this as f(x,y) = -yi+ 3xj, where iis the unit vector in thex-direction andjis the unit vectorin they-direction.

    Lets see what this means with 4 points in the plane.

    (a) If we are at the origin, (0,0), there is no force at all, since f(0,0) = 0 i+ 0j

  • 7/22/2019 Vector Fields - A Simple and Painless Introduction

    12/12

    12/5/13 Vector fields - a simple and painless introduction :: squareCircleZ

    (b) At the point (1,1), the force will be f(1,1) = -1i+ 3j, so the force is in the up-left direction, with magnitude10.

    (c) Another point (-1,2) will have force -2i 3j, which points down-left with magnitude 13.

    (d) At the point (-2,-4), the force vector will be f(-2,-4) = 4i 6jthat is, a force of magnitude 52 pointing rightand down.

    (e) Point (4,4) will have force -4i+ 12j, which points up-left with magnitude 160 = 12.65.

    Here are the 5 vectors we just described. Notice the forces in the middle of the vector field are very small, andthey get bigger as you get further from the origin.

    That brings us to the end of our exploration of vector fields. They are not scary, despite the way many textbookspresent the topic.

    Related posts:

    1. Changing peoples lives with mathI received a delightful mail today from a lady who...2. Math graphs on the Web without imagesHere's one way to plot good looking graphs on the...3. Friday Math Movie Toys that make worldsThe creator of SimCity and Spore gives an entertaining...4. JSXGraph: interactive javascript graphsJSXGraph is a method for producing interactive graphs on a...5. Friday math movie: Salman Khan at TEDHere's an interesting talk from the creator of Khan Academy,...

    Posted by Murray Bournein Computers & Internet, Learning, Mathematics- 14 Sep 2009 [Permalink]

    http://www.intmath.com/blog/vector-fields-a-simple-and-painless-introduction/3345http://www.intmath.com/blog/category/mathematicshttp://www.intmath.com/blog/category/learninghttp://www.intmath.com/blog/category/computers-internethttp://www.intmath.com/blog/about/2http://www.intmath.com/blog/friday-math-movie-salman-khan-at-ted/5843http://www.intmath.com/blog/jsxgraph-interactive-javascript-graphs/4579http://www.intmath.com/blog/friday-math-movie-toys-that-make-worlds/3664http://www.intmath.com/blog/math-graphs-on-the-web-without-images/3298http://www.intmath.com/blog/changing-peoples-lives-with-math/1305