scalar and vector fields explained
On a weather map you can tap any city and read the temperature there, and the wind arrows carry a direction and strength at every location. Attaching one value to every point of space like this gives a field. If the attached value is a single number, it is a scalar field, like temperature; if it is an arrow, it is a vector field, like wind. Temperature and pressure, velocity and stress in engineering are all, without exception, described as fields. Vector calculus is the language for handling exactly these fields, and this lesson is its opening scene.
Start with a scalar field. Each point carries one number, drawn as a temperature map where warmer colors mean larger values. Drag the probe and, wherever you put it, the temperature at that point appears below at once. Values are high near the two warm spots and fall off as you move away from them. The important thing is that the value was already sitting at that point. The probe does not create a value; it only reads what was already there. Values laid down at every point of space without a gap: that is a field.
Fields come in two kinds. If what is attached to each point is a single number, it is a scalar field; if it is an arrow, it is a vector field. Press the "Scalar field" and "Vector field" buttons and an altitude map and a wind map take turns. The scalar side is altitude, so each point holds just one thing, how high it is; the vector side is wind, so the arrow at each point shows where the wind blows and how strongly. Same space, different kind of information attached. Quantities with only a size, like height or temperature, are scalars; quantities that need a direction too, like velocity or force, are vectors.
Now look closely at a vector field. Faint arrows cover the background, one at each point. Drag the gold probe and only the arrow at that spot comes alive in bold, while its horizontal and vertical components appear below as numbers. The arrow at a point carries both which way and how strong at once. The slope of the arrow handles direction and its length handles strength, and both change together as you move. This field has a saddle shape, pulling in along one direction and pushing out along another, so the direction changes a great deal as you move the probe around. Reading a vector field means picking out what this arrow is at the point you care about.
A field is, in the end, a function: a rule that takes a point (x, y) and returns one arrow. So change the rule and every arrow in space is rearranged at once. There are two handles. The outflow s pushes away from or pulls toward the origin, and the swirl r spins things around. Raise only s and you get a source spreading out in all directions; push it negative and it flips into a sink that draws everything in. Raise only r and you get a whirl; mix the two and you get spirals that wind inward or unwind outward. One line of formula fixes the arrows of the whole space: that is the power of working with fields.
The real reason fields are useful is that they determine flow. Drop a particle into a field and it takes one step in the direction of the arrow at the point where it stands. Then, from its new position, it follows that point's arrow for another step. Repeat this and a path is traced; that path is called a streamline. Drag the gold seed to different places and, as the starting point changes, so does the path, but in this field every start winds inward and is drawn into the center. Dust carried on the wind, leaves on a river, and the lines along which iron filings line up in a magnetic field all follow the lines of fields like this. From the next lesson on, we start measuring how a field changes from point to point.