A barycentric Lagrange interpolation collocation method is proposed to solve the three-dimensional and four-dimensional wave equations. Firstly, the barycentric Lagrange interpolation method is introduced and the matrix format of the collocation method is given. Secondly, the solution function and initial boundary conditions of the wave equation are approximated by Lagrange interpolation. The discrete equation is obtained by collocation method, and the matrix expression of the wave equation is obtained. Finally, the initial and boundary conditions of the wave equation are imposed by the addition method and the replacement method respectively. Numerical examples show that the barycentric Lagrange interpolation collocation method has high computational accuracy and efficiency.