Given the following state equation of a mechanical structure:
$K(x) u = F(x)$
where $K$ is the stiffness matrix of size $n \times n$, $x$ is the design variable, $u$ is the state variable (displacement vector) , and $F$ is the force vector.
If $K$ was invertible then $u = K^{-1} ~F$
But, if $K$ is not invertible, then we can find $u$ by solving a system of $n$ equations, right?
Since the equation is linear, the general solution $u = u_h + u_p$ will be made up of the general solution to the associated homogeneous problem, namely $u_h \in \ker K$, i.e. $Ku_h = 0$, and a particular solution the inhomogeneous equation, i.e. $Ku_p = F$. So, determining the kernel of $K$ (which is non-trivial, since $K$ is non-invertible) will constitute your first task, before finding a particular solution $u_p$ by any means. Finally, it has to be highlighted that no such $u_p$ exists if $F \not\in \mathrm{im\,} K$.