As an aside, if you are looking at a type of foundation where the vertical, horizontal, moment and torsion responses are 'coupled' (e.g. a shallow foundation), then creating a stiffness matrix would be required. Generally for deep foundations such as piles the responses are sufficiently...