Nowadays, consensus of multi-agent systems (MAS) is an intriguing topic which receives increasing attention from various disciplines recently. Traditionally, the analysis of consensusability for a given MAS with switching topology can be attributed to some techniques such as eigenvalue analysis, convergence of Markov chain, Lyapunov candidate construction, and so on. However, all these techniques are based on some restrictive conditions and hardly be generalized to the case of general switching topology. This paper aims at providing an inner explanation that the general consensus problem of MAS with switching topology can be transformed into the numerical calculation of the Lyapunov exponent for a given set of matrices. Consequently, the consensus of MAS with general switching topology can be resolved by using the existing numerical algorithm of Lyapunov exponent.