Tensors in Physics
Push on a lump of clay and it squashes — but not always straight back the way you pushed. Shear a
pack of cards and the top slides sideways relative to the bottom. Spin an asymmetric object, like a
wonky spinning top or a smartphone flipped in the air, and it can wobble about an axis different from
the one you spun it around. In every one of these situations a familiar rule breaks: push in
one direction and the response points in a different direction. A single number
cannot capture that, and neither can a single vector. You need an object that turns one direction into
another — a tensor.
This page is about tensors as physical objects: the machines that relate vectors to
vectors — stress relating a surface's orientation to the force on it, the inertia tensor relating
spin to angular momentum, the electromagnetic field tensor packing \mathbf{E}
and \mathbf{B} into one relativistic object. We build on the abstract
picture from what is a
tensor; here the goal is a physicist's fluency — reading the indices, feeling
what each slot does, and never again confusing "an array of numbers" with "a tensor."
Scalars, vectors, tensors: a ladder of directions
Line up the objects physics uses by how many directions they carry:
-
Rank 0 — a scalar (temperature, mass, charge). No direction. One number, the
same for everyone.
-
Rank 1 — a vector (velocity, force, field
\mathbf{E}). One direction; components
v_i carry a single index.
-
Rank 2 — a tensor (stress \sigma_{ij}, inertia
I_{ij}). Two directions; a matrix of components
T_{ij}, one index for the input direction and one for the output.
A rank-2 tensor is a machine that eats a vector and spits out a vector,
w_i = T_{ij}\,v_j (summing over the repeated
j — the
Einstein
summation convention). Because it can rotate and rescale the vector as it passes
through, the output need not be parallel to the input — which is exactly the "push here, respond
there" behaviour we started with.
The stress tensor: force per area, but which force on which area?
Stress is the tensor to cut your teeth on. Inside a loaded solid, imagine slicing through a tiny
internal surface. The material on one side pulls on the other with a force per unit area — the
traction \mathbf{t}. But the traction depends on
how you orient the cut: slice horizontally and you feel one force, slice vertically and you
feel another. So you need one number for the face's direction and one for the
force's direction — two indices:
t_i = \sigma_{ij}\,n_j,
where \mathbf{n} is the unit normal picking the face and
\sigma_{ij} is the Cauchy stress tensor. The component
\sigma_{ij} reads as "the i-component of force
on the face whose normal points along j." The diagonal entries
\sigma_{xx}, \sigma_{yy} are normal stresses (push/pull,
pressure and tension); the off-diagonal \sigma_{xy} are
shear stresses (dragging sideways). Reveal the figure step by step to see the
tractions on each face of a little material element.
For a body in equilibrium the stress tensor is symmetric,
\sigma_{ij} = \sigma_{ji} (otherwise the element would spin up under a net
torque). Symmetry means it can be diagonalised: rotate to the right axes — the
principal axes — and all shear vanishes, leaving only pure pushes and pulls along three
perpendicular directions. Those diagonal values are the principal stresses, and this
is just the eigenvalue problem again, wearing an engineer's hard hat.
More tensors you already half-know
Once you spot the pattern — a machine turning one vector into another, not-necessarily-parallel
vector — tensors are everywhere:
-
The inertia tensor I_{ij} relates angular velocity to
angular momentum: L_i = I_{ij}\,\omega_j. For a lopsided body
\mathbf{L} is not parallel to
\boldsymbol{\omega} — which is precisely why a poorly balanced wheel
shakes. Spin it about a principal axis and the wobble disappears.
-
The strain tensor \varepsilon_{ij} encodes how a
material deforms — stretch on the diagonal, shear off it. Hooke's law in 3-D links it to stress
through a rank-4 tensor, the elastic stiffness
\sigma_{ij} = C_{ijkl}\,\varepsilon_{kl}.
-
The conductivity tensor \sigma_{ij} in an anisotropic
crystal: J_i = \sigma_{ij}E_j, so current can flow at an angle to the
applied field.
-
The electromagnetic field tensor F^{\mu\nu} — a
rank-2, four-dimensional, antisymmetric tensor that folds all six components of
\mathbf{E} and \mathbf{B} into one object.
Maxwell's four equations collapse to two beautifully compact tensor statements, and the way
\mathbf{E} and \mathbf{B} mix when you change
frames is just F^{\mu\nu} transforming its indices.
Index gymnastics with a physicist's eye
The index notation is not decoration — it is a calculus you can compute with. Three moves cover most
of second-year physics:
-
Summation (contraction). A repeated index means "sum over it," and it
disappears: T_{ij}v_j has a free index
i left, so it is a vector. Contract both indices,
T_{ii} = T_{11}+T_{22}+T_{33}, and you get the trace —
a scalar (for stress, related to pressure).
-
Free vs. dummy indices. A free index appears once per term and must match
on both sides of an equation (w_i = T_{ij}v_j — i
free, j summed). A dummy (repeated) index is summed and can be
renamed at will. If an index appears three times in a term, you have made a mistake.
-
Symmetry. Split any tensor into a symmetric and an antisymmetric part,
T_{ij} = \tfrac12(T_{ij}+T_{ji}) + \tfrac12(T_{ij}-T_{ji}). Stress and
inertia are symmetric; the field tensor F^{\mu\nu} is antisymmetric. The
symmetry tells you how many independent numbers there really are (a symmetric
3\times3 tensor has 6, not 9).
And the deepest point, the one that separates a tensor from a mere grid of numbers: a tensor's
components transform in a definite way when you rotate your axes,
T'_{ij} = R_{ik}R_{jl}T_{kl}. That transformation law is what guarantees
the physics — the traction on a real surface, the torque on a real body — comes out the same
whatever coordinates you happened to choose.
Because the numbers are the shadow, not the thing. Every rank-2 tensor can be written as a
matrix once you fix a coordinate system — but so can a great many arrays that are not
tensors. What makes something a tensor is that its components change according to the
transformation law T'_{ij} = R_{ik}R_{jl}T_{kl} when you rotate the axes,
precisely so that the physical statement it makes is coordinate-independent. A tensor is a genuine
geometric object — like an arrow that exists whether or not you draw axes — and the matrix is merely
its list of components in one particular frame.
A quick test: a table of exam scores is an array, but it is not a tensor, because rotating
your coordinate axes has no meaningful effect on "Alice's score in Chemistry." The stress tensor
is one, because rotate the block and the components genuinely mix in the
R\,T\,R^{T} pattern — that mixing is the physics of how a diagonal push
becomes a shear when you look from a tilted angle. Matrix = bookkeeping; tensor = a physical object
that obeys the transformation law.
An index that repeats is summed and must vanish from the result — an index that appears three
times in one term is a bug, not a formula. The single most common tensor error is losing
track of which indices are free and which are dummy. Three rules keep you safe:
-
A free index appears exactly once in every term and must be identical on both
sides. w_i = T_{ij}v_j is fine; w_i = T_{kj}v_j
is nonsense (the right side has free index k, the left has
i).
-
A repeated index in a term is summed (Einstein convention) and therefore
disappears from the answer — it is a private, dummy label you can rename freely
(T_{ij}v_j = T_{ik}v_k).
-
The same letter three times in a single term (T_{ii}v_i)
is meaningless — the convention only sums pairs. Rename before you contract.
Get the index bookkeeping right and tensor algebra becomes almost mechanical; get it wrong and you
will sum things that should not be summed and produce equations that are not even the right kind of
object.
Applying a rank-2 tensor, in code
Watch the defining behaviour directly: apply a stress tensor to a face normal and see that the
traction generally points in a different direction. Here a pure-shear stress
(\sigma_{xy}=\sigma_{yx}=1, zero on the diagonal) acts on the
x-face normal — the resulting traction comes out along
y, perpendicular to the push:
// A pure-shear stress tensor σ (2×2, symmetric)
const sigma = [
[0, 1], // σxx, σxy
[1, 0], // σyx, σyy
];
function traction(sig: number[][], n: number[]): number[] {
// t_i = σ_ij n_j (Einstein summation over j)
return [
sig[0][0] * n[0] + sig[0][1] * n[1],
sig[1][0] * n[0] + sig[1][1] * n[1],
];
}
const nx = [1, 0]; // normal of the x-face
const t = traction(sigma, nx);
console.log(`normal points along: (${nx.join(", ")})`);
console.log(`traction points along: (${t.join(", ")}) ← rotated 90°, pure shear`);
The input pointed along x; the output points along
y. That turning of one direction into another is the whole reason stress
must be a tensor and not a vector.