Importance of matrix habitats in maintaining biological diversity