TL;DR
A stiffness matrix is a square table of numbers that links the positions of a set of points, called nodes, to the forces needed to hold those points in place. Multiply the matrix by the list of displacements and you get the list of forces. Solving the reverse problem, which is given the loads find the displacements, is how engineers predict how a bridge, a car frame or an aircraft wing will bend.
The matrix is built from simple pieces. Each spring or small element contributes a small table, and these tables are added together by node number. The result is symmetric, and it describes the whole structure at once.
Builds on: Hooke's Law, Matrix Multiplication, Gaussian Elimination · Leads to: Finite Element Method, Linear Elasticity, Sparse Matrix
Where it's used
Bridges and buildings. Structural engineers model a steel truss as bars joined at nodes. The global stiffness matrix of the truss tells the engineer how far each joint moves under traffic or wind, and whether the joints stay within safe limits. Commercial structural codes assemble and solve matrices of this kind for every design check.
Car and aircraft parts. A car chassis or an aircraft wing is modelled as a mesh of small solid elements. Each element has its own small stiffness matrix, derived from Linear Elasticity, and they are assembled into one matrix with millions of rows. Engineers use the result to find stress concentrations before a part is built.
Computer graphics. Animators and game engines simulate soft objects, such as cloth or jelly, by treating the object as a network of springs. The same matrix that describes a bridge describes the springs that hold the jelly together, and the solver computes how it wobbles.
How it works
We trace one tiny structure from start to finish. A wall is at the left. Node 1 is fixed to the wall, so it cannot move. Node 2 is joined to node 1 by a spring with stiffness N/m. Node 3 is joined to node 2 by a spring with stiffness N/m. A force of 6 N pulls node 3 to the right, and we want to know how far each node moves.
flowchart LR W["Wall: node 1 fixed"] -- "spring k1 = 2" --> N2["Node 2"] N2 -- "spring k2 = 3" --> N3["Node 3: load 6 N"]
- Write the matrix for one spring. A spring of stiffness between two nodes gives the table . For spring 1, that is on nodes 1 and 2. Check: the two rows add to zero, because the spring pushes the two ends in opposite directions.
- Write the matrix for the second spring. For spring 2, it is on nodes 2 and 3.
- Add them by node number. Node 2 belongs to both springs, so its diagonal entry gets . The full matrix is . Check: it is symmetric, and each row adds to zero.
- Remove the fixed node. Node 1 cannot move, so its row and column are dropped, leaving the system . The right-hand side holds the forces: none at node 2, and 6 N at node 3.
- Solve. The first row gives , so . Put this into the second row: , so and . Then . Check: and .
- Check the forces. Spring 1 stretches by , so it carries N. Spring 2 stretches by , so it carries N, which equals the applied load.
Interpretation: a 6 N pull moves the free end 5 m in this toy model. The springs share the load equally, because each one carries the same 6 N. A stiffer spring would move less.
The math
Step 1 in symbols: a spring element
A spring of stiffness stretched by between nodes and stores energy . Write the displacements as a vector . Then the element stiffness is
Check that this reproduces the energy. We have , so the energy is . This is a Quadratic Form in the displacements.
Step 2 in symbols: assembly
For a structure with nodes , each element has a local matrix, and the global matrix is the sum of the elements placed at their node positions:
where selects the rows and columns of the element's nodes. In words: add each element's entries into the global table at the row and column of the node they belong to. Entries that share a node add up, which is the in the example.
Step 3 in symbols: the equilibrium equation
The structure's total energy is , where is the vector of external loads. Setting the gradient to zero gives . This is the equation to solve: the stiffness matrix times the displacements equals the loads. In the example, is the reduced system of step 4.
- energy 1/2 * 5 * x^2
Step 4 in symbols: fixed supports make K invertible
A structure with no supports can move as a rigid body, so has a row of zeros in the direction of that motion and its determinant is . Fixing a node removes that freedom. Once enough nodes are fixed, is positive definite (its quadratic form is positive for every nonzero displacement of the free nodes). Positive definite matrices are invertible, so the system has exactly one solution.
Worked examples
A spring with N/m joins two nodes. Node 1 is held fixed, and node 2 is pulled to m.
- Write the element matrix: .
- Multiply by : the first entry is , and the second is .
- So N. This is the external force you must apply to hold the nodes there: push node 1 left by 1 N and node 2 right by 1 N.
- Check: the spring is stretched by m, so its force is N, and the two forces are equal and opposite, as the entries show.
Interpretation: the matrix turns a displacement into the force needed to hold it, and the sign tells you the direction.
Use the chain from "How it works", with reduced to and loads .
- Solve the first equation for : .
- Substitute into the second: , which is , so and .
- Then .
- Find the reaction at the wall: the first row of the full matrix gives . The wall must push node 1 with N, which balances the 6 N pull on the other end.
- Check that all forces balance: .
Interpretation: the free end moves 5 m and the middle node moves 3 m. The reaction at the wall equals the applied load, as it must.
A steel bar of length m and cross-sectional area m has Young's modulus GPa, which is Pa. It is fixed at one end, and a 1000 N load pulls the other end. It is split into two elements of length m, each with stiffness .
- Compute the element stiffness: N/m.
- The global matrix for three nodes is . Check: the middle node belongs to both elements, so its diagonal entry is .
- Fix node 1 and remove its row and column: .
- The first row gives . The second row gives . Put in : , so m.
- Then m.
- Check against the textbook formula m. It matches the free-end displacement.
Interpretation: the bar stretches by mm under 1 kN. Two elements reproduce the exact answer for this simple load, and finer meshes are needed when the load or geometry is more complicated.
Try it: A single spring with N/m has node 1 fixed and node 2 displaced to m. What force must be applied to hold it there? Answer: N. Check: the stretch m times N/m is N, matching the second entry.
Common mistakes and tradeoffs
"The stiffness matrix is just a list of spring constants." It is tempting to think each node has its own spring. In fact the off-diagonal entries couple neighbouring nodes, because a spring pulls on both of its ends. Ignoring the off-diagonal entries gives the wrong answer for any structure with more than one spring.
"You can invert the stiffness matrix as soon as you build it." A structure with no supports can move as a rigid body, so the matrix is singular. You must apply the boundary conditions first, by removing the fixed rows and columns, before solving.
"Assembly means stacking the element matrices." Assembly adds each element's entries at the global positions given by its node numbers. Entries from different elements that share a node add together, and this is the most common source of bugs in hand-built models.
When to use it. The stiffness method is right for small deformations of linear materials, where the load and the displacement are proportional. It is the basis of finite element analysis for bridges, frames and mechanical parts. Do not use it when the deformations are large, the material yields or flows, or the geometry changes as it bends. Those cases need nonlinear stiffness, which is updated at each step of the solution. For very large meshes, the matrix is mostly zeros, so a Sparse Matrix format and an iterative solver are used in place of dense Gaussian elimination.
History
Robert Hooke first published his law of elasticity in 1676 as an anagram, and in 1678 he revealed the solution, "ut tensio, sic vis" (as the extension, so the force), which states that stretch is proportional to force. Engineers used this rule for two centuries to analyse frames and trusses one piece at a time.
In the 1940s, Richard Courant showed that approximating a solution by simple piecewise functions on a triangulated region could solve the equations of elasticity. In the 1950s, aircraft engineers used matrix methods to analyse wings made of many interconnected parts, and the term "finite element" was introduced by Ray Clough in 1960. The stiffness matrix became the central object of the method because a computer could assemble and solve it for any structure, which made the technique practical for industry.
Recap
- Hooke's law makes a spring's force proportional to its stretch, which gives the element matrix .
- Element matrices are assembled into a global matrix by node number, and entries from shared nodes add.
- The structure's equilibrium is , with displacements and loads .
- Fixing supports removes rigid-body motion, which makes positive definite and invertible.
- Solving the system gives the displacements, from which the forces in each element follow.
Read next: Finite Element Method applies this idea to continuous bodies by cutting them into elements, and Linear Elasticity gives the element matrices for solids. Sparse Matrix explains how large versions are stored and solved.
Check yourself
QuestionRecall: what is the stiffness matrix of a single spring of stiffness joining two nodes?Show answer
It is . The diagonal entries are the spring's stiffness, and the off-diagonal entries couple the two ends, with opposite signs because the spring pushes them in opposite directions.
QuestionComputation: a single spring with N/m has node 1 fixed and node 2 displaced to m. What is the force needed to hold node 2 there?Show answer
The stretch is m, so the spring force is N. The force vector from is N, so node 2 needs a force of N. Check: the two forces are equal and opposite.
QuestionWhy: why must the supports be applied before solving ?Show answer
Without supports, the structure can move as a rigid body, which gives a zero direction in and makes singular, so there is no unique solution. Fixing a node removes that rigid motion, and the reduced matrix is positive definite and invertible.
QuestionApplied: an engineer assembles a global stiffness matrix by adding each element's entries at the row and column of its first node only. Why does this give a wrong answer, and what should be done instead?Show answer
Each element couples both of its nodes, so its entries belong at four positions: the two diagonal entries and the two off-diagonal entries that link its nodes. Adding only at the first node drops the coupling and the second node's stiffness. Each element's matrix should be added at the rows and columns of both of its nodes.