Framed structures are deeply studied in civil engineering since they provide a numerical model for the analysis of the static and dynamic response of multi-storey buildings. In order to evaluate the vibrational properties of these structures, an eigen-problem, which involves the stiffness and mass matrices of the frame, must be solved. Both matrices can be assembled by means of standard methods, which take into account the numbers of degrees of freedom of the frame. The occurrence of concentrated damage in some vulnerable sections modifies the degrees of freedom and therefore both the stiffness and mass matrices. Very often, the critical sections are located in the joints between the structural elements of the frame where the bending moment reaches its maximum value. Assuming that the joints are rigid in the undamaged configuration of the frame, it is possible to take into account their loss of stiffness due to the presence of eventual damage by means of hinges with rotational springs of variable rigidity. In this paper, an original algorithm that allows us to evaluate the stiffness and mass matrices and therefore the natural frequencies of vibration of undamaged and damaged planar frames with an arbitrary number of beams and columns is presented. The proposed algorithm for the stiffness and mass matrices determination requires a few input data which can be provided in a text file and therefore allows us to speed up the procedure with respect to the application of an FEM approach which requires the construction of single models for each considered frame. The results obtained by means of the proposed algorithm have been validated through a comparison with those provided by an FEM model implemented in SAP2000. The natural frequencies obtained by means of the proposed approach are used for the solution of two different inverse problems, which concern the identification of, respectively, the mechanical characteristics of the constitutive material and the location and intensity of the damage. Both the proposed identification procedures deal with optimization algorithms that are based on opportune fitness functions. Applications to frames of different size confirm the validity of the presented identification algorithms. Furthermore, an iterative procedure, able to reduce the required computational burden related to the identification of the location and intensity of damage, is presented and applied in a parametric study concerning frames with increasing size.