In this paper we consider different types of ranks of fuzzy matrices over residuated lattices. We investigate relations between ranks and prove that row rank, column rank and Schein rank of idempotent fuzzy matrices are equal. In particular, ranks and corresponding decompositions of fuzzy matrices representing fuzzy quasi-orders are studied in detail. We show that fuzzy matrix decomposition by ranks can be used in the state reduction of fuzzy automata. Moreover, we prove that using rank decomposition of fuzzy matrices improves results of any state reduction method based on merging indistinguishable states of fuzzy automata.