The Hermitian pair (A,B) is called definite if some real linear combination of the matrices A and B is a positive definite matrix. There are several reasons why it is important to detect whether a given matrix pair is definite. Determining whether a given matrix pair is definite is not straightforward. There exist different kinds of algorithms for that task. Most of them are not appropriate for medium-size or large-size matrix pairs. We propose subspace algorithms for medium-size or large-size matrix pairs that are based on iterative testing of small compressed Hermitian matrix pairs formed by using subspaces of small dimensions. First, we propose a new basic subspace algorithm for detecting definite matrix pairs. Furthermore, we propose a specialized algorithm and its preconditioned variant. In this preconditioned variant, we need to solve several systems of linear equations. These systems can be solved only approximately and not necessarily in every iteration step. Numerical experiments demonstrate the efficiency of our specialized algorithm.