Matrix Structural Analysis (Introduction) - Theory & Concepts

Learning Objectives

  • Understand the fundamentals of Matrix Structural Analysis.
  • Formulate stiffness matrices for truss and beam elements.
  • Perform coordinate transformations.
  • Assemble global stiffness matrices and apply boundary conditions.

Matrix Structural Analysis is the foundation of all modern structural analysis software. It provides a systematic method for analyzing complex structures (trusses, beams, frames, grids) by formulating the equilibrium equations in matrix form.

Stiffness Method

Also known as the Displacement Method. It is preferred for computer implementation because the procedure is the same regardless of the degree of indeterminacy.

Global Stiffness Equation

The fundamental equation of the stiffness method.

Global Stiffness Equation

The fundamental equation of the stiffness method.

[K]{D}={F}[K] \{D\} = \{F\}

Variables

SymbolDescriptionUnit
[K][K]Global Stiffness Matrix (System Property)-
{D}\{D\}Global Displacement Vector (Unknowns)-
{F}\{F\}Global Force Vector (Applied Loads)-

Stiffness sensitivity visual

This figure asks a different question from matrix assembly: how does the relative stiffness change the displacement and the share of force carried by each member?

Stiffness sensitivity and force partition

The relative stiffnesses control the middle displacement and split the reaction and member-force magnitudes in the ratio k1 to k2.

A restrained two-member axial bar with a node 2 load, the relation u2 equals P divided by k1 plus k2, and symbolic force-partition bars.

Procedure

The process of Matrix Structural Analysis involves building the mathematical model of the structure piece by piece, then solving it simultaneously.

General Method

  • Discretize the Structure: Identify nodes (joints) and elements (members). Number them systematically.
  • Define Degrees of Freedom (DOF): Identify unknown displacements (translations and rotations) at each node.
  • Form Element Stiffness Matrices (kk): Calculate the stiffness matrix for each member in its local coordinate system.
  • Transformation: Transform element stiffness matrices from local to global coordinates using rotation matrices (TT).

Coordinate Transformation

Transforms element stiffness matrices from local to global coordinates.

[k]G=[T]T[k]L[T][k]_G = [T]^T [k]_L [T]

Global Matrix Assembly

  • Assemble Global Stiffness Matrix (KK): Add terms from element stiffness matrices into the corresponding positions in the global matrix based on node connectivity.
  • Apply Boundary Conditions: Reduce the matrix by removing rows/columns corresponding to zero displacements (supports).
  • Solve for Displacements (DD): Invert [K][K] and multiply by {F}\{F\}.

Global Displacement Solution

Solves for unknown global displacements.

{D}=[K]−1{F}\{D\} = [K]^{-1} \{F\}

Local Force Recovery

  • Calculate Member Forces (Local Force Recovery): Once the global nodal displacements ({D}\{D\}) are found, the internal end forces ({f}\{f\}) for each individual member (like shear, moment, and axial force) must be calculated in its own local coordinate system. This is done by extracting the relevant global displacements for that specific member ({d}\{d\}), multiplying by the local stiffness matrix ([k′][k']), and adding any fixed-end forces ({FEM}\{FEM\}) caused by loads applied directly along the member span.

Local Force Recovery Equation

Calculates the internal end forces for each individual member.

{f}=[k′]{d}+{FEM}\{f\} = [k'] \{d\} + \{FEM\}

Variables

SymbolDescriptionUnit
{f}\{f\}Internal end forces for the member-
[k′][k']Local stiffness matrix of the member-
{d}\{d\}Global displacements extracted for the specific member-
{FEM}\{FEM\}Fixed-end forces caused by applied loads-

Member-force recovery visual

The solved global displacement is restricted to each member's local displacement vector before the signed member force is recovered.

Recovering member forces from displacement

Member 1 uses u1 and u2, while Member 2 uses u2 and u3; their local relations recover signed axial forces.

Two axial members showing local displacement vectors and signed member-force recovery equations.

Stiffness Matrices for Truss and Beam Elements

Truss Element (2D)

A truss member has 2 degrees of freedom (DOF) at each node (horizontal uu, vertical vv). Total 4 DOF per element.

Truss Element Stiffness Matrix

The local stiffness matrix for a 2D truss member.

[k]=EAL[c2cs−c2−cscss2−cs−s2−c2−csc2cs−cs−s2css2][k] = \frac{EA}{L} \begin{bmatrix} c^2 & cs & -c^2 & -cs \\ cs & s^2 & -cs & -s^2 \\ -c^2 & -cs & c^2 & cs \\ -cs & -s^2 & cs & s^2 \end{bmatrix}

Variables

SymbolDescriptionUnit
cccos⁡θ\cos \theta-
sssin⁡θ\sin \theta-

Beam Element (2D)

A beam member has 2 DOF at each node (vertical vv, rotation θ\theta). Total 4 DOF per element (neglecting axial deformation).

Beam Element Stiffness Matrix

The local stiffness matrix for a 2D beam member.

[k]=EIL3[126L−126L6L4L2−6L2L2−12−6L12−6L6L2L2−6L4L2][k] = \frac{EI}{L^3} \begin{bmatrix} 12 & 6L & -12 & 6L \\ 6L & 4L^2 & -6L & 2L^2 \\ -12 & -6L & 12 & -6L \\ 6L & 2L^2 & -6L & 4L^2 \end{bmatrix}

Variables

SymbolDescriptionUnit
LLLength of the beam element-
EEModulus of elasticity-
IIMoment of inertia-

Global vs. Local Coordinate Systems

In matrix analysis, members are oriented in various directions. Therefore, equations written for a single member must be transformed into a common, structure-wide coordinate system before they can be assembled.

Coordinate Transformation

  • Local Coordinates (x′,y′x', y'): Aligned with the axis of each individual member. The local x′x' axis runs along the length of the member, and y′y' is perpendicular to it. The local stiffness matrix [k′][k'] relates forces and displacements purely within this local frame.
  • Global Coordinates (X,YX, Y): The overarching fixed coordinate system applied to the entire structure.
  • Transformation Matrix ([T][T]): A matrix containing the direction cosines (cosine and sine of the angle θ\theta between the local and global axes) of the member. It is used to convert the local stiffness matrix [k′][k'] into the global stiffness matrix [k][k] for that member.

The relationship for transformation is:

[k]=[T]T[k′][T][k] = [T]^T [k'] [T]

This ensures that when member matrices are added together at a common node, they are summing forces acting in the exact same global directions.

Coordinate mapping visual

Before member contributions can share a global system, local axes and stiffness quantities must be mapped with direction cosines.

Local-to-global coordinate mapping

With dᴸ = T dᴳ, the transformation maps global displacement components into member-local coordinates, and kᴳ = Tᵀ kᴸ T maps local stiffness into the common global system.

An inclined structural member with local x-prime and y-prime axes inside global X and Y axes.

Assembly of Global Stiffness Matrix

The assembly process is crucial. Each element connects two nodes (e.g., node ii and node jj). The terms in the element stiffness matrix corresponding to node ii are added to the global matrix locations for node ii, and similarly for node jj and the cross-terms (i−ji-j).

Direct-stiffness coefficient reference

This fixed visual answers a different question from the existing step-through assembly simulation: where each global coefficient comes from, which degree of freedom remains free, and how the restrained rows recover reactions. It is not a second assembly sequence.

Direct-stiffness coefficient provenance and boundary reduction

Connectivity identifies the source of global matrix terms, highlights the shared k1 plus k2 diagonal, and reduces the restrained system to the free equation for u2.

A direct-stiffness reference mapping two local node pairs to global displacement slots, the resulting symbolic global matrix, and the one-equation boundary reduction.

Two complementary simulations

The existing simulation walks through the four-step matrix assembly sequence. The companion sensitivity simulation below keeps the same small model but varies k1, k2, and P to connect the assembled matrix to displacement, reactions, and member forces.

Direct stiffness sensitivity

Concept and model scope

Vary the two member stiffnesses and the nodal load, then connect the assembled matrix to displacement, support reactions, and recovered member forces.

The model is a one-dimensional, linear-elastic axial chain with two members and three nodes. Node 1 and Node 3 are restrained, so u1=u3=0u_1=u_3=0 and only u2u_2 is unknown.

Stiffness values represent the axial surrogate EA/LEA/L in kN/m. The drawing keeps member lengths visually equal and does not claim a physical cross-section.

Positive global direction is to the right. Member force is positive in local tension; reactions are the restrained-row entries of [K]u[K]u.

  • k1k_1: 50–500 kN/m, step 10 kN/m.
  • k2k_2: 50–500 kN/m, step 10 kN/m.
  • PP: −60 to +60 kN, step 5 kN.
[K]=[k1−k10−k1k1+k2−k20−k2k2],u2=Pk1+k2[K] = \begin{bmatrix} k_1 & -k_1 & 0 \\ -k_1 & k_1+k_2 & -k_2 \\ 0 & -k_2 & k_2 \end{bmatrix}, \qquad u_2=\frac{P}{k_1+k_2}

Node 2 displacement 0.0625 metres. support reaction R1 -11.25 kilonewtons. support reaction R3 -18.75 kilonewtons. member force N1 +11.25 kilonewtons. member force N2 -18.75 kilonewtons. equilibrium residual 0.00e+0 kilonewtons.

Direct stiffness model controls

Controls

Two-member axial bar responseNode 1 and Node 3 are restrained, Node 2 carries the selected axial load, and the two fixed-length schematic members carry the recovered member forces.P = +30 kNR₁ = -11.25 kNR₃ = -18.75 kNMember 1 · k₁ = 180 kN/mMember 2 · k₂ = 300 kN/mNode 1 · u₁ = 0Node 2 · u₂Node 3 · u₃ = 0

Fixed supports enforce u1=u3=0u_1=u_3=0. Arrow direction follows the selected sign convention; geometry is not to scale.

Assembled global matrix

The middle diagonal receives both member contributions.

[K]=[k1−k10−k1k1+k2−k20−k2k2][K] = \begin{bmatrix} k_1 & -k_1 & 0 \\ -k_1 & k_1+k_2 & -k_2 \\ 0 & -k_2 & k_2 \end{bmatrix}
Heatmap of the three by three global stiffness matrix
Ku₁u₂u₃
F1180-1800
F2-180480-300
F30-300300

Matrix entries: kN/m

Boundary reduction and solution

u2=Pk1+k2=30 kN480 kN/m=0.0625 mu_2 = \frac{P}{k_1+k_2} = \frac{30\ \text{kN}}{480\ \text{kN}/\text{m}} = 0.0625\ \text{m}

The restrained degrees of freedom are removed from the solve, but the full matrix still recovers the support reactions. Positive member force means tension in the member's local left-to-right direction.

Response and force recovery

Node 2 displacement0.0625 m
Equilibrium residual0.00e+0 kN
Support reactionsR₁ = -11.25 kN · R₃ = -18.75 kN
Member forcesN₁ = +11.25 kN · N₂ = -18.75 kNN₁ tension · N₂ compression

Force partition by relative stiffness

For a nonzero load, the reaction magnitudes partition as k1:(k1+k2)k_1:(k_1+k_2) and k2:(k1+k2)k_2:(k_1+k_2). Change one stiffness to see the share move.

Member 1 / left support37.5%
Member 2 / right support62.5%

At P=0P=0, all forces are zero even though the stiffness shares remain visible as a sensitivity ratio.

Node Numbering and Matrix Bandwidth

How you choose to number the nodes in your structure drastically affects the computational efficiency of solving the matrix equations.

  • Bandwidth: The non-zero elements in a global stiffness matrix [K][K] tend to cluster around the main diagonal. The "bandwidth" is the maximum distance from the main diagonal to a non-zero element.
  • Efficiency: Solving large systems of equations is faster and requires less computer memory if the bandwidth is small.
  • Optimal Numbering Rule: To minimize bandwidth, nodes should be numbered such that the maximum numerical difference between any two connected nodes in the entire structure is kept as small as possible. For example, numbering nodes across the short dimension of a rectangular grid is much better than numbering them along the long dimension.

Bandwidth visual

The node-ordering choice is a computational question: it changes the distance of nonzero matrix entries from the diagonal without changing the structure.

Node numbering and matrix bandwidth

The two matrices represent the same five-node chain with rows and columns permuted together. Natural ordering has half-bandwidth 2, while the illustrated permutation has half-bandwidth 4; connectivity and stiffness physics are unchanged.

Side-by-side symmetric five-by-five stiffness sparsity patterns for the same five-node chain, comparing natural and permuted degree-of-freedom ordering.

Application of Boundary Conditions

Before the global equilibrium equations ([Q]=[K][D][Q] = [K][D]) can be solved, boundary conditions (known displacements at supports) must be applied. Otherwise, the global stiffness matrix [K][K] is singular (non-invertible) because the structure is free to move as a rigid body.

Methods for Boundary Conditions

  • Partitioning Method: The global matrices are partitioned into known and unknown displacements and forces. The equations corresponding to known zero displacements are mathematically eliminated or separated, resulting in a reduced, invertible stiffness matrix.
  • Penalty Method: A very large stiffness value (e.g., 102010^{20}) is added to the diagonal element of the global stiffness matrix corresponding to the restrained degree of freedom, effectively enforcing a zero displacement without altering the size of the matrix.

Equilibrium check visual

The restrained rows of the full global system recover reactions, which should close the applied-load balance after the free displacement is solved.

Reaction recovery and equilibrium residual

For the shown positive rightward load, both restrained reactions are negative in the global sign convention. The recovered reactions satisfy R1 plus P plus R3 equals zero, while the free-row residual is zero.

A restrained three-node axial model with a positive rightward middle load and two recovered support reactions acting leftward.
Key Takeaways
  • Stiffness Method solves [K]{D}={F}[K]\{D\} = \{F\} for unknown displacements.
  • Degrees of Freedom (DOF): Independent displacements (translations/rotations) that define the deformed shape.
  • Matrix Analysis is systematic and scalable, ideal for computer software.
  • Assembly: Combining element stiffness matrices into a global matrix based on connectivity.
  • Transformation: Rotating local element coordinates to align with the global system.
  • Node Numbering: Proper node numbering minimizes matrix bandwidth, leading to faster computational solution times and lower memory usage.