The main problem with the soft-computing algorithms is a determination of their parameters. The tuning rules are very general and need experiments during a trial and error method. The equations describing the bat algorithm have the form of difference equations, and the algorithm can be treated as a stochastic discrete-time system. The behaviour of this system depends on its dynamic and preservation stability conditions. The paper presents the stability analysis of the bat algorithm described as a stochastic discrete-time state-space system. The observability and controllability analyses were made in order to verify the correctness of the model describing the dynamic of BA. Sufficient conditions for stability are derived based on the Lyapunov stability theory. They indicate the recommended areas of the location of the parameters. The analysis of the position of eigenvalues of the state matrix shows how the different values of parameters affect the behaviour of the algorithm. They indicate the recommended area of the location of the parameters. Simulation results confirm the theory-based analysis.