In this paper, we introduce a new general method for kinematic analysis of rigid multi body systems subject to holonomic constraints. The method extends the standard analysis of kinematically determinate rigid multi body systems to the over-determinate case. This is accomplished by introducing a constrained optimisation problem with the objective function given as a function of the set of system equations that are allowed to be violated while the remaining equations define the feasible set. We show that exact velocity and acceleration analysis can also be performed by solving linear sets of equations, originating from differentiation of the Karush-Kuhn-Tucker optimality conditions. The method is applied to the analysis of an 18 degrees-of-freedom gait model where the kinematical drivers are prescribed with data from a motion capture experiment. The results show that significant differences are obtained between applying standard kinematic analysis or minimising the least-square errors on the two fully equivalent 3D gait models with only the way the experimental data is processed being different.