Robotics is an interdisciplinary field and there exist several well-known approaches to represent the dynamics model of a robot arm. The robot arm is an open kinematic chain of links connected through rotational and translational joints. In the general case, it is very difficult to obtain explicit expressions for the forces and the torques in the equations where the driving torques of the actuators produce desired motion of the gripper. The robot arm control depends significantly on the accuracy of the dynamic model. In the existing literature, the complexity of the dynamic model is reduced by linearization techniques or techniques like machine learning for the identification of unmodelled dynamics. This paper proposes a novel approach for deriving the equations of motion and the actuator torques of a robot arm with an arbitrary number of joints. The proposed approach for obtaining the dynamic model in closed form employs graph theory and the orthogonality principle, a powerful concept that serves as a generalization for the law of conservation of energy. The application of this approach is demonstrated using a 3D-printed planar robot arm with three degrees of freedom. Computer experiments for this robot are executed to validate the dynamic characteristics of the mathematical model of motion obtained by the application of the proposed approach. The results from the experiments are visualized and discussed in detail.