Synapse

An interconnected graph of micro-tutorials

Scalar Fields: Numbers Everywhere

This is an early draft. Content may change as it gets reviewed.

A scalar field assigns a single number to every point in space.

That’s it — one number, everywhere. But this simple idea describes a surprising amount of the physical world.

Examples

In each case: pick a point → get a number.

Try It: Scalar Fields as Heatmaps

Each pixel’s colour represents the value of the field at that point. Red = high, blue = low.

Mathematical notation

A scalar field in two dimensions is a function $f(x, y)$ that takes coordinates $(x, y)$ and returns a number. In three dimensions: $f(x, y, z)$.

The heatmap above shows 2D scalar fields — colour encodes the value.

Why scalar fields matter

Scalar fields are the simpler sibling of vector fields. Temperature tells you “how hot” at each point, but not “which way the heat flows.” For that, you need a vector field — an arrow at every point, not just a number.

The gradient of a scalar field (the direction of steepest increase) produces a vector field. Temperature → heat flow. Elevation → downhill direction. Pressure → wind.