  The inverse power method is a numerical algorithm to obtain the eigenvectors
of a matrix. In this work, we develop an iteration algorithm, based on the
inverse power method, to numerically solve the Schr\"odinger equation that
couples an arbitrary number of components. Such an algorithm can also be
applied to the multi-body systems. To show the power and accuracy of this
method, we also present an example of solving the Dirac equation under the
presence of an external scalar potential and a constant magnetic field, with
source code publicly available.
