Element Stiffness Matrix Calculator

Enter coordinates, modulus, and area for your element. Review length, cosines, and scaling factor quickly. Download matrices to share with your design team today.

Calculator 2D truss/bar element
Use consistent units with area and length.
This label appears in the results.
Reset
Example data table
Case E (MPa) A (mm²) (x1,y1) (x2,y2) Length L (mm) Direction (c, s)
Steel tie 200000 500 (0, 0) (3000, 0) 3000 (1.0000, 0.0000)
Diagonal member 210000 450 (0, 0) (2400, 1800) 3000 (0.8000, 0.6000)
Aluminum brace 70000 600 (100, 50) (100, 2050) 2000 (0.0000, 1.0000)

Tip: Use the same length unit for coordinates and L.

Formula used

Geometry and direction cosines

Let node coordinates be (x1, y1) and (x2, y2). Compute: dx = x2 − x1, dy = y2 − y1, L = √(dx² + dy²).

Direction cosines are: c = dx/L and s = dy/L.

Stiffness scaling

The axial scaling term is: k0 = EA/L.

Global stiffness matrix (2D truss/bar)

Using DOF order [u1, v1, u2, v2], the element stiffness matrix is:

k0·c²k0·cs−k0·c²−k0·cs
k0·csk0·s²−k0·cs−k0·s²
−k0·c²−k0·csk0·c²k0·cs
−k0·cs−k0·s²k0·csk0·s²

This is the standard axial bar element mapped into global x–y.

How to use this calculator
  1. Enter E and A using your preferred unit labels.
  2. Enter node coordinates for both ends of the element.
  3. Pick decimal places for clean reporting.
  4. Click Calculate matrix to generate results.
  5. Use CSV for spreadsheets and PDF for reports.
Article

1) What the element stiffness matrix represents

The element stiffness matrix converts nodal displacements into equivalent nodal forces for one truss member. In 2D, it relates four degrees of freedom: u1, v1, u2, and v2. It is the building block for global assembly, where many elements contribute to the structure-wide stiffness.

2) Inputs you must keep consistent

This calculator uses the axial term EA/L, so E, A, and L must be compatible. For example, if you use E = 200000 MPa (N/mm²), choose A in mm² and coordinates in mm. Then EA/L returns N/mm, which matches typical truss stiffness units and keeps results physically meaningful.

3) Typical material stiffness values

Engineers often start with reference data: structural steel is commonly near 200–210 GPa, aluminum alloys around 69–72 GPa, and titanium near 105–115 GPa. If you work in MPa, multiply GPa by 1000 (e.g., 210 GPa = 210000 MPa). Always confirm project specifications before final design.

4) Geometry, length, and direction cosines

Length comes from L = √(dx² + dy²), where dx = x2 − x1 and dy = y2 − y1. The direction cosines c = dx/L and s = dy/L define the element’s orientation. A horizontal member has c ≈ 1 and s ≈ 0, while a vertical member has c ≈ 0 and s ≈ 1.

5) Understanding the EA/L scaling factor

The term k0 = EA/L controls the magnitude of the matrix. Doubling area doubles stiffness, while doubling length halves stiffness. As a quick check, try E = 200000 MPa, A = 500 mm², L = 3000 mm: k0 = (200000×500)/3000 ≈ 33333.3333. Orientation then distributes that stiffness into x and y directions.

6) Matrix properties you can check

A correct truss element stiffness matrix is symmetric: kij = kji. Row sums for paired DOFs reflect equilibrium and sign balance, and the matrix contains positive and negative blocks that couple the two nodes. If you see unexpected asymmetry, inconsistent input units or rounding settings are common causes.

7) Practical modeling tips

Use realistic areas: a 12 mm diameter rod has area ≈ 113 mm², while a 20 mm rod has ≈ 314 mm² (A = πd²/4). Keep coordinates in the same length unit used for reporting. When assembling global matrices, preserve DOF ordering consistently so that element contributions map to the correct global indices.

8) Common interpretation mistakes

A stiffness matrix is not a stress result by itself. Stress requires axial force, which comes after solving global displacements and recovering element forces. Also remember this calculator targets a 2D axial truss/bar member; bending elements (beams/frames) require different formulations and additional DOFs.


FAQs

Q1. Why does the matrix depend on c and s?

A: c and s project axial stiffness onto global x–y directions. They distribute EA/L into x and y coupling terms, so the matrix matches the element’s orientation.

Q2. What if my element is horizontal or vertical?

A: Horizontal gives c≈1, s≈0, so stiffness mainly affects x DOFs. Vertical gives c≈0, s≈1, so stiffness mainly affects y DOFs.

Q3. Do I need the local 2×2 matrix?

A: The local matrix is useful for axial-only recovery and checks. The global 4×4 matrix is used for assembly in 2D truss models.

Q4. Why are some terms negative?

A: Negative terms enforce equal and opposite nodal actions between the two nodes. They represent coupling so the element resists relative displacement.

Q5. What units will the stiffness entries have?

A: Entries follow EA/L. With MPa (N/mm²), mm², and mm, the result is N/mm. If you change unit systems, keep them consistent.

Q6. Can I use meters and GPa?

A: Yes, if everything matches. For example, E in Pa or GPa with A in m² and coordinates in m gives stiffness in N/m. Mixing mm with m will distort results.

Q7. Is this valid for beams or frames?

A: No. Beams/frames include bending and rotations, so they use larger matrices (often 6×6 in 2D frames) and different stiffness terms.

Related Calculators

angle of repose online calculator3 angle calculator5 sided shape angle calculatorvickers to rockwell hardness conversion calculatorhardness test conversion calculatorvickers hardness conversion calculatortorsion angle of twist calculatorshaft angle of twist calculatorangle of convergence calculatorangle of descent calculator golf

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.