Stiffness Matrix Calculator
Our stiffness matrix calculator will help you determine the element stiffness matrices for the truss, beam, and frame elements. Truss, beam, and frame elements are the most basic elements used in finite element analysis in solid mechanics.
If you were wondering how to calculate the stiffness matrix for these three elements, you've come to the right place! In this article, we aim to teach you the following:
- Truss elements and calculating the stiffness matrix for truss elements.
- Beam elements and calculating beam stiffness matrix.
- Frame elements and calculating frame stiffness matrix.
Familiarity with spring stiffness will be a good base for the article below. We recommend you go through our spring rate calculator before diving in!
Calculating stiffness matrix for truss elements
Trusses are bars joined end to end to form a rigid structure such that only axial forces are acting on each bar. Typically, truss structures are used in supporting roofs. You can also see them used in bridges.
The stiffness of a bar is given by:
where:
- — Stiffness of the bar;
- — Cross-sectional area of the bar;
- — Young's modulus of the bar; and
- — Length of the bar.
If you need help with Young's modulus calculation, our Young's modulus calculator can help you.
Let us learn how to calculate the stiffness matrix of a truss element. Consider the free body diagram of a truss element tilted at an angle to the global x-axis.

It is easier to analyze the element in its local coordinate system and then transform our equations into the global coordinate system.

This free-body diagram shows that:
- At equilibrium, the element forces and result in an equal and opposite axial reaction force in the truss element.
- Since the element displacements and are lateral, they do not result in any axial reaction forces in the element. This is valid because we assume the displacements are small. Thus, and are zero.
Similar to spring, the reaction force in the truss member is given by:
From the diagram, we note that the element force . Hence we can write:
Again, from the diagram, we note that the element force . Thus, we write:
Putting the two axial element force equations in a matrix, we get:
Combining this with our understanding that the element forces and are zero, we can expand the matrix equation to include them:
where:
- — Local element stiffness matrix;
- — Local element displacement vector; and
- — Local element force vector.
To convert the equation (and our stiffness matrix) from the local to the global coordinate system, we introduce a transformation matrix , where:
Where is the angle of orientation of the element with respect to the global x-axis.
This transformation matrix is an orthogonal matrix, which means that:
The formula for the element stiffness matrix of a truss element in the global coordinate system is obtained by: