Reference elements and affine maps
Transport basis functions, gradients, and integrals without confusing area scaling with directional distortion.
On this page
The question for today
What you’ll understand
- Transform scalar gradients with the inverse transpose Jacobian.
- Compute element integrals from the reference simplex.
- Explain how shape regularity controls transformation constants uniformly.
Finite element assembly reuses a small family of reference basis functions on many physical cells. An affine map carries the reference simplex to an actual triangle or tetrahedron, allowing quadrature and derivative calculations to be organized once. The map changes more than cell volume: it also stretches directions, and gradients transform inversely. A correct transformation formula is essential both for assembled matrices and for the mesh-dependent constants used in approximation estimates.
Pull values back and transform gradients in the opposite direction
Let the physical simplex K be the image of a fixed reference simplex under x=B_K xi+b_K, with an invertible matrix B_K. Define the pulled-back scalar function by evaluating the physical function at that image. The chain rule gives the reference gradient as B_K transpose times the physical gradient. Solving for the physical gradient produces the inverse transpose. Translation changes locations but does not enter the derivative matrix; using B_K instead of its inverse transpose generally gives the wrong directional scale.
The change of variables for volume uses the absolute determinant, because integration measure does not depend on orientation. A negative determinant may reflect a reversed vertex ordering rather than a negative geometric area. Scalar Lagrange elements use composition with the map; vector-valued H(div) or H(curl) elements require appropriate Piola transformations to preserve normal or tangential quantities. The scalar formulas here should not be extended to those spaces without changing the pullback.
Stiffness carries a matrix metric, not just a determinant
Insert the gradient and measure transformations into the unit-diffusion energy integral. The transformed integrand contains the matrix B_K inverse times its transpose inverse. This matrix records directional distortion. For a uniform scaling by h in d dimensions, volume scales as h to the d and two derivatives contribute h to the negative two, giving stiffness scale h to the d minus two. A pure scalar volume multiplier would miss both inverse derivative factors.
The element stiffness is positive semidefinite before essential boundary constraints because constants have zero gradient. Local row sums therefore vanish for a basis reproducing constants. Global assembly combines shared degrees of freedom and imposes the boundary constraints that remove the relevant null modes. These checks help detect transformation errors, but they do not replace correct quadrature or a valid mesh. A positive element area alone is not sufficient evidence that every directional derivative has been handled correctly.
Shape regularity makes scaling estimates uniform
The cell diameter alone does not control the inverse map. A long thin triangle can have a moderate diameter and a tiny altitude, giving a large inverse derivative factor in its thin direction. A shape-regular simplicial family bounds the ratio of diameter to inradius uniformly. Relative to a fixed reference simplex, this controls the condition of the normalized affine maps and yields comparable upper and lower singular-value scales proportional to the local diameter.
Shape regularity permits different cell sizes across a mesh; it is weaker than quasi-uniformity, which also compares the largest and smallest sizes globally. Local interpolation estimates can use local diameters on shape-regular graded meshes without assuming every cell has the same size. Anisotropic meshes can be useful, but their analysis needs directional estimates rather than blindly applying an isotropic constant that is no longer uniform. Record the geometry assumptions before interpreting an observed refinement rate as a theorem.
Work it through
Map a reference triangle with shear
Let the reference triangle have vertices (0,0),(1,0),(0,1). Use B=[[2,1],[0,1]], b=(1,−1), and the reference shape function phi-hat=xi₁. Compute physical area, its gradient, and its energy integral.
The reference area is one half and det B=2, so the physical area is one. The physical vertices are (1,−1),(3,−1),(2,0).
B inverse is [[1/2,−1/2],[0,1]], so its transpose inverse applied to (1,0) gives physical gradient (1/2,−1/2). The shear changes its direction as well as its size.
The squared gradient length is one half. Since it is constant over a cell of area one, its energy integral is one half. Multiplying the reference energy by determinant alone would incorrectly give one.
The determinant transports area, while the inverse transpose transports gradients. Both are needed in the stiffness integral.
The living notebook
Explore the model
Interactive lab · matrix
Separate determinant and directional distortion
Reset and set diagonal scale a=2,shear b=1, matching the worked affine matrix. Predict determinant two and transformed unit-square area two. The reference triangle occupies half that square. On paper invert and transpose the selected matrix to recover the shape-function gradient. The display readouts describe the selected final matrix even during geometric interpolation; it is not an arbitrary element assembler. Changes retain time; Reset restores both controls and zero time.
- Area scale · det A
- 1.4
- Singular values · σmax, σmin
- 1.597, 0.876
- Condition number · κ₂(A)
- 1.823
The selected matrix is A = [[a,b],[0,1]]. Playback interpolates geometry between the identity and A; readouts always describe A. Its determinant is a and its singular values come from AᵀA. Positive a makes every supported matrix invertible. This two-dimensional family is not a general eigensolver or a learned network. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.
Look forArea scaling alone cannot recover gradient energy when the affine map stretches or shears directions.
Pause & reason
Check your understanding
Your turn
Try it yourself
Use B=diag(1/2,1), no translation, and the same reference triangle and shape function xi₁. Compute physical area, physical gradient and energy integral.
Take a moment to make a prediction or work it out on paper. Open a hint when you need one.
Give me a hint
The cell contracts in the first direction, so the derivative in that direction grows.
Compare with the solution
The determinant is one half, giving physical area one quarter. The inverse transpose is diag(2,1), so the physical gradient is (2,0). Its squared length is four, and the energy integral is four times one quarter, or one. Although the cell area halved relative to the reference triangle, the shape-function energy doubled because the derivative increased in the contracted direction.
Keep the idea
Take it with you
- Scalar gradients transform with the inverse transpose; volume transforms with the absolute determinant.
- Element stiffness contains directional inverse-map factors as well as volume scaling.
- Shape regularity controls local constants without requiring global quasi-uniformity.
Read further
Original sources and deeper explanations to follow at your own pace.
Optional progress, saved in this browser when available. Revisit any lesson at any time.
Lesson not marked complete.