Consider the simple case of three nodes, in one dimension x = [ x 1 x 2 x 3 ] {\displaystyle \mathbf {x} ={\begin{bmatrix}x_{1}\\x_{2}\\x_{3}\end{bmatrix}}} , connected by two springs. If the nominal lengths, L, of the springs are known to be 1 and 2 units respectively, i.e. L = [ 1 2 ] {\displaystyle \mathbf {L} ={\begin{bmatrix}1\\2\end{bmatrix}}} , then the system can be solved as follows:
The stretching of the two springs is given as a function of the positions of the nodes by
where B ⊤ {\displaystyle B^{\top }} is the matrix transpose of the oriented incidence matrix
relating each degree of freedom to the direction each spring pulls on it. The forces on the springs are
where W is a diagonal matrix giving the stiffness of every spring. Then the force on the nodes is given by left multiplying by B {\displaystyle B} , which we set to zero to find equilibrium:
which gives the linear equation:
Now, the matrix B W B ⊤ {\displaystyle BWB^{\top }} is singular, because all solutions are equivalent up to rigid-body translation. Let us prescribe a Dirichlet boundary condition, e.g., x 1 = 2 {\displaystyle x_{1}=2} .
As an example, let W be the identity matrix then
is the Laplacian matrix. Plugging in x 1 = 2 {\displaystyle x_{1}=2} 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, x 1 = 2 {\displaystyle x_{1}=2} , as prescribed, and x 2 = 3 {\displaystyle x_{2}=3} , leaving the first spring slack, and x 3 = 5 {\displaystyle x_{3}=5} , leaving the second spring slack.