# Does the global stiffness matrix size depend on the number of joints or the number of elements?

When assembling all the stiffness matrices for each element together, is the final matrix size equal to the number of joints or elements?

• The size of the matrix depends on the number of nodes. The bandwidth of each row depends on the number of connections. Sep 30 '15 at 21:21
• What do you mean by joints? Oct 1 '15 at 15:37
• @Stali That sounds like an answer to me -- would you care to add a bit of explanation and post it? Oct 1 '15 at 15:43

The number of rows and columns in the final global sparse stiffness matrix is equal to the number of nodes in your mesh (for linear elements). For example if your mesh looked like: then each local stiffness matrix would be 3-by-3. Once all 4 local stiffness matrices are assembled into the global matrix we would have a 6-by-6 global matrix. For example the local stiffness matrix for element 2 (e2) would added entries corresponding to the second, fourth, and sixth rows and columns in the global matrix. For this mesh the global matrix would have the form:

$$\begin{bmatrix} * & * & 0 & 0 & 0 & * \\ * & * & * & * & 0 & * \\ 0 & * & * & * & 0 & 0 \\ 0 & * & * & * & * & * \\ 0 & 0 & 0 & * & * & * \\ * & * & 0 & * & * & * \\ \end{bmatrix}$$

where each * is some non-zero value. I assume that when you say joints you are referring to the nodes that connect elements. If this is the case then using your terminology the answer is: the global stiffness matrix has size equal to the number of joints.

• More generally, the size of the matrix is controlled by the number of degrees of freedom, which may or may not be the same as the number of nodes, depending on the problem in question and the type of elements used. Since the OP mentioned joints (implying a standard direct stiffness method), it is fair to assume that the number of DOF's and the number of nodes are identical.
– Paul
Oct 1 '15 at 19:22