The main indicator of dynamic balance is the ZMP. Its original notion assumes that both feet of the robot are in contact with the flat horizontal surface (all contacts are in the same plane) and that the friction is high enough so that sliding does not occur. With increasing capabilities of humanoid robots and the higher complexity of the motion that needs to be performed, these assumptions might not hold. Having in mind that the system is dynamically balanced if there is no rotation about the edges of the feet and if the feet do not slide, we propose a novel approach for testing the dynamic balance of bipedal robots, by using linear contact wrench conditions compiled in a single matrix (Dynamic Balance Matrix). The proposed approach has wide applicability since it can be used to check the stability of different kinds of contacts (including point, line, and surface) with arbitrary perimeter shapes. Motion feasibility conditions are derived on the basis of the conditions which the wrench of each contact has to satisfy. The approach was tested by simulation in two scenarios: biped climbing up and walking sideways on the inclined flat surface which is too steep for a regular walk without additional support. The whole-body motion was synthesized and performed using a generalized task prioritization framework.