The Central Idea

A mathematical field may be represented in several ways:

Each representation emphasizes different information.

Exact Formulas Are Only One Possibility

A scalar field might be given exactly by

\[ f(x,y)=x^2+y^2. \]

But a measured temperature field may instead be known only at selected sensor locations.

Numerical field methods begin when values are available only at discrete locations or when exact calculations are impractical.

Sampling a Scalar Field

Suppose a scalar field

\[ f(x,y) \]

is sampled at points

\[ (x_i,y_j). \]

The recorded values are

\[ f_{ij}=f(x_i,y_j). \]

These samples form a discrete approximation to the continuous field.

Sampling a Vector Field

For a vector field

\[ \mathbf{F}(x,y) = \langle P(x,y),Q(x,y)\rangle, \]

each sampled point stores a vector:

\[ \mathbf{F}_{ij} = \langle P(x_i,y_j),Q(x_i,y_j)\rangle. \]

The data therefore contain both magnitude and directional information.

Regular Grids

A regular grid uses evenly spaced coordinates such as

\[ x_i=x_0+i\Delta x \]

and

\[ y_j=y_0+j\Delta y. \]

Regular grids are common because they simplify storage, plotting, and numerical differentiation.

Irregular Samples

Measurements are not always taken on a regular grid.

Sensor locations may be scattered irregularly because of:

Irregular samples often require more sophisticated interpolation.

Grid Resolution

Resolution describes how closely spaced the sample points are.

Smaller values of

\[ \Delta x,\quad \Delta y,\quad \Delta z \]

generally provide finer spatial resolution.

But finer resolution also increases data size and computational cost.

Coarse Resolution

A coarse grid can capture broad field trends efficiently.

However, it may miss:

Sampling scale limits the detail that can be detected.

Fine Resolution

A fine grid can reveal smaller spatial features.

Yet more detail does not automatically mean more accuracy.

Measurement noise, model error, numerical instability, and interpolation choices can still affect the result.

Scalar Fields as Tables

A scalar field sampled on a grid can be stored in a matrix-like table:

\[ \begin{array}{c|ccc} & x_1 & x_2 & x_3\\ \hline y_1 & f_{11} & f_{21} & f_{31}\\ y_2 & f_{12} & f_{22} & f_{32}\\ y_3 & f_{13} & f_{23} & f_{33} \end{array} \]

The table preserves numerical values but does not immediately reveal the geometry of the field.

Vector Fields as Component Arrays

A two-dimensional vector field can be stored as two scalar arrays:

\[ P_{ij} \]

and

\[ Q_{ij}. \]

Together they reconstruct

\[ \mathbf{F}_{ij} = \langle P_{ij},Q_{ij}\rangle. \]

Higher-dimensional fields require additional component arrays.

Visualization Reveals Structure

Numerical tables are precise but can be difficult to interpret.

Visualizations help reveal:

Contour Maps

A contour map displays curves satisfying

\[ f(x,y)=c. \]

Numerically, those curves are estimated from sampled values.

Contour maps are especially effective for scalar fields such as temperature, pressure, elevation, and potential.

Filled Contour Maps

A filled contour map assigns visual bands to intervals of scalar values.

Instead of drawing only the level curves, the regions between contours are visually distinguished.

This makes broad scalar-field regions easier to compare.

Color Maps

A scalar field may also be represented by mapping numerical values to a visual color scale.

Every location receives a color based on the field value.

Color maps can reveal patterns quickly, but the numerical scale must be displayed clearly to avoid misleading interpretation.

Color Is an Encoding, Not the Quantity

A red region does not mathematically mean “hot” unless the legend says that red represents larger temperature values.

Color choices are conventions.

The actual mathematical information is the numerical mapping between color and field value.

Surface Plots

A two-dimensional scalar field can be displayed as the surface

\[ z=f(x,y). \]

The scalar value becomes vertical height.

Surface plots can make peaks, basins, ridges, and saddles visually intuitive.

Surface Plots and Contours Show the Same Field Differently

A surface plot uses height.

A contour map uses equal-value curves.

Both can represent the same scalar field.

The better representation depends on whether the goal is geometric shape, precise level reading, or compact display.

Vector Arrow Plots

A vector field is commonly visualized by drawing an arrow at selected sample points.

The arrow direction represents the vector direction.

Arrow length may represent magnitude.

Such plots are sometimes called quiver plots.

Arrow Density

Too few arrows can hide important spatial variation.

Too many arrows can overlap and make the plot unreadable.

Vector visualization therefore requires a balance between resolution and visual clarity.

Arrow Scaling

If arrow lengths are drawn directly proportional to vector magnitude, very strong vectors may dominate the plot while weak vectors become nearly invisible.

Plotting software often rescales arrows for readability.

That rescaling must be understood before interpreting magnitude visually.

Normalized Vector Plots

A normalized plot replaces each nonzero field vector by

\[ \frac{\mathbf{F}}{\|\mathbf{F}\|}. \]

Every arrow then has the same length.

This emphasizes direction but removes magnitude information.

Magnitude Overlays

A useful vector-field visualization can combine:

The scalar magnitude field is

\[ M(x,y)=\|\mathbf{F}(x,y)\|. \]

This preserves both directional and strength information.

Streamline Plots

A streamline plot draws curves tangent to a vector field.

In a steady field, these curves satisfy

\[ \mathbf{r}'(t) \parallel \mathbf{F}(\mathbf{r}(t)). \]

Streamlines reveal the global organization of field directions more effectively than isolated arrows.

Streamline Placement Matters

A vector field contains infinitely many possible flow lines.

A plot displays only selected ones.

Different starting points can produce very different visual impressions of the same field.

Streamline plots are therefore sampled representations too.

Trajectory Plots

A trajectory plot shows the path of a moving object or particle through time.

For a velocity field,

\[ \mathbf{r}'(t) = \mathbf{v}(\mathbf{r}(t),t). \]

Numerical integration is often required to approximate the path.

Time Animation

Time-dependent fields can be visualized as a sequence of snapshots or an animation.

This can reveal:

Interpolation

Interpolation estimates field values between known samples.

If values are known at

\[ x_0 \]

and

\[ x_1, \]

interpolation estimates values for

\[ x_0 Multidimensional interpolation extends this idea across grids and scattered data.

Linear Interpolation in One Dimension

Suppose

\[ f(x_0)=f_0 \]

and

\[ f(x_1)=f_1. \]

Linear interpolation gives

\[ \boxed{ f(x) \approx f_0 + \frac{x-x_0}{x_1-x_0} (f_1-f_0) }. \]

Bilinear Interpolation

On a rectangular grid cell, a scalar field value can be estimated using nearby values at the four corners.

Bilinear interpolation performs linear interpolation in two coordinate directions.

The resulting approximation is simple and efficient, though it does not reproduce every possible curvature pattern exactly.

Higher-Order Interpolation

More sophisticated methods can use polynomial, spline, radial-basis, or other constructions.

Higher-order interpolation may produce smoother estimates.

But additional smoothness does not guarantee physical correctness.

Interpolation methods always introduce assumptions between samples.

Interpolation versus Extrapolation

Interpolation estimates within the region supported by known data.

Extrapolation estimates beyond the sampled region.

Extrapolation is generally riskier because the field may change behavior outside the observed domain.

Numerical Gradients

When an exact formula is unavailable, derivatives can be approximated from nearby samples.

A forward difference approximation is

\[ \boxed{ f_x(x,y) \approx \frac{f(x+\Delta x,y)-f(x,y)}{\Delta x} }. \]

Backward Difference

A backward difference approximation is

\[ \boxed{ f_x(x,y) \approx \frac{f(x,y)-f(x-\Delta x,y)}{\Delta x} }. \]

This can be useful near a boundary where forward samples are unavailable.

Central Difference

A common central-difference approximation is

\[ \boxed{ f_x(x,y) \approx \frac{f(x+\Delta x,y)-f(x-\Delta x,y)} {2\Delta x} }. \]

It uses information from both sides of the point.

Numerical Gradient Vector

In two dimensions, approximate

\[ f_x \]

and

\[ f_y \]

separately, then assemble

\[ \boxed{ \nabla f \approx \langle f_x,f_y\rangle. }. \]

The result estimates local direction and rate of greatest increase.

Numerical Divergence

For

\[ \mathbf{F}=\langle P,Q\rangle, \]

approximate

\[ P_x \]

and

\[ Q_y, \]

then combine them:

\[ \boxed{ \nabla\cdot\mathbf{F} \approx P_x+Q_y }. \]

Numerical Curl

In a planar field,

\[ \mathbf{F}=\langle P,Q\rangle, \]

approximate

\[ Q_x \]

and

\[ P_y, \]

then compute

\[ \boxed{ Q_x-P_y }. \]

This estimates local rotational tendency from sampled data.

Numerical Flux

A flux integral can be approximated by dividing a boundary into small pieces.

For surface patches of area \(\Delta S_i\),

\[ \Phi \approx \sum_i \mathbf{F}_i\cdot\mathbf{n}_i \Delta S_i. \]

Finer partitions generally improve the geometric approximation when the field and surface are sufficiently smooth.

Riemann-Sum View of Field Integrals

Numerical integration follows the same accumulation principle as exact integration.

Sample the local contribution, multiply by a small geometric measure, and sum:

\[ \boxed{ \text{total} \approx \sum (\text{local density}) (\text{small size}) }. \]

This structure appears in line, surface, and volume integrals.

Euler Steps for Flow Lines

A trajectory satisfying

\[ \mathbf{r}'(t) = \mathbf{F}(\mathbf{r}(t)) \]

can be approximated by

\[ \boxed{ \mathbf{r}_{n+1} = \mathbf{r}_n + \Delta t\, \mathbf{F}(\mathbf{r}_n) }. \]

Each step follows the local field direction for a short interval.

Step Size Matters

Large time steps may skip over curvature or rapid field changes.

Smaller steps usually track trajectories more closely.

But smaller steps require more computation.

Numerical work balances accuracy, stability, and cost.

Adaptive Step Sizes

Some numerical methods automatically use smaller steps where the solution changes rapidly and larger steps where it changes slowly.

This is called adaptive stepping.

It concentrates computational effort where more resolution is needed.

Discretization

Discretization replaces a continuous field problem with a finite collection of numerical unknowns.

A continuous domain may become:

The resulting numerical problem can be handled computationally.

Meshes

A mesh divides a region into smaller geometric pieces.

In two dimensions, these may be triangles or quadrilaterals.

In three dimensions, they may be tetrahedra, hexahedra, or other cells.

Meshes allow field values to be represented over irregular geometry.

Structured and Unstructured Meshes

A structured mesh follows an organized indexing pattern.

An unstructured mesh allows more flexible connectivity and geometry.

Structured meshes are often simpler computationally, while unstructured meshes can fit complex boundaries more naturally.

Cell-Centered and Node-Centered Values

Numerical fields may store values:

The storage location can matter when approximating derivatives, fluxes, and conservation laws.

Visualizing Three-Dimensional Scalar Fields

A scalar field

\[ f(x,y,z) \]

cannot be shown directly as ordinary height over a plane.

Common representations include:

Slice Planes

Fix one coordinate, such as

\[ z=z_0. \]

Then the three-dimensional scalar field becomes a two-dimensional slice:

\[ f(x,y,z_0). \]

Multiple slices can reveal how the field changes through depth.

Isosurfaces

A three-dimensional level set

\[ f(x,y,z)=c \]

is often called an isosurface.

Isosurfaces are the three-dimensional analogue of contour lines.

They reveal the geometry of equal-value regions in space.

Visualizing Three-Dimensional Vector Fields

Three-dimensional vector fields are harder to display because arrows can overlap and hide one another.

Common strategies include:

Stream Tubes

A stream tube groups neighboring streamlines into a tube-like visual structure.

The tube may help show how flow bundles expand, contract, or curve through three-dimensional space.

Visual thickness can be encoded in several ways and must be interpreted according to the plotting convention.

Vector Glyphs

An arrow is one type of glyph: a small graphical object used to encode data at a location.

A glyph can encode:

Visualization Can Introduce Distortion

A plot may rescale, clip, smooth, normalize, or interpolate the data.

These choices can improve readability while changing visual emphasis.

Therefore, a graph should be interpreted together with its legend, scaling, sampling method, and plotting settings.

Clipping Extreme Values

If a few field values are extremely large, they may dominate a visual scale.

A plotting system may clip or cap those values.

This can reveal moderate structure more clearly, but it hides the true magnitude of the extremes unless explicitly noted.

Logarithmic Scales

Fields spanning many orders of magnitude may be visualized using a logarithmic scale.

A logarithmic display compresses large numerical ranges.

The visual spacing then represents multiplicative rather than additive change.

Normalization Can Hide Strength

Normalizing vectors helps reveal direction.

But after normalization,

\[ \left\| \frac{\mathbf{F}}{\|\mathbf{F}\|} \right\| =1. \]

The original magnitude information is gone.

A normalized plot should never be read as a magnitude plot.

Smoothing

Numerical data may contain noise.

Smoothing can reduce small fluctuations and reveal large-scale structure.

However, smoothing may also erase genuine sharp features.

The appropriate amount depends on the purpose of the analysis.

Noise

Measurement noise introduces random or systematic deviations from the underlying field.

Numerical derivatives can amplify noise because they depend on differences between nearby values.

Gradient, divergence, and curl estimates therefore require particular caution with noisy data.

Missing Data

Real data sets may contain missing samples.

Possible responses include:

Filled-in values should be distinguished from direct measurements.

Measurement Error

A measured field value can be represented as

\[ f_{\text{measured}} = f_{\text{true}} + \text{error}. \]

The error may arise from instrument limitations, calibration, environmental conditions, or sampling procedures.

Numerical precision does not automatically imply physical accuracy.

Discretization Error

Replacing a continuous field by finitely spaced samples introduces discretization error.

Even exact sample values cannot reveal every feature between sample points.

Smaller grid spacing often reduces this error for smooth fields.

Interpolation Error

Interpolation estimates values that were not directly sampled.

The estimate can differ from the true field.

Interpolation error depends on:

Roundoff Error

Computers store numbers with finite precision.

Arithmetic operations therefore introduce small rounding errors.

In many ordinary calculations these errors are tiny, but repeated or ill-conditioned operations can amplify them.

Truncation Error

Numerical methods often replace an exact infinite process by a finite approximation.

Finite-difference formulas and numerical integration methods introduce truncation error because higher-order terms are omitted.

Resolution versus Noise

Finer spacing can improve geometric resolution.

But numerical derivatives divide by small distances such as

\[ \Delta x. \]

If the data are noisy, very small spacing can make the derivative estimate sensitive to tiny fluctuations.

More resolution is not always the same as more useful information.

Convergence

A numerical method is useful when its approximations approach the correct mathematical result as the discretization is refined under appropriate conditions.

For example, one may ask whether

\[ \text{approximation}(\Delta x) \to \text{exact value} \]

as

\[ \Delta x\to0. \]

Grid-Refinement Checks

One practical numerical test is to repeat a calculation with successively finer grids.

If the result stabilizes, confidence in the numerical approximation increases.

If the result changes dramatically, the original grid may have been too coarse or the method may be unstable.

Validation

Numerical field results should be checked whenever possible.

Validation strategies include:

Known Special Cases Are Valuable Tests

If a numerical method is intended for complicated fields, test it first on simpler fields with known behavior.

Examples include:

Conservation as a Numerical Diagnostic

If a physical model should conserve mass, energy, or another quantity, a numerical simulation should reproduce that conservation to an acceptable tolerance.

Large unexplained conservation errors may reveal:

Boundary Treatment

Numerical derivatives near a domain boundary cannot always use symmetric samples on both sides.

One-sided differences, ghost points, boundary conditions, or specialized schemes may be required.

Boundaries are often among the most delicate parts of numerical field calculations.

Boundary Conditions in Visualizations

A field plot may show abrupt behavior near a boundary because the physical model imposes:

The visual pattern should be interpreted together with those conditions.

Scalar-Field Workflow from Data

  1. Collect or compute sample values.
  2. Record the domain and units.
  3. Choose a grid or mesh representation.
  4. Inspect missing values and noise.
  5. Interpolate only when needed.
  6. Create contour, color, or surface visualizations.
  7. Approximate gradients when spatial change matters.
  8. Validate against known constraints.

Vector-Field Workflow from Data

  1. Collect or compute vector components.
  2. Preserve component order and units.
  3. Choose representative sample locations.
  4. Plot arrows or glyphs.
  5. Overlay magnitude information when useful.
  6. Generate streamlines or trajectories if flow matters.
  7. Approximate divergence or curl if local structure matters.
  8. Check resolution and numerical stability.

Choosing the Right Visualization

Ask what information matters most.

Goal Useful representation
read scalar values table or labeled contours
see scalar shape surface plot
see scalar regions filled contours or color map
see vector direction arrow plot
see vector magnitude arrow length or magnitude map
see flow organization streamlines
see time evolution animation or time sequence

No Single Plot Shows Everything

Every visualization suppresses some information.

A normalized arrow plot hides magnitude.

A color map may hide exact numerical values.

A surface plot may obscure parts of the field through perspective.

A good analysis often combines several representations.

Common Error: Treating Samples as the Whole Field

A sampled grid contains values only at selected locations.

Values between those points are unknown unless a model or interpolation method supplies estimates.

The discrete data are a representation of the field, not the continuous field itself.

Common Error: Assuming Interpolation Is Exact

Interpolation fills gaps according to a chosen rule.

The true field between samples may differ from that rule.

Interpolated values should therefore be treated as estimates unless the mathematical structure guarantees exactness.

Common Error: Reading Arrow Length Literally after Rescaling

Vector plots often rescale arrows for readability.

Before comparing magnitudes visually, check whether the arrows preserve actual vector lengths.

Common Error: Ignoring the Legend

A color map, contour map, or vector plot is incomplete without its scale or legend.

Numerical interpretation requires knowing what the visual encoding means.

Common Error: Using Too Few Samples

A coarse grid can make a rapidly changing field look smooth.

It may miss narrow features entirely.

Sampling must be fine enough for the spatial scale of the behavior being studied.

Common Error: Assuming More Samples Remove All Error

Finer sampling does not eliminate:

Resolution is only one source of accuracy.

Common Error: Differentiating Noisy Data without Caution

Numerical derivatives amplify small differences.

If neighboring field values contain noise, gradient, divergence, and curl estimates may become unstable or misleading.

Smoothing or more robust estimation methods may be needed.

Common Error: Confusing Numerical Precision with Accuracy

A computer may report many decimal places.

Those digits are not automatically meaningful.

Accuracy depends on the data, model, numerical method, and error sources, not merely on the number of displayed digits.

A Reliable Procedure for Reading a Field Visualization

  1. Identify whether the field is scalar or vector-valued.
  2. Read the axes and domain.
  3. Read the legend, scale, and units.
  4. Determine whether values are measured, simulated, or interpolated.
  5. Check whether arrows are normalized or rescaled.
  6. Inspect resolution and missing-data regions.
  7. Identify major local and global patterns.
  8. Avoid inferring more precision than the representation supports.

A Reliable Procedure for Numerical Derivatives

  1. Identify the sample spacing.
  2. Choose forward, backward, or central differences as appropriate.
  3. Respect the domain boundary.
  4. Compute component derivatives carefully.
  5. Assemble the gradient, divergence, or curl.
  6. Check the units.
  7. Repeat with refined spacing when possible.
  8. Watch for noise amplification.

Example: Numerical Derivative

Suppose

\[ f(1.0)=2.00 \]

and

\[ f(1.1)=2.21. \]

A forward-difference estimate at \(x=1.0\) is

\[ f'(1.0) \approx \frac{2.21-2.00}{0.1} = \boxed{2.1}. \]

If the true function were \(f(x)=x^2+1\), the exact derivative would be \(2\).

Example: Central Difference

Suppose

\[ f(0.9)=1.81 \]

and

\[ f(1.1)=2.21. \]

Then

\[ f'(1.0) \approx \frac{2.21-1.81}{0.2} = \boxed{2.0}. \]

In this example, the central difference reproduces the exact derivative.

Example: Numerical Vector Magnitude

Suppose a sampled vector field gives

\[ \mathbf{F}_{ij} = \langle 6,8\rangle. \]

The magnitude stored or visualized at that point is

\[ \|\mathbf{F}_{ij}\| = \sqrt{6^2+8^2} = \boxed{10}. \]

Example: Euler Trajectory Step

Suppose

\[ \mathbf{r}_0=\langle 1,2\rangle \]

and the field there is

\[ \mathbf{F}(\mathbf{r}_0)=\langle 3,-1\rangle. \]

With

\[ \Delta t=0.1, \]

Euler's method gives

\[ \mathbf{r}_1 = \langle 1,2\rangle + 0.1\langle 3,-1\rangle. \]

Therefore,

\[ \boxed{ \mathbf{r}_1 = \langle 1.3,1.9\rangle }. \]

Example: Approximate Flux by Patches

Suppose a surface is divided into three equal-area patches with

\[ \Delta S=2. \]

The normal field components are approximately

\[ 1,\quad 3,\quad 2. \]

Then the total flux is approximately

\[ \Phi \approx 1(2)+3(2)+2(2) = \boxed{12}. \]

Practice 1: Grid Spacing

A regular grid has

\[ x_i=0.5i. \]

What is \(\Delta x\)?

Practice 2: Scalar or Vector Storage

A planar field stores two values at every grid point. Is this more naturally a scalar field or vector field representation?

Practice 3: Linear Interpolation

Suppose

\[ f(0)=10 \]

and

\[ f(2)=18. \]

Estimate \(f(1)\) by linear interpolation.

Practice 4: Forward Difference

Suppose

\[ f(2.0)=5.0 \]

and

\[ f(2.1)=5.41. \]

Estimate \(f'(2.0)\) using a forward difference.

Practice 5: Normalized Arrows

What information is lost when every vector arrow is normalized to unit length?

Practice 6: Contour Spacing

Equal-value contour intervals are tightly packed in one region. What does this suggest about the local scalar-field gradient magnitude?

Practice 7: Euler Step

Let

\[ \mathbf{r}_0=\langle 0,1\rangle, \qquad \mathbf{F}(\mathbf{r}_0)=\langle 2,3\rangle, \qquad \Delta t=0.2. \]

Find the next Euler approximation.

Practice 8: Numerical Flux

Two surface patches each have area \(4\). Their normal field components are \(2\) and \(-1\). Approximate the total flux.

Practice 9: Resolution

Why can a coarse field grid fail to reveal a narrow peak?

Practice 10: Visualization Caution

Why should a color map always be interpreted together with its legend or numerical scale?

Practice Answers

Practice 1

\[ \boxed{\Delta x=0.5}. \]

Practice 2

Two coordinate components at each planar point naturally represent

\[ \boxed{\text{a vector field}}. \]

Practice 3

The midpoint lies halfway between \(10\) and \(18\):

\[ \boxed{f(1)\approx14}. \]

Practice 4

\[ f'(2.0) \approx \frac{5.41-5.0}{0.1} = \boxed{4.1}. \]

Practice 5

Normalization preserves direction but removes

\[ \boxed{\text{magnitude information}}. \]

Practice 6

Tightly packed equal-interval contours suggest

\[ \boxed{\text{a relatively large gradient magnitude}}. \]

Practice 7

\[ \mathbf{r}_1 = \langle 0,1\rangle + 0.2\langle 2,3\rangle \] \[ = \langle 0.4,1.6\rangle. \]

Therefore,

\[ \boxed{ \mathbf{r}_1=\langle 0.4,1.6\rangle }. \]

Practice 8

\[ \Phi \approx 2(4)+(-1)(4) = 8-4 = \boxed{4}. \]

Practice 9

If no sample point falls sufficiently close to the narrow peak, the data may contain no evidence that the feature exists. Interpolation between distant samples may smooth over it.

Practice 10

Color is only a visual encoding. Without the legend, we do not know which numerical values the colors represent or whether the scale is linear, logarithmic, clipped, or otherwise transformed.

What to Remember

Numerical and visual field representations translate continuous spatial ideas into finite data and readable pictures.

The central principle is: a field representation is a model of spatial information, and every numerical or visual choice determines which features become visible, hidden, estimated, or distorted.

Where We Go Next

With numerical and visual representations, the core ideas of fields and spatial change can now be used whether a field is given by a formula, a measurement grid, a simulation, or a plot.

This completes the section Fields and Spatial Change and prepares the way for later work in modeling, analysis, differential equations, numerical methods, and applied field theory.