The global force relationship is given by the equation F=KD{\displaystyle F=KD}, where F{\displaystyle F} is the resultant force matrix, K{\displaystyle K} is the global stiffness matrix, and D{\displaystyle D} is the global displacement matrix.
In matrix format,
ke=ke[(le)2(leme)−(le)2−(leme)(leme)(me)2−(leme)−(me)2−(le)2−(leme)(le)2(leme)−(leme)−(me)2(leme)(me)2]{\displaystyle k^{e}=k^{e}{\begin{bmatrix}(l^{e})^{2}&(l^{e}m^{e})&-(l^{e})^{2}&-(l^{e}m^{e})\\(l^{e}m^{e})&(m^{e})^{2}&-(l^{e}m^{e})&-(m^{e})^{2}\\-(l^{e})^{2}&-(l^{e}m^{e})&(l^{e})^{2}&(l^{e}m^{e})\\-(l^{e}m^{e})&-(m^{e})^{2}&(l^{e}m^{e})&(m^{e})^{2}\end{bmatrix}}}