Skip to content

Guide · Stiffness method

Direct stiffness method: steps and solved examples

The method behind every matrix structural analysis program, written as seven steps, then applied to three small structures: a truss, a continuous beam and a frame. Each example links to a full guide for that structure type.

Quick answer. In the direct stiffness method the unknowns are the joint displacements \(\mathbf{u}\). Each member gives a stiffness matrix; the matrices are added into a global matrix \(\mathbf{K}\); the rows and columns of supported degrees of freedom are removed; the reduced system \(\mathbf{K}_{ff}\mathbf{u}_f=\mathbf{F}_f\) is solved; and member forces and reactions are recovered from \(\mathbf{u}\). The same steps solve trusses, beams and frames, determinate or not.

1. The direct stiffness method in seven steps

  1. Number the degrees of freedom (DOFs). A plane truss joint has two (\(u_x,u_y\)), a beam node two (\(v,\theta\)) and a plane frame joint three (\(u_x,u_y,\theta\)).
  2. Form each element matrix \(\mathbf{k}'\) in the member’s own axes, for example \(\tfrac{EA}{L}\left[\begin{smallmatrix}1&-1\\-1&1\end{smallmatrix}\right]\) for a bar.
  3. Transform to global axes with the rotation matrix \(\mathbf{T}\) built from the direction cosines \(c=\cos\alpha\), \(s=\sin\alpha\): \(\mathbf{k}=\mathbf{T}^{\mathsf T}\mathbf{k}'\mathbf{T}\).
  4. Assemble \(\mathbf{K}=\sum\mathbf{k}\), adding each entry at the global row and column of its DOF. Loads along members become equivalent joint loads (the negatives of the fixed-end forces).
  5. Apply supports by deleting the rows and columns of restrained DOFs, which leaves \(\mathbf{K}_{ff}\).
  6. Solve \(\mathbf{K}_{ff}\mathbf{u}_f=\mathbf{F}_f\) for the free displacements.
  7. Recover results: member end forces \(\mathbf{f}'=\mathbf{k}'\mathbf{T}\mathbf{u}+\mathbf{f}'_{\text{fixed}}\), and reactions \(\mathbf{R}=\mathbf{K}_{sf}\mathbf{u}_f-\mathbf{F}_s\) (\(s\) for supported DOFs, with fixed-end forces included in \(\mathbf{F}_s\)). Check that the reactions balance the loads.

Steps 2 and 3 change with the element type; steps 4 to 7 are the same for every structure. That is why the examples below look alike once the element matrices are written down.

2. Truss example: a triangle on an inclined roller

Joints A (0, 0), B (6, 0) and C (3, 4) m are joined by three steel tubes, CHS 88.9×5, with \(E=210\) GPa and \(A=1318\ \mathrm{mm^2}\), so \(EA=276\,759\) kN. A is a pin. B sits on a roller on a 30° incline, so it can only slide along the incline. Joint C carries 30 kN to the right and 40 kN downward.

Elements. Bar AB has \(L=6\) m and \(EA/L=46\,126\) kN/m; AC and BC have \(L=5\) m and \(EA/L=55\,352\) kN/m, with direction cosines \((0.6,\ 0.8)\) and \((-0.6,\ 0.8)\). Each bar matrix in global axes is \(\tfrac{EA}{L}\left[\begin{smallmatrix}\mathbf{m}&-\mathbf{m}\\-\mathbf{m}&\mathbf{m}\end{smallmatrix}\right]\) with \(\mathbf{m}=\left[\begin{smallmatrix}c^2&cs\\cs&s^2\end{smallmatrix}\right]\).

The inclined support. The 6×6 global matrix has rank 3, the three rigid-body motions of a plane body. A removes two DOFs. At B the restrained direction is not a global axis, so B’s two DOFs are rewritten as one slide \(s_B\) along the incline, \(u_{Bx}=s_B\cos30^\circ\), \(u_{By}=s_B\sin30^\circ\); the normal displacement is zero. This is step 3 applied to a support instead of a member. The free DOFs are \((s_B,\ u_{Cx},\ u_{Cy})\):

$$\begin{bmatrix}35\,387 & -3\,973 & 5\,297\\ -3\,973 & 39\,853 & 0\\ 5\,297 & 0 & 70\,850\end{bmatrix}\begin{bmatrix}s_B\\ u_{Cx}\\ u_{Cy}\end{bmatrix}=\begin{bmatrix}0\\ 30\\ -40\end{bmatrix}\ \Rightarrow\ \begin{bmatrix}s_B\\ u_{Cx}\\ u_{Cy}\end{bmatrix}=\begin{bmatrix}0.173\\ 0.770\\ -0.577\end{bmatrix}\ \text{mm}$$

(matrix in kN/m, loads in kN). Back-substitution gives the results below. The reaction at B is 46.19 kN and points exactly along the incline normal, which confirms that the support transformation is right.

Results for the triangular truss on an inclined roller
QuantityValue
Reaction at A, \(A_x\), \(A_y\)−6.91 kN, 0
Reaction at B, \(B_x\), \(B_y\)−23.09 kN, +40.00 kN
Force in AB+6.91 kN (tension)
Force in AC0 (zero-force member)
Force in BC−50.00 kN (compression)
Live result: the truss on an inclined roller

Solving the example in your browser…

Axial forces, deformed shape and reactions of the truss, drawn by the same solver as the calculator.

The full derivation of the bar matrix and a statically indeterminate three-bar truss are in the 2D truss stiffness matrix solver guide.

3. Beam example: two spans, three rotations

A continuous IPE 360 beam (\(EI=34\,167\ \mathrm{kN\,m^2}\)) has spans AB = 5 m and BC = 6 m on three simple supports and carries 20 kN/m on both spans. All vertical deflections at the supports are zero, so only the rotations \(\theta_A,\theta_B,\theta_C\) are free. The rotational parts of the two 4×4 beam matrices, \(\tfrac{EI}{L}\left[\begin{smallmatrix}4&2\\2&4\end{smallmatrix}\right]\), overlap at B. The equivalent joint moments are the negatives of the fixed-end moments \(\pm wL^2/12\) (41.67 kN·m for AB, 60.00 kN·m for BC), counterclockwise positive:

$$EI\begin{bmatrix}0.8 & 0.4 & 0\\ 0.4 & 1.4667 & 0.3333\\ 0 & 0.3333 & 0.6667\end{bmatrix}\begin{bmatrix}\theta_A\\ \theta_B\\ \theta_C\end{bmatrix}=\begin{bmatrix}-41.67\\ 41.67-60\\ 60\end{bmatrix}\ \Rightarrow\ EI\begin{bmatrix}\theta_A\\ \theta_B\\ \theta_C\end{bmatrix}=\begin{bmatrix}-39.58\\ -25.00\\ 102.50\end{bmatrix}\ \mathrm{kN\,m^2}$$

So \(\theta_C=102.5/34\,167=0.00300\) rad. Step 7 on span AB gives end moments 0 at A and 77.5 kN·m hogging at B, the value the three-moment equation gives, \(w(L_1^3+L_2^3)/[8(L_1+L_2)]=77.5\) kN·m. The reactions are \(R_A=34.50\) kN, \(R_B=65.50+72.92=138.42\) kN and \(R_C=47.08\) kN, which add up to the total load of 220 kN.

Live result: the two-span beam under 20 kN/m

Solving the example in your browser…

Shear, moment and deflection under the uniform load. The example also has a second load case, a 12 mm settlement of B, that you can switch to in the calculator.

Where the 4×4 beam matrix comes from, and how fixed-end forces are added back, is covered in the beam stiffness matrix guide.

4. Frame example: an L-shaped cantilever

A W10×33 steel column (\(E=29\,000\) ksi, \(I=171\ \mathrm{in^4}\), \(A=9.71\ \mathrm{in^2}\)) is fixed at its base A and rises \(h=10\) ft to a rigid knee B, from which a horizontal arm of the same section reaches \(a=8\) ft to C. A 5 kip load acts downward at C. Working in kips and inches, B and C are free, which gives six DOFs \((u_x,u_y,\theta)\) for each joint. The column matrix is the frame element rotated by 90°; the arm needs no rotation.

Solving the 6×6 system gives the displacements below. The frame is statically determinate, so they can be checked by virtual work: \(\delta_v=\tfrac{Pa^3}{3EI}+\tfrac{Pa^2h}{EI}+\tfrac{Ph}{EA}=0.2974+1.1151+0.0021=1.4145\) in, and \(\delta_h=\tfrac{Pah^2}{2EI}=0.6969\) in. Both match the stiffness solution.

Displacements and reactions of the L-shaped cantilever frame
QuantityStiffness method
Knee B: \(u_x\), \(u_y\), \(\theta\)0.6969 in, −0.0021 in, −0.01162 rad
Tip C: \(u_x\), \(u_y\), \(\theta\)0.6969 in, −1.4145 in, −0.01626 rad
Base A: \(A_x\), \(A_y\)0, 5 kip
Base moment \(M_A=Pa\)480 kip·in (40 kip·ft)
Live result: the L-shaped cantilever frame

Solving the example in your browser…

Deformed shape and member force diagrams of the frame, drawn by the same solver as the calculator.

The column shortening of 0.0021 in shows that the stiffness method includes axial deformation by default. A frame with sway and two fixed bases is worked in full in the frame stiffness method example.

5. Stiffness method vs flexibility method

Comparison of the stiffness method and the flexibility method
AspectStiffness (displacement) methodFlexibility (force) method
UnknownsJoint displacements and rotationsRedundant forces or moments
Equations writtenEquilibrium at the jointsCompatibility of displacements
Matrix equation\(\mathbf{K}\mathbf{u}=\mathbf{F}\)\(\mathbf{f}\,\mathbf{X}=-\boldsymbol{\Delta}_0\)
Number of unknownsDegree of kinematic indeterminacyDegree of static indeterminacy
Two-span beam above3 rotations1 redundant (the reaction or moment at B)
Choices by the analystNone; the steps never changeWhich redundants to release
Typical useComputer programs, large modelsHand calculation of small indeterminate structures

For hand work the flexibility method can mean fewer equations, as the beam shows. The stiffness method wins as soon as a computer does the arithmetic, because assembly is mechanical and the matrix is symmetric, banded and positive definite once the supports are adequate.

6. Common pitfalls

Run the direct stiffness method on your own structure

Open any of the three examples or start a new model. The calculation report lists the element matrices, the assembled stiffness matrix and the solved displacements.

Frequently asked questions

What is the direct stiffness method?

It is a matrix method of structural analysis in which the unknowns are the joint displacements and rotations. Each member contributes a stiffness matrix, the matrices are added into one global matrix \(\mathbf{K}\), the supports are applied, and \(\mathbf{K}\mathbf{u}=\mathbf{F}\) is solved. Member forces and reactions follow from the displacements.

Why is it called direct?

Because each member matrix is added straight into the global matrix at the rows and columns of its own degrees of freedom. There is no need to write equilibrium and compatibility equations joint by joint, so the same short routine handles any truss, beam or frame.

What is the difference between the stiffness method and the flexibility method?

The stiffness method takes displacements as unknowns and writes equilibrium equations. The flexibility method takes redundant forces as unknowns and writes compatibility equations. The flexibility method needs the engineer to choose the redundants, while the stiffness method follows the same steps for every structure, which is why computer programs use it.

Why is my global stiffness matrix singular?

The structure, or part of it, can move as a rigid body or as a mechanism. Before supports are applied the matrix is always singular: a plane truss has three rigid-body motions. After supports it is singular only if the supports are not enough, a joint has no stiffness in some direction, or members are connected by too many hinges.

Can the direct stiffness method handle statically indeterminate structures?

Yes, with no extra work. The degree of indeterminacy never enters the calculation. The two-span beam on this page is indeterminate to the first degree and is solved with the same steps as the statically determinate truss and frame.

Is there a direct stiffness method calculator?

StiffStruct solves beams, 2D and 3D trusses and 2D and 3D frames with the direct stiffness method in the browser and shows the element matrices, the assembled matrix and the solved displacements in a step-by-step report. The three examples on this page open in it with one click.

An educational tool: verify results independently before using them for design. All values on this page come from the same solver that powers the calculator.