Spring system

In engineering and physics, a spring system or spring network is a model of physics described as a graph with a position at each vertex and a spring of given stiffness and length along each edge. This generalizes Hooke's law to higher dimensions. This simple model can be used to solve the pose of static systems from crystal lattice to springs. A spring system can be thought of as the simplest case of the finite element method for solving problems in statics. Assuming linear springs and small deformation (or restricting to one-dimensional motion) a spring system can be cast as a (possibly overdetermined) system of linear equations or equivalently as an energy minimization problem.
Known spring lengths.
If the nominal lengths, "L", of the springs are known to be 1 and 2 units respectively, then the system can be solved as followed:
Consider the simple case of three nodes connected by two springs. Then the stretching of the two springs is given as a function of the positions of the nodes by
Let "A" be that "connectivity matrix", relating each degree of freedom to the direction each spring pulls on it.
So the forces on the springs is
where "K" is a diagonal matrix giving the stiffnesses of all of the springs. Then the force on the nodes is given by left multiplying by formula_3, which we set to zero to find equilibrium:
which gives the linear equation:
Now, formula_6 is singular, because all solutions are equivalent up to rigid-body translation. Let us prescribe a Dirichlet boundary condition, e.g., formula_7. 
Suppose "K" is the identity and so 
If we plug in formula_7 we have
Incorporating the 2 to the left-hand side gives
and removing rows of the system that we already know, and simplifying, leaves us with
so we can then solve
That is, formula_15, as prescribed, and formula_16, leaving the first spring slack, and formula_17, leaving the second spring slack.