I am a newbie in FEM. I would like to get clarity regarding a few questions on shape functions in this post (please use as simple language as possible).

  1. What is the relation between Shape function and Degrees of freedom of any element? Are shape function chosen based on DOF of the element?

  2. What all parameters of a system should we know in order to define a shape function?

  3. Are shape functions different from approximation or interpolation functions?

  4. Does the shape function define the shape of an element?

  • 2
    $\begingroup$ This question is partly answered here: scicomp.stackexchange.com/q/32773/9667 $\endgroup$
    – nicoguaro
    Feb 8, 2020 at 14:43
  • $\begingroup$ that explains the term test function, trial function and basis function. But for "shape function", they have answered what they are using it to refer to, not what it is being used to refer throughout the text books and lectures by professors available on internet, And it only refers to my third question. Could you throw some light on rest of it. $\endgroup$ Feb 8, 2020 at 17:52
  • 3
    $\begingroup$ Maybe this question is helpful, then? (Note that we can not tell you what random people on the internet refer to -- even if they are professors. I can only answer for this one -->) $\endgroup$ Feb 9, 2020 at 0:50

1 Answer 1


Shape functions do not determine the shape of the element. Rather, shape functions are determined (at least partially) by the shape of the element.

The set of shape functions are ultimately determined by the degrees of freedom needed to cover interpolation of a given polynomial order for all points within the element as well as on the boundaries of the element.

For instance, consider a polynomial space of order 1 (linear function space). In 1d, a linear function space is spanned by 2 functions (e.g. 1 and x, but lagrange functions are more useful). Thus there are 2 degrees of freedom, corresponding to the coefficients assigned to the two functions that span this space.

In 1D, all “elements” have the same shape: a straight line. This makes it very easy to make the interpolation cover the entire element. If we choose the degrees of freedom to correspond to the nodal values at the boundary points (i.e. using lagrange functions), then interpolation between these two points covers the entire element.

But in 2d, things change a lot. A linear space is now spanned by 3 functions (i.e. 1, x, and y). So, a space spanned by 3 functions requires 3 degrees of freedom. On a 2D triangle, we need to choose these degrees of freedom in such a way that interpolation across the entire element, particularly across all the boundaries of the element. If we chose the degrees of freedom to be nodal values at the midpoints between the corners instead of corner points, this would not work. Interpolation between the degrees of freedom would only cover the middle of the element, not the corners. One would have to choose the degrees of freedom at the 3 corner points of the element. This establishes linear interpolation within the element, as well as the boundaries of the element.

But a triangle is not the only possible element shape in 2D. Now contrast the triangular element with a quadrilateral element. Technically speaking, a linear function space is still spanned by 3 functions. But no matter which 3 corners of the element you choose, it is impossible to establish linear interpolation to cover the remaining corner. To overcome this, we modify the function space to include an additional basis function while still preserving the polynomial degree order. For quadrilaterals, we use what is called “bilinear interpolation”. It is a space spanned by four functions (e.g. 1, x, y, and x*y) whose degrees of freedom can be chosen at the corners of the element so that interpolation can span all points within the element and along the boundaries of the element. Note that in either spatial dimension (x or y), the polynomial order is still linear.

We can certainly choose a higher order polynomial space to do interpolation, which would require more functions and therefore more degrees of freedom. The degrees of freedom do not necessarily have to all be corresponding to point values on the boundaries. But the number of shape functions depends on the spatial dimension size, and the polynomial functions used for interpolation. These polynomial functions are chosen in such a way as to cover the interpolation order across the entire shape of the element.

Interpolation on other shapes (e.g. pentagons, hexagons, etc.) and in 3 dimensions (e.g. tetrahedra, hexahedra, etc) is possible but requires similar considerations: the polynomial interpolation functions (and degrees of freedom) need to be chosen to preserve the polynomial order interpolation within the element and along its boundaries.

So what exactly are shape functions? They are the set of functions who, together, accomplish interpolation of a given order across the entire shape of the element (interior and boundary points).

As for the differences among “approximation” functions, “interpolation” functions and “shape” functions, your confusion is well merited. I have seen each of these terms used synonymously. Though the math remains the same, different authors emphasize different labels for different contexts. I believe most (not necessarily all) refer to the “shape” functions as the basis functions for a reference element as opposed to the basis function on the global coordinate system.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.