In this paper, a matrix based technique based on the operational matrices is proposed to solve the one-dimensional linear Klein-Gordon equations with initial conditions. By substituting Euler series solutio into the considered problems, the suggested scheme reduces the problems into the associated linear algebraic systems. To show the accuracy and the efficiency of the method, two numerical examples are implemented.